This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, rfc] combine: Make code after a new trap unreachable (PR78432)


On Mon, 2016-11-28 at 15:02 -0700, Jeff Law wrote:
> On 11/28/2016 03:00 PM, David Malcolm wrote:
> > On Mon, 2016-11-28 at 14:44 -0700, Jeff Law wrote:
> > > On 11/23/2016 04:55 PM, Segher Boessenkool wrote:
> > > > Combine can turn a conditional trap into an unconditional trap.
> > > >   If
> > > > it
> > > > does that it should make the code after it unreachable (an
> > > > unconditional
> > > > trap should be the last insn in its bb, and that bb has no
> > > > successors).
> > > > 
> > > > This patch seems to work.  It is hard to be sure, this is very
> > > > hard
> > > > to
> > > > trigger.  Quite a few other passes look like they need
> > > > something
> > > > similar
> > > > as well, but I don't see anything else handling it yet either.
> > > > 
> > > > How does this look?  Any better ideas?
> > > It's probably a reasonable place to start as there's lots of
> > > similarities to converting a conditional branch to an
> > > unconditional.
> > > Like you I worry there may be other instances of this issue may
> > > be
> > > lurking.
> > > 
> > > The possibility of having a conditional trap in the IL turn into
> > > an
> > > unconditional trap has always been there.  As you note, it's
> > > somewhat
> > > difficult to trigger since the SSA optimizers ought to
> > > expose/optimize
> > > this long before we get to RTL.
> > 
> > Could the RTL frontend be of use here?
> Maybe -- but only on targets where we have the right insns in the
> target 
> machine description.

Segher: it looks like the "PR78432" in the Subject line is a typo; that
bug number appears to relate to go-dump.c and is marked as RESOLVED
FIXED.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]