diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-07-27 21:11:14 +0000 | 
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-07-27 21:11:14 +0000 | 
| commit | 97e14e02f11a73c2705ac0cd8388b77fed59fc33 (patch) | |
| tree | 70b9fd4595150fd07f14338dc6fec8fe4c63e704 /llvm/lib/CodeGen | |
| parent | 4021a7bf2582ba6b51d5d107feb3a809cc33d81d (diff) | |
| download | bcm5719-llvm-97e14e02f11a73c2705ac0cd8388b77fed59fc33.tar.gz bcm5719-llvm-97e14e02f11a73c2705ac0cd8388b77fed59fc33.zip | |
Eliminate the IS_PHI_DEF flag and VNInfo::setIsPHIDef().
A value number is a PHI def if and only if it begins at a block
boundary. This can be derived from the def slot, a separate flag is not
necessary.
llvm-svn: 160893
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 1 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/LiveRangeCalc.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SplitKit.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/StrongPHIElimination.cpp | 2 | 
4 files changed, 2 insertions, 8 deletions
| diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index bc0ec157f62..c58b8d778ca 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -290,7 +290,6 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock *mbb,          assert(getInstructionFromIndex(Start) == 0 &&                 "PHI def index points at actual instruction.");          ValNo = interval.getNextValue(Start, VNInfoAllocator); -        ValNo->setIsPHIDef(true);        }        LiveRange LR(Start, killIdx, ValNo);        interval.addRange(LR); diff --git a/llvm/lib/CodeGen/LiveRangeCalc.cpp b/llvm/lib/CodeGen/LiveRangeCalc.cpp index 9384075ece9..d828f25932e 100644 --- a/llvm/lib/CodeGen/LiveRangeCalc.cpp +++ b/llvm/lib/CodeGen/LiveRangeCalc.cpp @@ -54,8 +54,7 @@ void LiveRangeCalc::createDeadDefs(LiveInterval *LI, unsigned Reg) {          .getRegSlot(I.getOperand().isEarlyClobber());      // Create the def in LI. This may find an existing def. -    VNInfo *VNI = LI->createDeadDef(Idx, *Alloc); -    VNI->setIsPHIDef(MI->isPHI()); +    LI->createDeadDef(Idx, *Alloc);    }  } @@ -320,7 +319,6 @@ void LiveRangeCalc::updateSSA() {          SlotIndex Start, End;          tie(Start, End) = Indexes->getMBBRange(MBB);          VNInfo *VNI = I->LI->getNextValue(Start, *Alloc); -        VNI->setIsPHIDef(true);          I->Value = VNI;          // This block is done, we know the final value.          I->DomNode = 0; diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index 9a751c13b52..98ed2cf12fc 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/lib/CodeGen/SplitKit.cpp @@ -1047,8 +1047,7 @@ void SplitEditor::finish(SmallVectorImpl<unsigned> *LRMap) {      if (ParentVNI->isUnused())        continue;      unsigned RegIdx = RegAssign.lookup(ParentVNI->def); -    VNInfo *VNI = defValue(RegIdx, ParentVNI, ParentVNI->def); -    VNI->setIsPHIDef(ParentVNI->isPHIDef()); +    defValue(RegIdx, ParentVNI, ParentVNI->def);      // Force rematted values to be recomputed everywhere.      // The new live ranges may be truncated. diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp index c6fdc738243..389dc973ac2 100644 --- a/llvm/lib/CodeGen/StrongPHIElimination.cpp +++ b/llvm/lib/CodeGen/StrongPHIElimination.cpp @@ -744,7 +744,6 @@ void StrongPHIElimination::InsertCopiesForPHI(MachineInstr *PHI,      SlotIndex PHIIndex = LI->getInstructionIndex(PHI);      VNInfo *DestVNI = DestLI.getVNInfoAt(PHIIndex.getRegSlot());      assert(DestVNI); -    DestVNI->setIsPHIDef(true);      // Prior to PHI elimination, the live ranges of PHIs begin at their defining      // instruction. After PHI elimination, PHI instructions are replaced by VNs @@ -777,7 +776,6 @@ void StrongPHIElimination::InsertCopiesForPHI(MachineInstr *PHI,    SlotIndex DestCopyIndex = LI->getInstructionIndex(CopyInstr);    VNInfo *CopyVNI = CopyLI.getNextValue(MBBStartIndex,                                          LI->getVNInfoAllocator()); -  CopyVNI->setIsPHIDef(true);    CopyLI.addRange(LiveRange(MBBStartIndex,                              DestCopyIndex.getRegSlot(),                              CopyVNI)); | 

