aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorpaperchalice <liujunchang97@outlook.com>2024-07-09 10:50:43 +0800
committerGitHub <noreply@github.com>2024-07-09 10:50:43 +0800
commitac0b2814c34959ebaa8f054db019bd287fdff54d (patch)
tree9e1b742258464c471c2b869c7ab694ba280e6db1 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent366eb8f025f03f00ed1188dccfd3d527b8c82892 (diff)
downloadllvm-ac0b2814c34959ebaa8f054db019bd287fdff54d.zip
llvm-ac0b2814c34959ebaa8f054db019bd287fdff54d.tar.gz
llvm-ac0b2814c34959ebaa8f054db019bd287fdff54d.tar.bz2
[CodeGen][NewPM] Port `LiveVariables` to new pass manager (#97880)
- Port `LiveVariables` to new pass manager. - Convert to `LiveVariablesWrapperPass` in legacy pass manager.
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index b5c3e16..82c833e 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -1171,7 +1171,8 @@ MachineBasicBlock *MachineBasicBlock::SplitCriticalEdge(
// On some targets like Mips, branches may kill virtual registers. Make sure
// that LiveVariables is properly updated after updateTerminator replaces the
// terminators.
- LiveVariables *LV = P.getAnalysisIfAvailable<LiveVariables>();
+ auto *LVWrapper = P.getAnalysisIfAvailable<LiveVariablesWrapperPass>();
+ LiveVariables *LV = LVWrapper ? &LVWrapper->getLV() : nullptr;
// Collect a list of virtual registers killed by the terminators.
SmallVector<Register, 4> KilledRegs;