diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1996-03-11 10:12:30 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1996-03-11 10:12:30 -0800 |
commit | 9740123d5c5e2fd32c7413dd9bdbdabdbb6b07b2 (patch) | |
tree | 2a53ff3f2d6ce490d198c0c9e372b9b4f35979bf | |
parent | 8319988283e6855de0b07f30c76c2bb06f583ee8 (diff) | |
download | gcc-9740123d5c5e2fd32c7413dd9bdbdabdbb6b07b2.zip gcc-9740123d5c5e2fd32c7413dd9bdbdabdbb6b07b2.tar.gz gcc-9740123d5c5e2fd32c7413dd9bdbdabdbb6b07b2.tar.bz2 |
(jump_optimize): When handle a USE insn before an unconditional jump...
(jump_optimize): When handle a USE insn before an
unconditional jump, disable the optimization if the USE is the
only insn in the loop.
From-SVN: r11512
-rw-r--r-- | gcc/jump.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -682,7 +682,15 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan) && (temp1 = prev_nonnote_insn (JUMP_LABEL (insn))) != 0 && (GET_CODE (temp1) == BARRIER || (GET_CODE (temp1) == INSN - && rtx_equal_p (PATTERN (temp), PATTERN (temp1))))) + && rtx_equal_p (PATTERN (temp), PATTERN (temp1)))) + /* Don't do this optimization if we have a loop containing only + the USE instruction, and the loop start label has a usage + count of 1. This is because we will redo this optimization + everytime through the outer loop, and jump opt will never + exit. */ + && ! ((temp2 = prev_nonnote_insn (temp)) != 0 + && temp2 == JUMP_LABEL (insn) + && LABEL_NUSES (temp2) == 1)) { if (GET_CODE (temp1) == BARRIER) { |