diff options
author | Olivier Hainque <hainque@adacore.com> | 2019-08-13 11:04:52 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2019-08-13 11:04:52 +0000 |
commit | 3010ee5514a16902c1c31fd8afbbd0285d0134c0 (patch) | |
tree | a86ebb4ea1de27932e3f5b6d6b3446334d6e4f1e /gcc/dwarf2cfi.c | |
parent | fb802d91461a2d65e9618abb6298c6ca7d39e7d7 (diff) | |
download | gcc-3010ee5514a16902c1c31fd8afbbd0285d0134c0.zip gcc-3010ee5514a16902c1c31fd8afbbd0285d0134c0.tar.gz gcc-3010ee5514a16902c1c31fd8afbbd0285d0134c0.tar.bz2 |
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
Diffstat (limited to 'gcc/dwarf2cfi.c')
-rw-r--r-- | gcc/dwarf2cfi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index d6aed35..95ba0f7 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -2445,6 +2445,13 @@ create_trace_edges (rtx_insn *insn) rtx_insn *lab = as_a <rtx_insn *> (XEXP (RTVEC_ELT (vec, i), 0)); maybe_record_trace_start (lab, insn); } + + /* Handle casesi dispatch insns. */ + if ((tmp = tablejump_casesi_pattern (insn)) != NULL_RTX) + { + rtx_insn * lab = label_ref_label (XEXP (SET_SRC (tmp), 2)); + maybe_record_trace_start (lab, insn); + } } else if (computed_jump_p (insn)) { |