diff options
author | Lang Hames <lhames@gmail.com> | 2009-12-22 00:11:50 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2009-12-22 00:11:50 +0000 |
commit | 74ab5eeffbd70f2387338e3ee8195be9f73e6dd8 (patch) | |
tree | 69244a4a36283b0db2934bf3526a92ff6a44b9ae /lib/CodeGen/CalcSpillWeights.cpp | |
parent | 87710f04e551655c0c98fb7c0bfd9ec58224a804 (diff) |
Changed slot index ranges for MachineBasicBlocks to be exclusive of endpoint.
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91859 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CalcSpillWeights.cpp')
-rw-r--r-- | lib/CodeGen/CalcSpillWeights.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CalcSpillWeights.cpp b/lib/CodeGen/CalcSpillWeights.cpp index dcffb8a247..a7e798e0ba 100644 --- a/lib/CodeGen/CalcSpillWeights.cpp +++ b/lib/CodeGen/CalcSpillWeights.cpp @@ -95,7 +95,7 @@ bool CalculateSpillWeights::runOnMachineFunction(MachineFunction &fn) { SlotIndex defIdx = lis->getInstructionIndex(mi).getDefIndex(); const LiveRange *dlr = lis->getInterval(reg).getLiveRangeContaining(defIdx); - if (dlr->end > mbbEnd) + if (dlr->end >= mbbEnd) weight *= 3.0F; } regInt.weight += weight; |