diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-15 04:37:18 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-09-15 04:37:18 +0000 |
| commit | e7ca8ecd9294f4b9d5450db2654bd9a7a76d4c77 (patch) | |
| tree | fd6ee4d0df05cf5315c79b59cc6e63ccc1239243 /llvm/lib/CodeGen/LiveInterval.cpp | |
| parent | 34368124aae9cf91016fbba03af0cc20915b4e9c (diff) | |
| download | bcm5719-llvm-e7ca8ecd9294f4b9d5450db2654bd9a7a76d4c77.tar.gz bcm5719-llvm-e7ca8ecd9294f4b9d5450db2654bd9a7a76d4c77.zip | |
Leave hasPHIKill flags alone in LiveInterval::RenumberValues.
It is conservatively correct to keep the hasPHIKill flags, even after
deleting PHI-defs.
The calculation can be very expensive after taildup has created a
quadratic number of indirectbr edges in the CFG, and the hasPHIKill flag
isn't used for anything after RenumberValues().
llvm-svn: 139780
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LiveInterval.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index 2f787f3b408..b69945aea98 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/lib/CodeGen/LiveInterval.cpp @@ -148,7 +148,6 @@ void LiveInterval::markValNoForDeletion(VNInfo *ValNo) { /// remaining unused values. void LiveInterval::RenumberValues(LiveIntervals &lis) { SmallPtrSet<VNInfo*, 8> Seen; - bool seenPHIDef = false; valnos.clear(); for (const_iterator I = begin(), E = end(); I != E; ++I) { VNInfo *VNI = I->valno; @@ -157,26 +156,6 @@ void LiveInterval::RenumberValues(LiveIntervals &lis) { assert(!VNI->isUnused() && "Unused valno used by live range"); VNI->id = (unsigned)valnos.size(); valnos.push_back(VNI); - VNI->setHasPHIKill(false); - if (VNI->isPHIDef()) - seenPHIDef = true; - } - - // Recompute phi kill flags. - if (!seenPHIDef) - return; - for (const_vni_iterator I = vni_begin(), E = vni_end(); I != E; ++I) { - VNInfo *VNI = *I; - if (!VNI->isPHIDef()) - continue; - const MachineBasicBlock *PHIBB = lis.getMBBFromIndex(VNI->def); - assert(PHIBB && "No basic block for phi-def"); - for (MachineBasicBlock::const_pred_iterator PI = PHIBB->pred_begin(), - PE = PHIBB->pred_end(); PI != PE; ++PI) { - VNInfo *KVNI = getVNInfoAt(lis.getMBBEndIdx(*PI).getPrevSlot()); - if (KVNI) - KVNI->setHasPHIKill(true); - } } } |

