Handle casesi dispatch tablejumps in create_trace_edges (as well)
authorOlivier Hainque <hainque@adacore.com>
Tue, 13 Aug 2019 11:04:52 +0000 (11:04 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Tue, 13 Aug 2019 11:04:52 +0000 (11:04 +0000)
commit3010ee5514a16902c1c31fd8afbbd0285d0134c0
treea86ebb4ea1de27932e3f5b6d6b3446334d6e4f1e
parentfb802d91461a2d65e9618abb6298c6ca7d39e7d7
Handle casesi dispatch tablejumps in create_trace_edges (as well)

* 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.

From-SVN: r274377
gcc/ChangeLog
gcc/cfgrtl.c
gcc/dwarf2cfi.c
gcc/rtl.h
gcc/rtlanal.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/casesi.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/casesi.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/test_casesi.adb [new file with mode: 0644]