Oops. Scary.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 6 Apr 2011 04:07:14 +0000 (04:07 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 6 Apr 2011 04:07:14 +0000 (04:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128986 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocGreedy.cpp

index 689e5c906666f7bb938f91f074b690f5ccd56994..4339a81b8f4789ff7d43eec46ad228510356716b 100644 (file)
@@ -463,7 +463,7 @@ float RAGreedy::calcSplitConstraints(unsigned PhysReg) {
   ArrayRef<unsigned> ThroughBlocks = SA->getThroughBlocks();
   SplitConstraints.resize(UseBlocks.size() + ThroughBlocks.size());
   for (unsigned i = 0; i != ThroughBlocks.size(); ++i) {
-    SpillPlacement::BlockConstraint BC = SplitConstraints[UseBlocks.size() + i];
+    SpillPlacement::BlockConstraint &BC = SplitConstraints[UseBlocks.size()+i];
     BC.Number = ThroughBlocks[i];
     BC.Entry = SpillPlacement::DontCare;
     BC.Exit = SpillPlacement::DontCare;