aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC
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/Target/PowerPC
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/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCMIPeephole.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp b/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
index 0b515c9..fa29ccbd 100644
--- a/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+++ b/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
@@ -155,11 +155,11 @@ private:
public:
void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.addRequired<LiveVariables>();
+ AU.addRequired<LiveVariablesWrapperPass>();
AU.addRequired<MachineDominatorTreeWrapperPass>();
AU.addRequired<MachinePostDominatorTreeWrapperPass>();
AU.addRequired<MachineBlockFrequencyInfo>();
- AU.addPreserved<LiveVariables>();
+ AU.addPreserved<LiveVariablesWrapperPass>();
AU.addPreserved<MachineDominatorTreeWrapperPass>();
AU.addPreserved<MachinePostDominatorTreeWrapperPass>();
AU.addPreserved<MachineBlockFrequencyInfo>();
@@ -203,7 +203,7 @@ void PPCMIPeephole::initialize(MachineFunction &MFParm) {
MDT = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
MPDT = &getAnalysis<MachinePostDominatorTreeWrapperPass>().getPostDomTree();
MBFI = &getAnalysis<MachineBlockFrequencyInfo>();
- LV = &getAnalysis<LiveVariables>();
+ LV = &getAnalysis<LiveVariablesWrapperPass>().getLV();
EntryFreq = MBFI->getEntryFreq();
TII = MF->getSubtarget<PPCSubtarget>().getInstrInfo();
RegsToUpdate.clear();
@@ -2034,7 +2034,7 @@ INITIALIZE_PASS_BEGIN(PPCMIPeephole, DEBUG_TYPE,
INITIALIZE_PASS_DEPENDENCY(MachineBlockFrequencyInfo)
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
INITIALIZE_PASS_DEPENDENCY(MachinePostDominatorTreeWrapperPass)
-INITIALIZE_PASS_DEPENDENCY(LiveVariables)
+INITIALIZE_PASS_DEPENDENCY(LiveVariablesWrapperPass)
INITIALIZE_PASS_END(PPCMIPeephole, DEBUG_TYPE,
"PowerPC MI Peephole Optimization", false, false)