* Re: [PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto
[not found] <62bae1fb.1c69fb81.b56b8.ca78SMTPIN_ADDED_MISSING@mx.google.com>
@ 2022-06-28 16:09 ` Jeff Law
0 siblings, 0 replies; 5+ messages in thread
From: Jeff Law @ 2022-06-28 16:09 UTC (permalink / raw)
To: Richard Biener, gcc-patches; +Cc: segher
On 6/28/2022 5:11 AM, Richard Biener wrote:
> The following makes sure we preserve EH notes on call insns that
> indicate the call doesn't perform a non-local goto when distributing
> notes after combining insns.
>
> Bootstrap & regtest pending on x86_64-unknown-linux-gnu, tested on
> the m68k testcase in the PR.
>
> OK for trunk if testing passes?
>
> Thanks,
> Richard.
>
> 2022-06-28 Richard Biener <rguenther@suse.de>
>
> PR rtl-optimization/106082
> * combine.cc (distribute_notes): Preserve notes when
> they indicate a call doesn't perform a non-local goto.
I've thrown this into the tester and fired up a m68k run. Results in
~30hrs or so.
jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto
[not found] <202206281111.25SBBvhG030417@gate.crashing.org>
@ 2022-06-28 17:00 ` Segher Boessenkool
0 siblings, 0 replies; 5+ messages in thread
From: Segher Boessenkool @ 2022-06-28 17:00 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches, jeffreyalaw
On Tue, Jun 28, 2022 at 11:11:55AM +0000, Richard Biener wrote:
> The following makes sure we preserve EH notes on call insns that
> indicate the call doesn't perform a non-local goto when distributing
> notes after combining insns.
> - if (!insn_could_throw_p (from_insn))
> - /* Throw away stra notes on insns that can never throw. */
> + if (!insn_could_throw_p (from_insn)
> + && (lp_nr != INT_MIN || !can_nonlocal_goto (from_insn)))
> + /* Throw away stray notes on insns that can never throw or
> + make a nonlocal goto. */
> ;
Where is the meaning of INT_MIN here documented?
... Ah, in except.cc .
Can you write this as
if (!insn_could_throw_p (from_insn)
&& !(lp_nr == INT_MIN && can_nonlocal_goto (from_insn)))
please? It is easier to understand that way.
With or without that, okay for trunk. Thanks!
Segher
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto
@ 2022-06-28 11:11 Richard Biener
0 siblings, 0 replies; 5+ messages in thread
From: Richard Biener @ 2022-06-28 11:11 UTC (permalink / raw)
To: gcc-patches; +Cc: segher, jeffreyalaw
The following makes sure we preserve EH notes on call insns that
indicate the call doesn't perform a non-local goto when distributing
notes after combining insns.
Bootstrap & regtest pending on x86_64-unknown-linux-gnu, tested on
the m68k testcase in the PR.
OK for trunk if testing passes?
Thanks,
Richard.
2022-06-28 Richard Biener <rguenther@suse.de>
PR rtl-optimization/106082
* combine.cc (distribute_notes): Preserve notes when
they indicate a call doesn't perform a non-local goto.
---
gcc/combine.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/combine.cc b/gcc/combine.cc
index a8305273e44..3d34e860cf9 100644
--- a/gcc/combine.cc
+++ b/gcc/combine.cc
@@ -14218,8 +14218,10 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2,
gcc_assert (from_insn == i3);
/* We are making sure there is a single effective REG_EH_REGION
note and it's valid to put it on i3. */
- if (!insn_could_throw_p (from_insn))
- /* Throw away stra notes on insns that can never throw. */
+ if (!insn_could_throw_p (from_insn)
+ && (lp_nr != INT_MIN || !can_nonlocal_goto (from_insn)))
+ /* Throw away stray notes on insns that can never throw or
+ make a nonlocal goto. */
;
else
{
--
2.35.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto
@ 2022-06-28 11:11 Richard Biener
0 siblings, 0 replies; 5+ messages in thread
From: Richard Biener @ 2022-06-28 11:11 UTC (permalink / raw)
To: gcc-patches; +Cc: segher, jeffreyalaw
The following makes sure we preserve EH notes on call insns that
indicate the call doesn't perform a non-local goto when distributing
notes after combining insns.
Bootstrap & regtest pending on x86_64-unknown-linux-gnu, tested on
the m68k testcase in the PR.
OK for trunk if testing passes?
Thanks,
Richard.
2022-06-28 Richard Biener <rguenther@suse.de>
PR rtl-optimization/106082
* combine.cc (distribute_notes): Preserve notes when
they indicate a call doesn't perform a non-local goto.
---
gcc/combine.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/combine.cc b/gcc/combine.cc
index a8305273e44..3d34e860cf9 100644
--- a/gcc/combine.cc
+++ b/gcc/combine.cc
@@ -14218,8 +14218,10 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2,
gcc_assert (from_insn == i3);
/* We are making sure there is a single effective REG_EH_REGION
note and it's valid to put it on i3. */
- if (!insn_could_throw_p (from_insn))
- /* Throw away stra notes on insns that can never throw. */
+ if (!insn_could_throw_p (from_insn)
+ && (lp_nr != INT_MIN || !can_nonlocal_goto (from_insn)))
+ /* Throw away stray notes on insns that can never throw or
+ make a nonlocal goto. */
;
else
{
--
2.35.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto
@ 2022-06-28 11:11 Richard Biener
0 siblings, 0 replies; 5+ messages in thread
From: Richard Biener @ 2022-06-28 11:11 UTC (permalink / raw)
To: gcc-patches; +Cc: segher, jeffreyalaw
The following makes sure we preserve EH notes on call insns that
indicate the call doesn't perform a non-local goto when distributing
notes after combining insns.
Bootstrap & regtest pending on x86_64-unknown-linux-gnu, tested on
the m68k testcase in the PR.
OK for trunk if testing passes?
Thanks,
Richard.
2022-06-28 Richard Biener <rguenther@suse.de>
PR rtl-optimization/106082
* combine.cc (distribute_notes): Preserve notes when
they indicate a call doesn't perform a non-local goto.
---
gcc/combine.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/combine.cc b/gcc/combine.cc
index a8305273e44..3d34e860cf9 100644
--- a/gcc/combine.cc
+++ b/gcc/combine.cc
@@ -14218,8 +14218,10 @@ distribute_notes (rtx notes, rtx_insn *from_insn, rtx_insn *i3, rtx_insn *i2,
gcc_assert (from_insn == i3);
/* We are making sure there is a single effective REG_EH_REGION
note and it's valid to put it on i3. */
- if (!insn_could_throw_p (from_insn))
- /* Throw away stra notes on insns that can never throw. */
+ if (!insn_could_throw_p (from_insn)
+ && (lp_nr != INT_MIN || !can_nonlocal_goto (from_insn)))
+ /* Throw away stray notes on insns that can never throw or
+ make a nonlocal goto. */
;
else
{
--
2.35.3
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-28 17:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <62bae1fb.1c69fb81.b56b8.ca78SMTPIN_ADDED_MISSING@mx.google.com>
2022-06-28 16:09 ` [PATCH] rtl-optimization/106082 - preserve EH note for no non-local goto Jeff Law
[not found] <202206281111.25SBBvhG030417@gate.crashing.org>
2022-06-28 17:00 ` Segher Boessenkool
2022-06-28 11:11 Richard Biener
-- strict thread matches above, loose matches on Subject: below --
2022-06-28 11:11 Richard Biener
2022-06-28 11:11 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).