aboutsummaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2017-01-15 18:06:00 +0100
committerSegher Boessenkool <segher@gcc.gnu.org>2017-01-15 18:06:00 +0100
commit81e63b637aef0fc61e85de64b2be62517723e606 (patch)
tree1bd78fae14e682601ecbd3eb3625b7ca3c4f44f5 /gcc/haifa-sched.c
parent32a8d3f66a4d02b77774a713e5c4ff8d586af4f4 (diff)
downloadgcc-81e63b637aef0fc61e85de64b2be62517723e606.zip
gcc-81e63b637aef0fc61e85de64b2be62517723e606.tar.gz
gcc-81e63b637aef0fc61e85de64b2be62517723e606.tar.bz2
Make rtl_split_edge work for jumps that fall through (PR72749)
If a jump always falls through but that cannot be optimised away, like is the case with the PowerPC bdnz insn if its jump target is the same as the fallthrough, sched gets confused if it schedules some instructions from before that jump instruction to behind it: it splits the fallthrough branch, but the jump target isn't updated, and things fall apart as in the PR. This patch fixes it. The second patch fragment makes -fsched-verbose=N work for N>=4; the currently scheduled fragment can now contain a label. Everything else seems to work fine with that. PR target/72749 * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the fallthrough. * haifa-sched.c (dump_insn_stream): Don't crash if there is a label in the currently scheduled RTL fragment. From-SVN: r244477
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 1b13e32..07de1bb 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -6495,7 +6495,7 @@ dump_insn_stream (rtx_insn *head, rtx_insn *tail)
if (sched_verbose >= 4)
{
- if (NOTE_P (insn) || recog_memoized (insn) < 0)
+ if (NOTE_P (insn) || LABEL_P (insn) || recog_memoized (insn) < 0)
fprintf (sched_dump, "nothing");
else
print_reservation (sched_dump, insn);