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/MachineTraceMetrics.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/MachineTraceMetrics.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineTraceMetrics.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineTraceMetrics.cpp b/llvm/lib/CodeGen/MachineTraceMetrics.cpp index 0f44777..bf3add0 100644 --- a/llvm/lib/CodeGen/MachineTraceMetrics.cpp +++ b/llvm/lib/CodeGen/MachineTraceMetrics.cpp @@ -47,7 +47,7 @@ char &llvm::MachineTraceMetricsID = MachineTraceMetrics::ID; INITIALIZE_PASS_BEGIN(MachineTraceMetrics, DEBUG_TYPE, "Machine Trace Metrics", false, true) INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfoWrapperPass) -INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo) +INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass) INITIALIZE_PASS_END(MachineTraceMetrics, DEBUG_TYPE, "Machine Trace Metrics", false, true) @@ -58,7 +58,7 @@ MachineTraceMetrics::MachineTraceMetrics() : MachineFunctionPass(ID) { void MachineTraceMetrics::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<MachineBranchProbabilityInfoWrapperPass>(); - AU.addRequired<MachineLoopInfo>(); + AU.addRequired<MachineLoopInfoWrapperPass>(); MachineFunctionPass::getAnalysisUsage(AU); } @@ -68,7 +68,7 @@ bool MachineTraceMetrics::runOnMachineFunction(MachineFunction &Func) { TII = ST.getInstrInfo(); TRI = ST.getRegisterInfo(); MRI = &MF->getRegInfo(); - Loops = &getAnalysis<MachineLoopInfo>(); + Loops = &getAnalysis<MachineLoopInfoWrapperPass>().getLI(); SchedModel.init(&ST); BlockInfo.resize(MF->getNumBlockIDs()); ProcReleaseAtCycles.resize(MF->getNumBlockIDs() * |