* [PATCH] Call free_dominance_info when transformed in DCE (PR rtl-optimization/89242).
@ 2019-02-13 5:56 Martin Liška
2019-02-14 9:22 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2019-02-13 5:56 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 708 bytes --]
Hi.
The patch is very similar to r236460 where we should release dominance info
when the CFG is modified.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed?
Thanks,
Martin
gcc/ChangeLog:
2019-02-12 Martin Liska <mliska@suse.cz>
PR rtl-optimization/89242
* dce.c (delete_unmarked_insns): Call free_dominance_info we
process a transformation.
gcc/testsuite/ChangeLog:
2019-02-12 Martin Liska <mliska@suse.cz>
PR rtl-optimization/89242
* g++.dg/pr89242.C: New test.
---
gcc/dce.c | 1 +
gcc/testsuite/g++.dg/pr89242.C | 15 +++++++++++++++
2 files changed, 16 insertions(+)
create mode 100644 gcc/testsuite/g++.dg/pr89242.C
[-- Attachment #2: 0001-Call-free_dominance_info-when-transformed-in-DCE-PR-.patch --]
[-- Type: text/x-patch, Size: 803 bytes --]
diff --git a/gcc/dce.c b/gcc/dce.c
index cb18e81592a..8fb109c7388 100644
--- a/gcc/dce.c
+++ b/gcc/dce.c
@@ -652,6 +652,7 @@ delete_unmarked_insns (void)
{
gcc_assert (can_alter_cfg);
delete_unreachable_blocks ();
+ free_dominance_info (CDI_DOMINATORS);
}
}
diff --git a/gcc/testsuite/g++.dg/pr89242.C b/gcc/testsuite/g++.dg/pr89242.C
new file mode 100644
index 00000000000..a702fef4f31
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr89242.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+// { dg-options "-fno-rerun-cse-after-loop -ftrapv -fno-tree-loop-optimize -fdelete-dead-exceptions -fno-forward-propagate -fnon-call-exceptions -O2" }
+
+void bar (int n, char *p)
+{
+ try
+ {
+ n++;
+ for (int i = 0; i < n - 1; i++)
+ p[i];
+ }
+ catch (...)
+ {}
+}
+
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Call free_dominance_info when transformed in DCE (PR rtl-optimization/89242).
2019-02-13 5:56 [PATCH] Call free_dominance_info when transformed in DCE (PR rtl-optimization/89242) Martin Liška
@ 2019-02-14 9:22 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2019-02-14 9:22 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches
On Wed, Feb 13, 2019 at 6:56 AM Martin Liška <mliska@suse.cz> wrote:
>
> Hi.
>
> The patch is very similar to r236460 where we should release dominance info
> when the CFG is modified.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
OK.
> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2019-02-12 Martin Liska <mliska@suse.cz>
>
> PR rtl-optimization/89242
> * dce.c (delete_unmarked_insns): Call free_dominance_info we
> process a transformation.
>
> gcc/testsuite/ChangeLog:
>
> 2019-02-12 Martin Liska <mliska@suse.cz>
>
> PR rtl-optimization/89242
> * g++.dg/pr89242.C: New test.
> ---
> gcc/dce.c | 1 +
> gcc/testsuite/g++.dg/pr89242.C | 15 +++++++++++++++
> 2 files changed, 16 insertions(+)
> create mode 100644 gcc/testsuite/g++.dg/pr89242.C
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-14 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-13 5:56 [PATCH] Call free_dominance_info when transformed in DCE (PR rtl-optimization/89242) Martin Liška
2019-02-14 9:22 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).