* PR92163
@ 2019-10-23 21:47 Prathamesh Kulkarni
2019-10-25 8:01 ` PR92163 Richard Biener
0 siblings, 1 reply; 9+ messages in thread
From: Prathamesh Kulkarni @ 2019-10-23 21:47 UTC (permalink / raw)
To: gcc Patches, Jakub Jelinek
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
Hi,
The attached patch tries to fix PR92163 by calling
gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup.
Does it look OK ?
Thanks,
Prathamesh
[-- Attachment #2: pr92163-2.txt --]
[-- Type: text/plain, Size: 3815 bytes --]
2019-10-24 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR tree-optimization/92163
* tree-if-conv.c (ifcvt_local_dce): Call gimple_purge_dead_eh_edges
if eh cleanup is required.
* tree-ssa-dse.c (delete_dead_or_redundant_assignment): Change return type
to bool and return the return value of gsi_remove.
* tree-ssa-dse.h (delete_dead_or_redundant_assignment): Adjust prototype.
testsuite/
* gcc.dg/tree-ssa/pr92163.c: New test.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c
new file mode 100644
index 00000000000..f64eaea6517
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fexceptions -fnon-call-exceptions -fopenacc" } */
+
+void
+xr (int *k7)
+{
+ int qa;
+
+#pragma acc parallel
+#pragma acc loop vector
+ for (qa = 0; qa < 3; ++qa)
+ if (qa % 2 != 0)
+ k7[qa] = 0;
+ else
+ k7[qa] = 1;
+}
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index df9046a3014..3e2769dd02d 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -2963,6 +2963,7 @@ ifcvt_local_dce (class loop *loop)
}
}
/* Delete dead statements. */
+ bool do_eh_cleanup = false;
gsi = gsi_start_bb (bb);
while (!gsi_end_p (gsi))
{
@@ -2975,7 +2976,7 @@ ifcvt_local_dce (class loop *loop)
if (dse_classify_store (&write, stmt, false, NULL, NULL, latch_vdef)
== DSE_STORE_DEAD)
- delete_dead_or_redundant_assignment (&gsi, "dead");
+ do_eh_cleanup |= delete_dead_or_redundant_assignment (&gsi, "dead");
else
gsi_next (&gsi);
continue;
@@ -2994,6 +2995,9 @@ ifcvt_local_dce (class loop *loop)
gsi_remove (&gsi, true);
release_defs (stmt);
}
+
+ if (do_eh_cleanup)
+ gimple_purge_dead_eh_edges (bb);
}
/* If-convert LOOP when it is legal. For the moment this pass has no
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index 25cd4709b31..deec6c07c50 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -77,7 +77,6 @@ along with GCC; see the file COPYING3. If not see
fact, they are the same transformation applied to different views of
the CFG. */
-void delete_dead_or_redundant_assignment (gimple_stmt_iterator *, const char *);
static void delete_dead_or_redundant_call (gimple_stmt_iterator *, const char *);
/* Bitmap of blocks that have had EH statements cleaned. We should
@@ -899,7 +898,7 @@ delete_dead_or_redundant_call (gimple_stmt_iterator *gsi, const char *type)
/* Delete a dead store at GSI, which is a gimple assignment. */
-void
+bool
delete_dead_or_redundant_assignment (gimple_stmt_iterator *gsi, const char *type)
{
gimple *stmt = gsi_stmt (*gsi);
@@ -915,12 +914,14 @@ delete_dead_or_redundant_assignment (gimple_stmt_iterator *gsi, const char *type
/* Remove the dead store. */
basic_block bb = gimple_bb (stmt);
- if (gsi_remove (gsi, true))
+ bool eh_cleanup_required = gsi_remove (gsi, true);
+ if (eh_cleanup_required && need_eh_cleanup)
bitmap_set_bit (need_eh_cleanup, bb->index);
/* And release any SSA_NAMEs set in this statement back to the
SSA_NAME manager. */
release_defs (stmt);
+ return eh_cleanup_required;
}
/* Attempt to eliminate dead stores in the statement referenced by BSI.
diff --git a/gcc/tree-ssa-dse.h b/gcc/tree-ssa-dse.h
index a5eccbd746d..80b6d9b2616 100644
--- a/gcc/tree-ssa-dse.h
+++ b/gcc/tree-ssa-dse.h
@@ -31,6 +31,6 @@ enum dse_store_status
dse_store_status dse_classify_store (ao_ref *, gimple *, bool, sbitmap,
bool * = NULL, tree = NULL);
-void delete_dead_or_redundant_assignment (gimple_stmt_iterator *, const char *);
+bool delete_dead_or_redundant_assignment (gimple_stmt_iterator *, const char *);
#endif /* GCC_TREE_SSA_DSE_H */
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PR92163
2019-10-23 21:47 PR92163 Prathamesh Kulkarni
@ 2019-10-25 8:01 ` Richard Biener
2019-10-25 20:49 ` PR92163 Prathamesh Kulkarni
0 siblings, 1 reply; 9+ messages in thread
From: Richard Biener @ 2019-10-25 8:01 UTC (permalink / raw)
To: Prathamesh Kulkarni; +Cc: gcc Patches, Jakub Jelinek
On Wed, Oct 23, 2019 at 11:45 PM Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> wrote:
>
> Hi,
> The attached patch tries to fix PR92163 by calling
> gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup.
> Does it look OK ?
Hmm. I think it shows an issue with the return value of remove_stmt_form_eh_lp
which is true if the LP index is -1 (externally throwing). We don't
need to purge
any edges in that case. That is, if-conversion should never need to
do EH purging
since that would be wrong-code.
As of the segfault can you please instead either pass down need_eh_cleanup
as function parameter (and NULL from ifcvt) or use the return value in DSE
to set the bit in the caller.
Thanks,
Richard.
> Thanks,
> Prathamesh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PR92163
2019-10-25 8:01 ` PR92163 Richard Biener
@ 2019-10-25 20:49 ` Prathamesh Kulkarni
2019-10-28 14:53 ` PR92163 Richard Biener
0 siblings, 1 reply; 9+ messages in thread
From: Prathamesh Kulkarni @ 2019-10-25 20:49 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc Patches, Jakub Jelinek
[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]
On Fri, 25 Oct 2019 at 13:19, Richard Biener <richard.guenther@gmail.com> wrote:
>
> On Wed, Oct 23, 2019 at 11:45 PM Prathamesh Kulkarni
> <prathamesh.kulkarni@linaro.org> wrote:
> >
> > Hi,
> > The attached patch tries to fix PR92163 by calling
> > gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup.
> > Does it look OK ?
>
> Hmm. I think it shows an issue with the return value of remove_stmt_form_eh_lp
> which is true if the LP index is -1 (externally throwing). We don't
> need to purge
> any edges in that case. That is, if-conversion should never need to
> do EH purging
> since that would be wrong-code.
>
> As of the segfault can you please instead either pass down need_eh_cleanup
> as function parameter (and NULL from ifcvt) or use the return value in DSE
> to set the bit in the caller.
Hi Richard,
Thanks for the suggestions, does the attached patch look OK ?
Bootstrap+test in progress on x86_64-unknown-linux-gnu.
Thanks,
Prathamesh
>
> Thanks,
> Richard.
>
> > Thanks,
> > Prathamesh
[-- Attachment #2: pr92163-3.txt --]
[-- Type: text/plain, Size: 3634 bytes --]
2019-10-25 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR tree-optimization/92163
* tree-ssa-dse.c (delete_dead_or_redundant_assignment): New param
need_eh_cleanup with default value NULL. Gate on need_eh_cleanup
before calling bitmap_set_bit.
(dse_optimize_redundant_stores): Pass global need_eh_cleanup to
delete_dead_or_redundant_assignment.
(dse_dom_walker::dse_optimize_stmt): Likewise.
* tree-ssa-dse.h (delete_dead_or_redundant_assignment): Adjust prototype.
testsuite/
* gcc.dg/tree-ssa/pr92163.c: New test.
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c
new file mode 100644
index 00000000000..58f548fe76b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c
@@ -0,0 +1,16 @@
+/* { dg-do "compile" } */
+/* { dg-options "-O2 -fexceptions -fnon-call-exceptions -fopenacc" } */
+
+void
+xr (int *k7)
+{
+ int qa;
+
+#pragma acc parallel
+#pragma acc loop vector
+ for (qa = 0; qa < 3; ++qa)
+ if (qa % 2 != 0)
+ k7[qa] = 0;
+ else
+ k7[qa] = 1;
+}
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index 25cd4709b31..21a15eef690 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -77,7 +77,6 @@ along with GCC; see the file COPYING3. If not see
fact, they are the same transformation applied to different views of
the CFG. */
-void delete_dead_or_redundant_assignment (gimple_stmt_iterator *, const char *);
static void delete_dead_or_redundant_call (gimple_stmt_iterator *, const char *);
/* Bitmap of blocks that have had EH statements cleaned. We should
@@ -639,7 +638,8 @@ dse_optimize_redundant_stores (gimple *stmt)
{
gimple_stmt_iterator gsi = gsi_for_stmt (use_stmt);
if (is_gimple_assign (use_stmt))
- delete_dead_or_redundant_assignment (&gsi, "redundant");
+ delete_dead_or_redundant_assignment (&gsi, "redundant",
+ need_eh_cleanup);
else if (is_gimple_call (use_stmt))
delete_dead_or_redundant_call (&gsi, "redundant");
else
@@ -900,7 +900,8 @@ delete_dead_or_redundant_call (gimple_stmt_iterator *gsi, const char *type)
/* Delete a dead store at GSI, which is a gimple assignment. */
void
-delete_dead_or_redundant_assignment (gimple_stmt_iterator *gsi, const char *type)
+delete_dead_or_redundant_assignment (gimple_stmt_iterator *gsi, const char *type,
+ bitmap need_eh_cleanup)
{
gimple *stmt = gsi_stmt (*gsi);
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -915,7 +916,7 @@ delete_dead_or_redundant_assignment (gimple_stmt_iterator *gsi, const char *type
/* Remove the dead store. */
basic_block bb = gimple_bb (stmt);
- if (gsi_remove (gsi, true))
+ if (gsi_remove (gsi, true) && need_eh_cleanup)
bitmap_set_bit (need_eh_cleanup, bb->index);
/* And release any SSA_NAMEs set in this statement back to the
@@ -1059,7 +1060,7 @@ dse_dom_walker::dse_optimize_stmt (gimple_stmt_iterator *gsi)
&& !by_clobber_p)
return;
- delete_dead_or_redundant_assignment (gsi, "dead");
+ delete_dead_or_redundant_assignment (gsi, "dead", need_eh_cleanup);
}
}
diff --git a/gcc/tree-ssa-dse.h b/gcc/tree-ssa-dse.h
index a5eccbd746d..2658f92b1bb 100644
--- a/gcc/tree-ssa-dse.h
+++ b/gcc/tree-ssa-dse.h
@@ -31,6 +31,7 @@ enum dse_store_status
dse_store_status dse_classify_store (ao_ref *, gimple *, bool, sbitmap,
bool * = NULL, tree = NULL);
-void delete_dead_or_redundant_assignment (gimple_stmt_iterator *, const char *);
+void delete_dead_or_redundant_assignment (gimple_stmt_iterator *, const char *,
+ bitmap = NULL);
#endif /* GCC_TREE_SSA_DSE_H */
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PR92163
2019-10-25 20:49 ` PR92163 Prathamesh Kulkarni
@ 2019-10-28 14:53 ` Richard Biener
2019-10-28 15:06 ` PR92163 Prathamesh Kulkarni
0 siblings, 1 reply; 9+ messages in thread
From: Richard Biener @ 2019-10-28 14:53 UTC (permalink / raw)
To: Prathamesh Kulkarni; +Cc: gcc Patches, Jakub Jelinek
On Fri, Oct 25, 2019 at 9:58 PM Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> wrote:
>
> On Fri, 25 Oct 2019 at 13:19, Richard Biener <richard.guenther@gmail.com> wrote:
> >
> > On Wed, Oct 23, 2019 at 11:45 PM Prathamesh Kulkarni
> > <prathamesh.kulkarni@linaro.org> wrote:
> > >
> > > Hi,
> > > The attached patch tries to fix PR92163 by calling
> > > gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup.
> > > Does it look OK ?
> >
> > Hmm. I think it shows an issue with the return value of remove_stmt_form_eh_lp
> > which is true if the LP index is -1 (externally throwing). We don't
> > need to purge
> > any edges in that case. That is, if-conversion should never need to
> > do EH purging
> > since that would be wrong-code.
> >
> > As of the segfault can you please instead either pass down need_eh_cleanup
> > as function parameter (and NULL from ifcvt) or use the return value in DSE
> > to set the bit in the caller.
> Hi Richard,
> Thanks for the suggestions, does the attached patch look OK ?
> Bootstrap+test in progress on x86_64-unknown-linux-gnu.
OK.
Richard.
> Thanks,
> Prathamesh
> >
> > Thanks,
> > Richard.
> >
> > > Thanks,
> > > Prathamesh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PR92163
2019-10-28 14:53 ` PR92163 Richard Biener
@ 2019-10-28 15:06 ` Prathamesh Kulkarni
2019-11-04 13:07 ` PR92163 Christophe Lyon
0 siblings, 1 reply; 9+ messages in thread
From: Prathamesh Kulkarni @ 2019-10-28 15:06 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc Patches, Jakub Jelinek
On Mon, 28 Oct 2019 at 07:18, Richard Biener <richard.guenther@gmail.com> wrote:
>
> On Fri, Oct 25, 2019 at 9:58 PM Prathamesh Kulkarni
> <prathamesh.kulkarni@linaro.org> wrote:
> >
> > On Fri, 25 Oct 2019 at 13:19, Richard Biener <richard.guenther@gmail.com> wrote:
> > >
> > > On Wed, Oct 23, 2019 at 11:45 PM Prathamesh Kulkarni
> > > <prathamesh.kulkarni@linaro.org> wrote:
> > > >
> > > > Hi,
> > > > The attached patch tries to fix PR92163 by calling
> > > > gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup.
> > > > Does it look OK ?
> > >
> > > Hmm. I think it shows an issue with the return value of remove_stmt_form_eh_lp
> > > which is true if the LP index is -1 (externally throwing). We don't
> > > need to purge
> > > any edges in that case. That is, if-conversion should never need to
> > > do EH purging
> > > since that would be wrong-code.
> > >
> > > As of the segfault can you please instead either pass down need_eh_cleanup
> > > as function parameter (and NULL from ifcvt) or use the return value in DSE
> > > to set the bit in the caller.
> > Hi Richard,
> > Thanks for the suggestions, does the attached patch look OK ?
> > Bootstrap+test in progress on x86_64-unknown-linux-gnu.
>
> OK.
Thanks, committed to trunk in r277525 after bootstrap+test on
x86_64-unknown-linux-gnu.
Thanks,
Prathamesh
>
> Richard.
>
> > Thanks,
> > Prathamesh
> > >
> > > Thanks,
> > > Richard.
> > >
> > > > Thanks,
> > > > Prathamesh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PR92163
2019-10-28 15:06 ` PR92163 Prathamesh Kulkarni
@ 2019-11-04 13:07 ` Christophe Lyon
2019-11-05 4:46 ` PR92163 Prathamesh Kulkarni
0 siblings, 1 reply; 9+ messages in thread
From: Christophe Lyon @ 2019-11-04 13:07 UTC (permalink / raw)
To: Prathamesh Kulkarni; +Cc: Richard Biener, gcc Patches, Jakub Jelinek
On Mon, 28 Oct 2019 at 16:03, Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> wrote:
>
> On Mon, 28 Oct 2019 at 07:18, Richard Biener <richard.guenther@gmail.com> wrote:
> >
> > On Fri, Oct 25, 2019 at 9:58 PM Prathamesh Kulkarni
> > <prathamesh.kulkarni@linaro.org> wrote:
> > >
> > > On Fri, 25 Oct 2019 at 13:19, Richard Biener <richard.guenther@gmail.com> wrote:
> > > >
> > > > On Wed, Oct 23, 2019 at 11:45 PM Prathamesh Kulkarni
> > > > <prathamesh.kulkarni@linaro.org> wrote:
> > > > >
> > > > > Hi,
> > > > > The attached patch tries to fix PR92163 by calling
> > > > > gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup.
> > > > > Does it look OK ?
> > > >
> > > > Hmm. I think it shows an issue with the return value of remove_stmt_form_eh_lp
> > > > which is true if the LP index is -1 (externally throwing). We don't
> > > > need to purge
> > > > any edges in that case. That is, if-conversion should never need to
> > > > do EH purging
> > > > since that would be wrong-code.
> > > >
> > > > As of the segfault can you please instead either pass down need_eh_cleanup
> > > > as function parameter (and NULL from ifcvt) or use the return value in DSE
> > > > to set the bit in the caller.
> > > Hi Richard,
> > > Thanks for the suggestions, does the attached patch look OK ?
> > > Bootstrap+test in progress on x86_64-unknown-linux-gnu.
> >
> > OK.
> Thanks, committed to trunk in r277525 after bootstrap+test on
> x86_64-unknown-linux-gnu.
>
Hi Prathamesh,
There's a problem with the new test you added: if uses -fopenacc which
is not supported by arm-eabi or aarch64-elf targets for instance.
You probably want to move the test to gcc.dg/goacc or add
dg-require-effective-target fopenacc.
Thanks,
Christophe
> Thanks,
> Prathamesh
> >
> > Richard.
> >
> > > Thanks,
> > > Prathamesh
> > > >
> > > > Thanks,
> > > > Richard.
> > > >
> > > > > Thanks,
> > > > > Prathamesh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PR92163
2019-11-04 13:07 ` PR92163 Christophe Lyon
@ 2019-11-05 4:46 ` Prathamesh Kulkarni
2019-11-05 13:06 ` PR92163 Christophe Lyon
0 siblings, 1 reply; 9+ messages in thread
From: Prathamesh Kulkarni @ 2019-11-05 4:46 UTC (permalink / raw)
To: Christophe Lyon; +Cc: Richard Biener, gcc Patches, Jakub Jelinek
[-- Attachment #1: Type: text/plain, Size: 2269 bytes --]
On Mon, 4 Nov 2019 at 18:37, Christophe Lyon <christophe.lyon@linaro.org> wrote:
>
> On Mon, 28 Oct 2019 at 16:03, Prathamesh Kulkarni
> <prathamesh.kulkarni@linaro.org> wrote:
> >
> > On Mon, 28 Oct 2019 at 07:18, Richard Biener <richard.guenther@gmail.com> wrote:
> > >
> > > On Fri, Oct 25, 2019 at 9:58 PM Prathamesh Kulkarni
> > > <prathamesh.kulkarni@linaro.org> wrote:
> > > >
> > > > On Fri, 25 Oct 2019 at 13:19, Richard Biener <richard.guenther@gmail.com> wrote:
> > > > >
> > > > > On Wed, Oct 23, 2019 at 11:45 PM Prathamesh Kulkarni
> > > > > <prathamesh.kulkarni@linaro.org> wrote:
> > > > > >
> > > > > > Hi,
> > > > > > The attached patch tries to fix PR92163 by calling
> > > > > > gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup.
> > > > > > Does it look OK ?
> > > > >
> > > > > Hmm. I think it shows an issue with the return value of remove_stmt_form_eh_lp
> > > > > which is true if the LP index is -1 (externally throwing). We don't
> > > > > need to purge
> > > > > any edges in that case. That is, if-conversion should never need to
> > > > > do EH purging
> > > > > since that would be wrong-code.
> > > > >
> > > > > As of the segfault can you please instead either pass down need_eh_cleanup
> > > > > as function parameter (and NULL from ifcvt) or use the return value in DSE
> > > > > to set the bit in the caller.
> > > > Hi Richard,
> > > > Thanks for the suggestions, does the attached patch look OK ?
> > > > Bootstrap+test in progress on x86_64-unknown-linux-gnu.
> > >
> > > OK.
> > Thanks, committed to trunk in r277525 after bootstrap+test on
> > x86_64-unknown-linux-gnu.
> >
>
> Hi Prathamesh,
>
> There's a problem with the new test you added: if uses -fopenacc which
> is not supported by arm-eabi or aarch64-elf targets for instance.
> You probably want to move the test to gcc.dg/goacc or add
> dg-require-effective-target fopenacc.
Oops, sorry about that. Could you please confirm if attached patch
fixes the issue ?
I added dg-require-effective-target fopenacc.
Thanks,
Prathamesh
>
> Thanks,
>
> Christophe
>
> > Thanks,
> > Prathamesh
> > >
> > > Richard.
> > >
> > > > Thanks,
> > > > Prathamesh
> > > > >
> > > > > Thanks,
> > > > > Richard.
> > > > >
> > > > > > Thanks,
> > > > > > Prathamesh
[-- Attachment #2: foo.diff --]
[-- Type: text/x-patch, Size: 397 bytes --]
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c
index 58f548fe76b..227c09255e4 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92163.c
@@ -1,4 +1,5 @@
/* { dg-do "compile" } */
+/* { dg-require-effective-target fopenacc } */
/* { dg-options "-O2 -fexceptions -fnon-call-exceptions -fopenacc" } */
void
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PR92163
2019-11-05 4:46 ` PR92163 Prathamesh Kulkarni
@ 2019-11-05 13:06 ` Christophe Lyon
2019-11-07 6:29 ` PR92163 Prathamesh Kulkarni
0 siblings, 1 reply; 9+ messages in thread
From: Christophe Lyon @ 2019-11-05 13:06 UTC (permalink / raw)
To: Prathamesh Kulkarni; +Cc: Richard Biener, gcc Patches, Jakub Jelinek
On Tue, 5 Nov 2019 at 05:46, Prathamesh Kulkarni
<prathamesh.kulkarni@linaro.org> wrote:
>
> On Mon, 4 Nov 2019 at 18:37, Christophe Lyon <christophe.lyon@linaro.org> wrote:
> >
> > On Mon, 28 Oct 2019 at 16:03, Prathamesh Kulkarni
> > <prathamesh.kulkarni@linaro.org> wrote:
> > >
> > > On Mon, 28 Oct 2019 at 07:18, Richard Biener <richard.guenther@gmail.com> wrote:
> > > >
> > > > On Fri, Oct 25, 2019 at 9:58 PM Prathamesh Kulkarni
> > > > <prathamesh.kulkarni@linaro.org> wrote:
> > > > >
> > > > > On Fri, 25 Oct 2019 at 13:19, Richard Biener <richard.guenther@gmail.com> wrote:
> > > > > >
> > > > > > On Wed, Oct 23, 2019 at 11:45 PM Prathamesh Kulkarni
> > > > > > <prathamesh.kulkarni@linaro.org> wrote:
> > > > > > >
> > > > > > > Hi,
> > > > > > > The attached patch tries to fix PR92163 by calling
> > > > > > > gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup.
> > > > > > > Does it look OK ?
> > > > > >
> > > > > > Hmm. I think it shows an issue with the return value of remove_stmt_form_eh_lp
> > > > > > which is true if the LP index is -1 (externally throwing). We don't
> > > > > > need to purge
> > > > > > any edges in that case. That is, if-conversion should never need to
> > > > > > do EH purging
> > > > > > since that would be wrong-code.
> > > > > >
> > > > > > As of the segfault can you please instead either pass down need_eh_cleanup
> > > > > > as function parameter (and NULL from ifcvt) or use the return value in DSE
> > > > > > to set the bit in the caller.
> > > > > Hi Richard,
> > > > > Thanks for the suggestions, does the attached patch look OK ?
> > > > > Bootstrap+test in progress on x86_64-unknown-linux-gnu.
> > > >
> > > > OK.
> > > Thanks, committed to trunk in r277525 after bootstrap+test on
> > > x86_64-unknown-linux-gnu.
> > >
> >
> > Hi Prathamesh,
> >
> > There's a problem with the new test you added: if uses -fopenacc which
> > is not supported by arm-eabi or aarch64-elf targets for instance.
> > You probably want to move the test to gcc.dg/goacc or add
> > dg-require-effective-target fopenacc.
> Oops, sorry about that. Could you please confirm if attached patch
> fixes the issue ?
> I added dg-require-effective-target fopenacc.
>
Yes that works. Maybe you can commit it as obvious?
Thanks,
Christophe
> Thanks,
> Prathamesh
> >
> > Thanks,
> >
> > Christophe
> >
> > > Thanks,
> > > Prathamesh
> > > >
> > > > Richard.
> > > >
> > > > > Thanks,
> > > > > Prathamesh
> > > > > >
> > > > > > Thanks,
> > > > > > Richard.
> > > > > >
> > > > > > > Thanks,
> > > > > > > Prathamesh
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: PR92163
2019-11-05 13:06 ` PR92163 Christophe Lyon
@ 2019-11-07 6:29 ` Prathamesh Kulkarni
0 siblings, 0 replies; 9+ messages in thread
From: Prathamesh Kulkarni @ 2019-11-07 6:29 UTC (permalink / raw)
To: Christophe Lyon; +Cc: Richard Biener, gcc Patches, Jakub Jelinek
On Tue, 5 Nov 2019 at 18:36, Christophe Lyon <christophe.lyon@linaro.org> wrote:
>
> On Tue, 5 Nov 2019 at 05:46, Prathamesh Kulkarni
> <prathamesh.kulkarni@linaro.org> wrote:
> >
> > On Mon, 4 Nov 2019 at 18:37, Christophe Lyon <christophe.lyon@linaro.org> wrote:
> > >
> > > On Mon, 28 Oct 2019 at 16:03, Prathamesh Kulkarni
> > > <prathamesh.kulkarni@linaro.org> wrote:
> > > >
> > > > On Mon, 28 Oct 2019 at 07:18, Richard Biener <richard.guenther@gmail.com> wrote:
> > > > >
> > > > > On Fri, Oct 25, 2019 at 9:58 PM Prathamesh Kulkarni
> > > > > <prathamesh.kulkarni@linaro.org> wrote:
> > > > > >
> > > > > > On Fri, 25 Oct 2019 at 13:19, Richard Biener <richard.guenther@gmail.com> wrote:
> > > > > > >
> > > > > > > On Wed, Oct 23, 2019 at 11:45 PM Prathamesh Kulkarni
> > > > > > > <prathamesh.kulkarni@linaro.org> wrote:
> > > > > > > >
> > > > > > > > Hi,
> > > > > > > > The attached patch tries to fix PR92163 by calling
> > > > > > > > gimple_purge_dead_eh_edges from ifcvt_local_dce if we need eh cleanup.
> > > > > > > > Does it look OK ?
> > > > > > >
> > > > > > > Hmm. I think it shows an issue with the return value of remove_stmt_form_eh_lp
> > > > > > > which is true if the LP index is -1 (externally throwing). We don't
> > > > > > > need to purge
> > > > > > > any edges in that case. That is, if-conversion should never need to
> > > > > > > do EH purging
> > > > > > > since that would be wrong-code.
> > > > > > >
> > > > > > > As of the segfault can you please instead either pass down need_eh_cleanup
> > > > > > > as function parameter (and NULL from ifcvt) or use the return value in DSE
> > > > > > > to set the bit in the caller.
> > > > > > Hi Richard,
> > > > > > Thanks for the suggestions, does the attached patch look OK ?
> > > > > > Bootstrap+test in progress on x86_64-unknown-linux-gnu.
> > > > >
> > > > > OK.
> > > > Thanks, committed to trunk in r277525 after bootstrap+test on
> > > > x86_64-unknown-linux-gnu.
> > > >
> > >
> > > Hi Prathamesh,
> > >
> > > There's a problem with the new test you added: if uses -fopenacc which
> > > is not supported by arm-eabi or aarch64-elf targets for instance.
> > > You probably want to move the test to gcc.dg/goacc or add
> > > dg-require-effective-target fopenacc.
> > Oops, sorry about that. Could you please confirm if attached patch
> > fixes the issue ?
> > I added dg-require-effective-target fopenacc.
> >
>
> Yes that works. Maybe you can commit it as obvious?
Thanks, committed in r277906.
Thanks,
Prathamesh
>
> Thanks,
>
> Christophe
>
> > Thanks,
> > Prathamesh
> > >
> > > Thanks,
> > >
> > > Christophe
> > >
> > > > Thanks,
> > > > Prathamesh
> > > > >
> > > > > Richard.
> > > > >
> > > > > > Thanks,
> > > > > > Prathamesh
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Richard.
> > > > > > >
> > > > > > > > Thanks,
> > > > > > > > Prathamesh
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-11-07 6:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 21:47 PR92163 Prathamesh Kulkarni
2019-10-25 8:01 ` PR92163 Richard Biener
2019-10-25 20:49 ` PR92163 Prathamesh Kulkarni
2019-10-28 14:53 ` PR92163 Richard Biener
2019-10-28 15:06 ` PR92163 Prathamesh Kulkarni
2019-11-04 13:07 ` PR92163 Christophe Lyon
2019-11-05 4:46 ` PR92163 Prathamesh Kulkarni
2019-11-05 13:06 ` PR92163 Christophe Lyon
2019-11-07 6:29 ` PR92163 Prathamesh Kulkarni
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).