mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Preserve both isPHIDef and isDefByCopy bits when copying parent values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ea2649fda
commit
29ef87599c
@ -274,10 +274,6 @@ VNInfo *SplitEditor::defValue(unsigned RegIdx,
|
|||||||
// Create a new value.
|
// Create a new value.
|
||||||
VNInfo *VNI = LI->getNextValue(Idx, 0, LIS.getVNInfoAllocator());
|
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.
|
// Use insert for lookup, so we can add missing values with a second lookup.
|
||||||
std::pair<ValueMap::iterator, bool> InsP =
|
std::pair<ValueMap::iterator, bool> InsP =
|
||||||
Values.insert(std::make_pair(std::make_pair(RegIdx, ParentVNI->id), VNI));
|
Values.insert(std::make_pair(std::make_pair(RegIdx, ParentVNI->id), VNI));
|
||||||
@ -845,7 +841,10 @@ void SplitEditor::finish() {
|
|||||||
if (ParentVNI->isUnused())
|
if (ParentVNI->isUnused())
|
||||||
continue;
|
continue;
|
||||||
unsigned RegIdx = RegAssign.lookup(ParentVNI->def);
|
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.
|
// Mark rematted values as complex everywhere to force liveness computation.
|
||||||
// The new live ranges may be truncated.
|
// The new live ranges may be truncated.
|
||||||
if (Edit->didRematerialize(ParentVNI))
|
if (Edit->didRematerialize(ParentVNI))
|
||||||
|
Loading…
Reference in New Issue
Block a user