summaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-07 02:26:51 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-07 02:26:51 +0000
commitd3ff0f753948e4e595c6cf3d77ac1b05c655b464 (patch)
tree17de3bb34420626f8eab111aee34a18e3a1f275f /gcc/reload.c
parent0351a03252ba852c678fade3693ba70f6a75cdf4 (diff)
downloadgcc-d3ff0f753948e4e595c6cf3d77ac1b05c655b464.tar.gz
* 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/reload.c')
-rw-r--r--gcc/reload.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 7b9b669e09e..11e33f05fc8 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -5679,7 +5679,8 @@ find_reloads_subreg_address (x, force_replace, opnum, type,
Return the rtx that X translates into; usually X, but modified. */
void
-subst_reloads ()
+subst_reloads (insn)
+ rtx insn;
{
register int i;
@@ -5689,6 +5690,15 @@ subst_reloads ()
register rtx reloadreg = rld[r->what].reg_rtx;
if (reloadreg)
{
+ /* If we're replacing a LABEL_REF with a register, add a
+ REG_LABEL note to indicate to flow which label this
+ register refers to. */
+ if (GET_CODE (*r->where) == LABEL_REF
+ && GET_CODE (insn) == JUMP_INSN)
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL,
+ XEXP (*r->where, 0),
+ REG_NOTES (insn));
+
/* Encapsulate RELOADREG so its machine mode matches what
used to be there. Note that gen_lowpart_common will
do the wrong thing if RELOADREG is multi-word. RELOADREG