diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-07 02:26:51 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-07 02:26:51 +0000 |
commit | d3ff0f753948e4e595c6cf3d77ac1b05c655b464 (patch) | |
tree | 17de3bb34420626f8eab111aee34a18e3a1f275f /gcc/flow.c | |
parent | 0351a03252ba852c678fade3693ba70f6a75cdf4 (diff) | |
download | ppe42-gcc-d3ff0f753948e4e595c6cf3d77ac1b05c655b464.tar.gz ppe42-gcc-d3ff0f753948e4e595c6cf3d77ac1b05c655b464.zip |
* reload.c (subst_reloads): Take INSN argument. When
replacing a LABEL_REF in a JUMP_INSN, add a REG_LABEL note.
* reload.h (subst_reloads): Adjust prototype.
* reload1.c (reload_as_needed): Pass INSN to subst_reloads.
* jump.c (mark_all_labels): Canonicalize any REG_LABEL notes
present in JUMP_INSNs and copy them to JUMP_LABEL.
* flow.c (find_label_refs, find_basic_blocks_1): Skip
JUMP_INSNs and insns with REG_LABELs that are followed by
JUMP_INSNs with the same REG_LABEL.
* sched-rgn.c (is_cfg_nonregular): Likewise.
* rtlanal.c (computed_jump_p): Make it false if a REG_LABEL
note is available.
* unroll.c (unroll_loop): Look for REG_LABEL notes in
JUMP_INSNs too.
* rtl.texi (REG_LABEL): Document usage in JUMP_INSNs.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38755 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/gcc/flow.c b/gcc/flow.c index 5eaf116238f..a53043dc534 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -640,7 +640,7 @@ find_label_refs (f, lvl) rtx insn; for (insn = f; insn; insn = NEXT_INSN (insn)) - if (INSN_P (insn)) + if (INSN_P (insn) && GET_CODE (insn) != JUMP_INSN) { rtx note; @@ -651,7 +651,10 @@ find_label_refs (f, lvl) as this would be a part of the tablejump setup code. Make a special exception for the eh_return_stub_label, which - we know isn't part of any otherwise visible control flow. */ + we know isn't part of any otherwise visible control flow. + + Make a special exception to registers loaded with label + values just before jump insns that use them. */ for (note = REG_NOTES (insn); note; note = XEXP (note, 1)) if (REG_NOTE_KIND (note) == REG_LABEL) @@ -667,6 +670,9 @@ find_label_refs (f, lvl) ; else if (GET_CODE (lab) == NOTE) ; + else if (GET_CODE (NEXT_INSN (insn)) == JUMP_INSN + && find_reg_note (NEXT_INSN (insn), REG_LABEL, lab)) + ; else lvl = alloc_EXPR_LIST (0, XEXP (note, 0), lvl); } @@ -862,18 +868,21 @@ find_basic_blocks_1 (f) break; } - if (GET_RTX_CLASS (code) == 'i') + if (GET_RTX_CLASS (code) == 'i' + && GET_CODE (insn) != JUMP_INSN) { rtx note; - /* Make a list of all labels referred to other than by jumps - (which just don't have the REG_LABEL notes). + /* Make a list of all labels referred to other than by jumps. Make a special exception for labels followed by an ADDR*VEC, as this would be a part of the tablejump setup code. Make a special exception for the eh_return_stub_label, which - we know isn't part of any otherwise visible control flow. */ + we know isn't part of any otherwise visible control flow. + + Make a special exception to registers loaded with label + values just before jump insns that use them. */ for (note = REG_NOTES (insn); note; note = XEXP (note, 1)) if (REG_NOTE_KIND (note) == REG_LABEL) @@ -889,6 +898,9 @@ find_basic_blocks_1 (f) ; else if (GET_CODE (lab) == NOTE) ; + else if (GET_CODE (NEXT_INSN (insn)) == JUMP_INSN + && find_reg_note (NEXT_INSN (insn), REG_LABEL, lab)) + ; else lvl = alloc_EXPR_LIST (0, XEXP (note, 0), lvl); } |