summaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-24 20:27:33 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-24 20:27:33 +0000
commit74855d080d0657185317ae63bac158040908c3fe (patch)
treeb6ddc9d79010428fd98fc997fa4e36e433e28267 /gcc/lra-constraints.c
parent6c4ccb7bca11fdd0ba462e36d013e80d040aa9ae (diff)
downloadgcc-74855d080d0657185317ae63bac158040908c3fe.tar.gz
2013-04-24 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimizations/57046 * lra-constraints (split_reg): Set up lra_risky_transformations_p for multi-reg splits. 2013-04-24 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimizations/57046 * gcc.target/i386/pr57046.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198263 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 24782dcdec7..d364ef3407f 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -4198,7 +4198,7 @@ split_reg (bool before_p, int original_regno, rtx insn, rtx next_usage_insns)
{
enum reg_class rclass;
rtx original_reg;
- int hard_regno;
+ int hard_regno, nregs;
rtx new_reg, save, restore, usage_insn;
bool after_p;
bool call_save_p;
@@ -4208,10 +4208,12 @@ split_reg (bool before_p, int original_regno, rtx insn, rtx next_usage_insns)
rclass = ira_allocno_class_translate[REGNO_REG_CLASS (original_regno)];
hard_regno = original_regno;
call_save_p = false;
+ nregs = 1;
}
else
{
hard_regno = reg_renumber[original_regno];
+ nregs = hard_regno_nregs[hard_regno][PSEUDO_REGNO_MODE (original_regno)];
rclass = lra_get_allocno_class (original_regno);
original_reg = regno_reg_rtx[original_regno];
call_save_p = need_for_call_save_p (original_regno);
@@ -4324,6 +4326,13 @@ split_reg (bool before_p, int original_regno, rtx insn, rtx next_usage_insns)
before_p ? NULL_RTX : save,
call_save_p
? "Add save<-reg" : "Add split<-reg");
+ if (nregs > 1)
+ /* If we are trying to split multi-register. We should check
+ conflicts on the next assignment sub-pass. IRA can allocate on
+ sub-register levels, LRA do this on pseudos level right now and
+ this discrepancy may create allocation conflicts after
+ splitting. */
+ lra_risky_transformations_p = true;
if (lra_dump_file != NULL)
fprintf (lra_dump_file,
" ))))))))))))))))))))))))))))))))))))))))))))))))\n");