Commit 5eb2a9f2 by Richard Sandiford Committed by Richard Sandiford

emit-rtl.c (reset_used_decls): Rename to...

gcc/
	* emit-rtl.c (reset_used_decls): Rename to...
	(set_used_decls): ...this.  Set the used flag rather than clearing it.
	(unshare_all_rtl_again): Update accordingly.  Set flags on argument
	DECL_RTLs rather than resetting them.

From-SVN: r127153
parent a15da80d
2007-08-02 Richard Sandiford <richard@codesourcery.com>
* emit-rtl.c (reset_used_decls): Rename to...
(set_used_decls): ...this. Set the used flag rather than clearing it.
(unshare_all_rtl_again): Update accordingly. Set flags on argument
DECL_RTLs rather than resetting them.
2007-08-02 Andreas Krebbel <krebbel1@de.ibm.com> 2007-08-02 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.md ("*xordi3_cconly"): Change xr to xg. * config/s390/s390.md ("*xordi3_cconly"): Change xr to xg.
......
...@@ -167,7 +167,7 @@ static GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def))) ...@@ -167,7 +167,7 @@ static GTY ((if_marked ("ggc_marked_p"), param_is (struct rtx_def)))
static rtx make_call_insn_raw (rtx); static rtx make_call_insn_raw (rtx);
static rtx change_address_1 (rtx, enum machine_mode, rtx, int); static rtx change_address_1 (rtx, enum machine_mode, rtx, int);
static void reset_used_decls (tree); static void set_used_decls (tree);
static void mark_label_nuses (rtx); static void mark_label_nuses (rtx);
static hashval_t const_int_htab_hash (const void *); static hashval_t const_int_htab_hash (const void *);
static int const_int_htab_eq (const void *, const void *); static int const_int_htab_eq (const void *, const void *);
...@@ -2160,11 +2160,11 @@ unshare_all_rtl_again (rtx insn) ...@@ -2160,11 +2160,11 @@ unshare_all_rtl_again (rtx insn)
} }
/* Make sure that virtual stack slots are not shared. */ /* Make sure that virtual stack slots are not shared. */
reset_used_decls (DECL_INITIAL (cfun->decl)); set_used_decls (DECL_INITIAL (cfun->decl));
/* Make sure that virtual parameters are not shared. */ /* Make sure that virtual parameters are not shared. */
for (decl = DECL_ARGUMENTS (cfun->decl); decl; decl = TREE_CHAIN (decl)) for (decl = DECL_ARGUMENTS (cfun->decl); decl; decl = TREE_CHAIN (decl))
reset_used_flags (DECL_RTL (decl)); set_used_flags (DECL_RTL (decl));
reset_used_flags (stack_slot_list); reset_used_flags (stack_slot_list);
...@@ -2353,20 +2353,28 @@ unshare_all_rtl_in_chain (rtx insn) ...@@ -2353,20 +2353,28 @@ unshare_all_rtl_in_chain (rtx insn)
} }
/* Go through all virtual stack slots of a function and mark them as /* Go through all virtual stack slots of a function and mark them as
not shared. */ shared. We never replace the DECL_RTLs themselves with a copy,
but expressions mentioned into a DECL_RTL cannot be shared with
expressions in the instruction stream.
Note that reload may convert pseudo registers into memories in-place.
Pseudo registers are always shared, but MEMs never are. Thus if we
reset the used flags on MEMs in the instruction stream, we must set
them again on MEMs that appear in DECL_RTLs. */
static void static void
reset_used_decls (tree blk) set_used_decls (tree blk)
{ {
tree t; tree t;
/* Mark decls. */ /* Mark decls. */
for (t = BLOCK_VARS (blk); t; t = TREE_CHAIN (t)) for (t = BLOCK_VARS (blk); t; t = TREE_CHAIN (t))
if (DECL_RTL_SET_P (t)) if (DECL_RTL_SET_P (t))
reset_used_flags (DECL_RTL (t)); set_used_flags (DECL_RTL (t));
/* Now process sub-blocks. */ /* Now process sub-blocks. */
for (t = BLOCK_SUBBLOCKS (blk); t; t = TREE_CHAIN (t)) for (t = BLOCK_SUBBLOCKS (blk); t; t = TREE_CHAIN (t))
reset_used_decls (t); set_used_decls (t);
} }
/* Mark ORIG as in use, and return a copy of it if it was already in use. /* Mark ORIG as in use, and return a copy of it if it was already in use.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment