diff options
| author | Owen Anderson <resistor@mac.com> | 2009-03-26 18:53:38 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-03-26 18:53:38 +0000 |
| commit | 76a561f35e0c35fce4500602abb532550fca88eb (patch) | |
| tree | bb95f1cbeef616d1822eb88106f95bd30c157d21 /llvm/lib/CodeGen | |
| parent | adf511c0562f771503032f8653278d72610c11f4 (diff) | |
| download | bcm5719-llvm-76a561f35e0c35fce4500602abb532550fca88eb.tar.gz bcm5719-llvm-76a561f35e0c35fce4500602abb532550fca88eb.zip | |
Don't assign a new stack slot if the pre-alloc splitter already assigned one.
llvm-svn: 67764
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index cd6f81c6eb2..8c7fa1b1ac2 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -1973,8 +1973,15 @@ addIntervalsForSpills(const LiveInterval &li, } // One stack slot per live interval. - if (NeedStackSlot && vrm.getPreSplitReg(li.reg) == 0) - Slot = vrm.assignVirt2StackSlot(li.reg); + if (NeedStackSlot && vrm.getPreSplitReg(li.reg) == 0) { + if (vrm.getStackSlot(li.reg) == VirtRegMap::NO_STACK_SLOT) + Slot = vrm.assignVirt2StackSlot(li.reg); + + // This case only occurs when the prealloc splitter has already assigned + // a stack slot to this vreg. + else + Slot = vrm.getStackSlot(li.reg); + } // Create new intervals and rewrite defs and uses. for (LiveInterval::Ranges::const_iterator |

