[PATCH] D68154: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 11:27:45 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL373377: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination (authored by kuhar, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D68154?vs=222435&id=222660#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68154/new/
https://reviews.llvm.org/D68154
Files:
llvm/trunk/lib/CodeGen/MachineScheduler.cpp
llvm/trunk/lib/CodeGen/PHIElimination.cpp
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();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68154.222660.patch
Type: text/x-patch
Size: 1770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191001/64587910/attachment.bin>
More information about the llvm-commits
mailing list