diff options
author | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-28 20:02:59 +0000 |
---|---|---|
committer | vmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-28 20:02:59 +0000 |
commit | ae72d5b2c7868a590a3744b48c92d85c2e4bc093 (patch) | |
tree | 888f79b5020c2fcd4c6a06b52d30340a3f6cfc2c /gcc/lra-spills.c | |
parent | 091c59758fdda61f8fed4fad6f3b61b08bdbb29c (diff) | |
download | gcc-ae72d5b2c7868a590a3744b48c92d85c2e4bc093.tar.gz |
2012-10-28 Vladimir Makarov <vmakarov@redhat.com>
* rtl.h (struct rtx_def): Add a comment for member unchanging.
* lra-int.h (LRA_TEMP_CLOBBER_P): New macro.
(lra_hard_reg_substitution): Rename to lra_final_code_change.
* lra-constraints.c (match_reload): Mark temporary clobbers.
* lra-spill.c (lra_hard_reg_substitution): Rename to
lra_final_code_change. Remove temporary clobbers.
* lra.c (lra): Rename to lra_final_code_change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192897 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-spills.c')
-rw-r--r-- | gcc/lra-spills.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/lra-spills.c b/gcc/lra-spills.c index 8ff91d81139..af21c480f77 100644 --- a/gcc/lra-spills.c +++ b/gcc/lra-spills.c @@ -614,13 +614,13 @@ alter_subregs (rtx *loc, bool final_p) } /* Final change of pseudos got hard registers into the corresponding - hard registers. */ + hard registers and removing temporary clobbers. */ void -lra_hard_reg_substitution (void) +lra_final_code_change (void) { int i, hard_regno; basic_block bb; - rtx insn; + rtx insn, curr; int max_regno = max_reg_num (); for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++) @@ -628,9 +628,21 @@ lra_hard_reg_substitution (void) && (hard_regno = lra_get_regno_hard_regno (i)) >= 0) SET_REGNO (regno_reg_rtx[i], hard_regno); FOR_EACH_BB (bb) - FOR_BB_INSNS (bb, insn) + FOR_BB_INSNS_SAFE (bb, insn, curr) if (INSN_P (insn)) { + rtx pat = PATTERN (insn); + + if (GET_CODE (pat) == CLOBBER && LRA_TEMP_CLOBBER_P (pat)) + { + /* Remove clobbers temporarily created in LRA. We don't + need them anymore and don't want to waste compiler + time processing them in a few subsequent passes. */ + lra_invalidate_insn_data (insn); + remove_insn (insn); + continue; + } + lra_insn_recog_data_t id = lra_get_insn_recog_data (insn); bool insn_change_p = false; |