Page MenuHomePhabricator

D68154.diff
No OneTemporary

File Metadata

Created
Thu, Dec 12, 10:53 AM

D68154.diff

Index: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp
@@ -199,6 +199,7 @@
INITIALIZE_PASS_BEGIN(MachineScheduler, DEBUG_TYPE,
"Machine Instruction Scheduler", false, false)
INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
+INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
INITIALIZE_PASS_DEPENDENCY(SlotIndexes)
INITIALIZE_PASS_DEPENDENCY(LiveIntervals)
@@ -211,7 +212,7 @@
void MachineScheduler::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
- AU.addRequiredID(MachineDominatorsID);
+ AU.addRequired<MachineDominatorTree>();
AU.addRequired<MachineLoopInfo>();
AU.addRequired<AAResultsWrapperPass>();
AU.addRequired<TargetPassConfig>();
@@ -235,7 +236,7 @@
void PostMachineScheduler::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
- AU.addRequiredID(MachineDominatorsID);
+ AU.addRequired<MachineDominatorTree>();
AU.addRequired<MachineLoopInfo>();
AU.addRequired<TargetPassConfig>();
MachineFunctionPass::getAnalysisUsage(AU);
Index: llvm/trunk/lib/CodeGen/PHIElimination.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/PHIElimination.cpp
+++ llvm/trunk/lib/CodeGen/PHIElimination.cpp
@@ -185,6 +185,11 @@
MF.DeleteMachineInstr(I.first);
}
+ // TODO: we should use the incremental DomTree updater here.
+ if (Changed)
+ if (auto *MDT = getAnalysisIfAvailable<MachineDominatorTree>())
+ MDT->getBase().recalculate(MF);
+
LoweredPHIs.clear();
ImpDefs.clear();
VRegPHIUseCount.clear();

Event Timeline