[llvm-commits] [llvm] r127697 - /llvm/trunk/lib/CodeGen/SplitKit.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Mar 15 14:13:22 PDT 2011
Author: stoklund
Date: Tue Mar 15 16:13:22 2011
New Revision: 127697
URL: http://llvm.org/viewvc/llvm-project?rev=127697&view=rev
Log:
Preserve both isPHIDef and isDefByCopy bits when copying parent values.
Modified:
llvm/trunk/lib/CodeGen/SplitKit.cpp
Modified: llvm/trunk/lib/CodeGen/SplitKit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SplitKit.cpp?rev=127697&r1=127696&r2=127697&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SplitKit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SplitKit.cpp Tue Mar 15 16:13:22 2011
@@ -274,10 +274,6 @@
// Create a new value.
VNInfo *VNI = LI->getNextValue(Idx, 0, LIS.getVNInfoAllocator());
- // Preserve the PHIDef bit.
- if (ParentVNI->isPHIDef() && Idx == ParentVNI->def)
- VNI->setIsPHIDef(true);
-
// Use insert for lookup, so we can add missing values with a second lookup.
std::pair<ValueMap::iterator, bool> InsP =
Values.insert(std::make_pair(std::make_pair(RegIdx, ParentVNI->id), VNI));
@@ -845,7 +841,10 @@
if (ParentVNI->isUnused())
continue;
unsigned RegIdx = RegAssign.lookup(ParentVNI->def);
- defValue(RegIdx, ParentVNI, ParentVNI->def);
+ VNInfo *VNI = defValue(RegIdx, ParentVNI, ParentVNI->def);
+ VNI->setIsPHIDef(ParentVNI->isPHIDef());
+ VNI->setCopy(ParentVNI->getCopy());
+
// Mark rematted values as complex everywhere to force liveness computation.
// The new live ranges may be truncated.
if (Edit->didRematerialize(ParentVNI))
More information about the llvm-commits
mailing list