diff options
author | paperchalice <liujunchang97@outlook.com> | 2024-07-09 12:09:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-09 12:09:11 +0800 |
commit | 4010f894a1e880f88bda78a49a8bece5affaa848 (patch) | |
tree | 83f51560dea01462d67f68c9c4ff30045e69b891 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 87d58ab22af0627b2c90138713c19b5263b6c132 (diff) | |
download | llvm-4010f894a1e880f88bda78a49a8bece5affaa848.zip llvm-4010f894a1e880f88bda78a49a8bece5affaa848.tar.gz llvm-4010f894a1e880f88bda78a49a8bece5affaa848.tar.bz2 |
[CodeGen][NewPM] Port `SlotIndexes` to new pass manager (#97941)
- Add `SlotIndexesAnalysis`.
- Add `SlotIndexesPrinterPass`.
- Use `SlotIndexesWrapperPass` in legacy pass.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 82c833e..292bfa6 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -1162,7 +1162,8 @@ MachineBasicBlock *MachineBasicBlock::SplitCriticalEdge( << printMBBReference(*Succ) << '\n'); LiveIntervals *LIS = P.getAnalysisIfAvailable<LiveIntervals>(); - SlotIndexes *Indexes = P.getAnalysisIfAvailable<SlotIndexes>(); + auto *SIWrapper = P.getAnalysisIfAvailable<SlotIndexesWrapperPass>(); + SlotIndexes *Indexes = SIWrapper ? &SIWrapper->getSI() : nullptr; if (LIS) LIS->insertMBBInMaps(NMBB); else if (Indexes) |