Oops. Don't normalize spill weights twice.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 3 Aug 2010 17:21:16 +0000 (17:21 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 3 Aug 2010 17:21:16 +0000 (17:21 +0000)
When the normalizeSpillWeights function was introduced, I forgot to remove this
normalization.

This change could affect register allocation. Hopefully for the better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110119 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveIntervalAnalysis.cpp

index 67968b3525bccf2b9d7015483d47c87b21413512..a6dc33665198b8968dfd15c4b706e84064e4b82c 100644 (file)
@@ -1855,7 +1855,6 @@ addIntervalsForSpills(const LiveInterval &li,
   for (unsigned i = 0, e = NewLIs.size(); i != e; ++i) {
     LiveInterval *LI = NewLIs[i];
     if (!LI->empty()) {
-      LI->weight /= SlotIndex::NUM * getApproximateInstructionCount(*LI);
       if (!AddedKill.count(LI)) {
         LiveRange *LR = &LI->ranges[LI->ranges.size()-1];
         SlotIndex LastUseIdx = LR->end.getBaseIndex();