Hi Jeff, > On 12 Aug 2019, at 16:48, Jeff Law <l...@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 <hain...@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.
casesi.diff
Description: Binary data