[patch] handle casesi dispatch insns in create_trace_edges

Olivier Hainque hainque@adacore.com
Tue Aug 13 11:27:00 GMT 2019


Hi Jeff,

> On 12 Aug 2019, at 16:48, Jeff Law <law@redhat.com> wrote:

> I think part of the reason I settled on rtl.c was because we're not
> really just looking at the form, not doing any real "analysis".  BUt I
> think either location for the implementation is fine.

The reference to pc_rtx and to single_set turned out
problematic in rtl.c, as they end up unresolved in helpers
such as genpreds.

I didn't want to start messing with those so I have finally
sticked the definition in rtlanal, next to tablejump_p.

This is rev 274377, ChangeLog below and patch attached for
the list records. rev 274378 follows to fix the placement of
the prototype in rtl.h, very minor.

Thanks again for your feedback,

With Kind Regards,

Olivier

2019-08-13  Olivier Hainque  <hainque@adacore.com>

        * rtlanal.c (tablejump_casesi_pattern): New function, to
        determine if a tablejump insn is a casesi dispatcher. Extracted
        from patch_jump_insn.
        * rtl.h (tablejump_casesi_pattern): Declare.
        * cfgrtl.c (patch_jump_insn): Use it.
        * dwarf2cfi.c (create_trace_edges): Use it.
    
    testsuite/
    
        * gnat.dg/casesi.ad[bs], test_casesi.adb: New test.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: casesi.diff
Type: application/octet-stream
Size: 3960 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190813/e720c9ac/attachment.obj>


More information about the Gcc-patches mailing list