summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-15 21:13:22 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-15 21:13:22 +0000
commit32210de3e4bf1d9226469d25642d2a65cef7cff9 (patch)
tree4879a7b1e5a6af58d58ec62a0119d2a85cd01d3b /llvm/lib/CodeGen/SplitKit.cpp
parent920139ca08187ef9f45acb89ce2a42616ca823e5 (diff)
downloadbcm5719-llvm-32210de3e4bf1d9226469d25642d2a65cef7cff9.tar.gz
bcm5719-llvm-32210de3e4bf1d9226469d25642d2a65cef7cff9.zip
Preserve both isPHIDef and isDefByCopy bits when copying parent values.
llvm-svn: 127697
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
-rw-r--r--llvm/lib/CodeGen/SplitKit.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp
index 99d05fa6558..9c1f75c42a0 100644
--- a/llvm/lib/CodeGen/SplitKit.cpp
+++ b/llvm/lib/CodeGen/SplitKit.cpp
@@ -274,10 +274,6 @@ VNInfo *SplitEditor::defValue(unsigned RegIdx,
// 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 @@ void SplitEditor::finish() {
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))
OpenPOWER on IntegriCloud