diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-07-09 09:11:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 09:11:18 +0800 |
commit | 79d0de2ac37b6b7d66720611935d1dd7fc4fbd43 (patch) | |
tree | 27fc88539708d84f03ca11a890551780e33a5f2c /llvm/lib/CodeGen/RegAllocBasic.cpp | |
parent | afa6bed8afe9011c07c682a0a24362260d92cfdd (diff) | |
download | llvm-79d0de2ac37b6b7d66720611935d1dd7fc4fbd43.zip llvm-79d0de2ac37b6b7d66720611935d1dd7fc4fbd43.tar.gz llvm-79d0de2ac37b6b7d66720611935d1dd7fc4fbd43.tar.bz2 |
[CodeGen][NewPM] Port `machine-loops` to new pass manager (#97793)
- Add `MachineLoopAnalysis`.
- Add `MachineLoopPrinterPass`.
- Convert to `MachineLoopInfoWrapperPass` in legacy pass manager.
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBasic.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp index f465c63..2062334 100644 --- a/llvm/lib/CodeGen/RegAllocBasic.cpp +++ b/llvm/lib/CodeGen/RegAllocBasic.cpp @@ -137,7 +137,7 @@ INITIALIZE_PASS_DEPENDENCY(MachineScheduler) INITIALIZE_PASS_DEPENDENCY(LiveStacks) INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass) INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass) -INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo) +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass) INITIALIZE_PASS_DEPENDENCY(VirtRegMap) INITIALIZE_PASS_DEPENDENCY(LiveRegMatrix) INITIALIZE_PASS_END(RABasic, "regallocbasic", "Basic Register Allocator", false, @@ -188,8 +188,8 @@ void RABasic::getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreserved<MachineBlockFrequencyInfo>(); AU.addRequiredID(MachineDominatorsID); AU.addPreservedID(MachineDominatorsID); - AU.addRequired<MachineLoopInfo>(); - AU.addPreserved<MachineLoopInfo>(); + AU.addRequired<MachineLoopInfoWrapperPass>(); + AU.addPreserved<MachineLoopInfoWrapperPass>(); AU.addRequired<VirtRegMap>(); AU.addPreserved<VirtRegMap>(); AU.addRequired<LiveRegMatrix>(); @@ -312,7 +312,8 @@ bool RABasic::runOnMachineFunction(MachineFunction &mf) { RegAllocBase::init(getAnalysis<VirtRegMap>(), getAnalysis<LiveIntervals>(), getAnalysis<LiveRegMatrix>()); - VirtRegAuxInfo VRAI(*MF, *LIS, *VRM, getAnalysis<MachineLoopInfo>(), + VirtRegAuxInfo VRAI(*MF, *LIS, *VRM, + getAnalysis<MachineLoopInfoWrapperPass>().getLI(), getAnalysis<MachineBlockFrequencyInfo>()); VRAI.calculateSpillWeightsAndHints(); |