Skip to content

Commit 7e6d9ff

Browse files
committed
[CodeGen][NewPM] Port LiveStacks analysis to NPM
1 parent 41013be commit 7e6d9ff

17 files changed

+89
-44
lines changed

llvm/include/llvm/CodeGen/LiveStacks.h

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#include "llvm/CodeGen/LiveInterval.h"
1919
#include "llvm/CodeGen/MachineFunctionPass.h"
20+
#include "llvm/IR/PassManager.h"
2021
#include "llvm/InitializePasses.h"
2122
#include "llvm/PassRegistry.h"
2223
#include <cassert>
@@ -32,7 +33,7 @@ class raw_ostream;
3233
class TargetRegisterClass;
3334
class TargetRegisterInfo;
3435

35-
class LiveStacks : public MachineFunctionPass {
36+
class LiveStacks {
3637
const TargetRegisterInfo *TRI = nullptr;
3738

3839
/// Special pool allocator for VNInfo's (LiveInterval val#).
@@ -47,12 +48,6 @@ class LiveStacks : public MachineFunctionPass {
4748
std::map<int, const TargetRegisterClass *> S2RCMap;
4849

4950
public:
50-
static char ID; // Pass identification, replacement for typeid
51-
52-
LiveStacks() : MachineFunctionPass(ID) {
53-
initializeLiveStacksPass(*PassRegistry::getPassRegistry());
54-
}
55-
5651
using iterator = SS2IntervalMap::iterator;
5752
using const_iterator = SS2IntervalMap::const_iterator;
5853

@@ -92,6 +87,25 @@ class LiveStacks : public MachineFunctionPass {
9287

9388
VNInfo::Allocator &getVNInfoAllocator() { return VNInfoAllocator; }
9489

90+
void releaseMemory();
91+
/// init - analysis entry point
92+
void init(MachineFunction &MF);
93+
void print(raw_ostream &O, const Module *M = nullptr) const;
94+
};
95+
96+
class LiveStacksWrapperLegacy : public MachineFunctionPass {
97+
LiveStacks Impl;
98+
99+
public:
100+
static char ID; // Pass identification, replacement for typeid
101+
102+
LiveStacksWrapperLegacy() : MachineFunctionPass(ID) {
103+
initializeLiveStacksWrapperLegacyPass(*PassRegistry::getPassRegistry());
104+
}
105+
106+
LiveStacks &getLS() { return Impl; }
107+
const LiveStacks &getLS() const { return Impl; }
108+
95109
void getAnalysisUsage(AnalysisUsage &AU) const override;
96110
void releaseMemory() override;
97111

@@ -102,6 +116,15 @@ class LiveStacks : public MachineFunctionPass {
102116
void print(raw_ostream &O, const Module * = nullptr) const override;
103117
};
104118

119+
class LiveStacksAnalysis : public AnalysisInfoMixin<LiveStacksAnalysis> {
120+
static AnalysisKey Key;
121+
friend AnalysisInfoMixin<LiveStacksAnalysis>;
122+
123+
public:
124+
using Result = LiveStacks;
125+
126+
LiveStacks run(MachineFunction &MF, MachineFunctionAnalysisManager &);
127+
};
105128
} // end namespace llvm
106129

107130
#endif

llvm/include/llvm/InitializePasses.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void initializeLiveDebugVariablesWrapperLegacyPass(PassRegistry &);
158158
void initializeLiveIntervalsWrapperPassPass(PassRegistry &);
159159
void initializeLiveRangeShrinkPass(PassRegistry &);
160160
void initializeLiveRegMatrixWrapperLegacyPass(PassRegistry &);
161-
void initializeLiveStacksPass(PassRegistry &);
161+
void initializeLiveStacksWrapperLegacyPass(PassRegistry &);
162162
void initializeLiveVariablesWrapperPassPass(PassRegistry &);
163163
void initializeLoadStoreOptPass(PassRegistry &);
164164
void initializeLoadStoreVectorizerLegacyPassPass(PassRegistry &);

llvm/include/llvm/Passes/MachinePassRegistry.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ MACHINE_FUNCTION_ANALYSIS("edge-bundles", EdgeBundlesAnalysis())
101101
MACHINE_FUNCTION_ANALYSIS("livedebugvars", LiveDebugVariablesAnalysis())
102102
MACHINE_FUNCTION_ANALYSIS("live-intervals", LiveIntervalsAnalysis())
103103
MACHINE_FUNCTION_ANALYSIS("live-reg-matrix", LiveRegMatrixAnalysis())
104+
MACHINE_FUNCTION_ANALYSIS("live-stacks", LiveStacksAnalysis())
104105
MACHINE_FUNCTION_ANALYSIS("live-vars", LiveVariablesAnalysis())
105106
MACHINE_FUNCTION_ANALYSIS("machine-block-freq", MachineBlockFrequencyAnalysis())
106107
MACHINE_FUNCTION_ANALYSIS("machine-branch-prob",
@@ -118,7 +119,6 @@ MACHINE_FUNCTION_ANALYSIS("regalloc-priority", RegAllocPriorityAdvisorAnalysis()
118119
MACHINE_FUNCTION_ANALYSIS("slot-indexes", SlotIndexesAnalysis())
119120
MACHINE_FUNCTION_ANALYSIS("spill-code-placement", SpillPlacementAnalysis())
120121
MACHINE_FUNCTION_ANALYSIS("virtregmap", VirtRegMapAnalysis())
121-
// MACHINE_FUNCTION_ANALYSIS("live-stacks", LiveStacksPass())
122122
// MACHINE_FUNCTION_ANALYSIS("lazy-machine-bfi",
123123
// LazyMachineBlockFrequencyInfoAnalysis())
124124
// MACHINE_FUNCTION_ANALYSIS("machine-loops", MachineLoopInfoAnalysis())

llvm/lib/CodeGen/CodeGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void llvm::initializeCodeGen(PassRegistry &Registry) {
6262
initializeLiveDebugVariablesWrapperLegacyPass(Registry);
6363
initializeLiveIntervalsWrapperPassPass(Registry);
6464
initializeLiveRangeShrinkPass(Registry);
65-
initializeLiveStacksPass(Registry);
65+
initializeLiveStacksWrapperLegacyPass(Registry);
6666
initializeLiveVariablesWrapperPassPass(Registry);
6767
initializeLocalStackSlotPassPass(Registry);
6868
initializeLowerGlobalDtorsLegacyPassPass(Registry);

llvm/lib/CodeGen/InlineSpiller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class HoistSpillHelper : private LiveRangeEdit::Delegate {
131131
HoistSpillHelper(MachineFunctionPass &pass, MachineFunction &mf,
132132
VirtRegMap &vrm)
133133
: MF(mf), LIS(pass.getAnalysis<LiveIntervalsWrapperPass>().getLIS()),
134-
LSS(pass.getAnalysis<LiveStacks>()),
134+
LSS(pass.getAnalysis<LiveStacksWrapperLegacy>().getLS()),
135135
MDT(pass.getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree()),
136136
VRM(vrm), MRI(mf.getRegInfo()), TII(*mf.getSubtarget().getInstrInfo()),
137137
TRI(*mf.getSubtarget().getRegisterInfo()),
@@ -193,7 +193,7 @@ class InlineSpiller : public Spiller {
193193
InlineSpiller(MachineFunctionPass &Pass, MachineFunction &MF, VirtRegMap &VRM,
194194
VirtRegAuxInfo &VRAI)
195195
: MF(MF), LIS(Pass.getAnalysis<LiveIntervalsWrapperPass>().getLIS()),
196-
LSS(Pass.getAnalysis<LiveStacks>()),
196+
LSS(Pass.getAnalysis<LiveStacksWrapperLegacy>().getLS()),
197197
MDT(Pass.getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree()),
198198
VRM(VRM), MRI(MF.getRegInfo()), TII(*MF.getSubtarget().getInstrInfo()),
199199
TRI(*MF.getSubtarget().getRegisterInfo()),

llvm/lib/CodeGen/LiveStacks.cpp

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ using namespace llvm;
1919

2020
#define DEBUG_TYPE "livestacks"
2121

22-
char LiveStacks::ID = 0;
23-
INITIALIZE_PASS_BEGIN(LiveStacks, DEBUG_TYPE,
24-
"Live Stack Slot Analysis", false, false)
22+
char LiveStacksWrapperLegacy::ID = 0;
23+
INITIALIZE_PASS_BEGIN(LiveStacksWrapperLegacy, DEBUG_TYPE,
24+
"Live Stack Slot Analysis", false, false)
2525
INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
26-
INITIALIZE_PASS_END(LiveStacks, DEBUG_TYPE,
27-
"Live Stack Slot Analysis", false, false)
26+
INITIALIZE_PASS_END(LiveStacksWrapperLegacy, DEBUG_TYPE,
27+
"Live Stack Slot Analysis", false, false)
2828

29-
char &llvm::LiveStacksID = LiveStacks::ID;
29+
char &llvm::LiveStacksID = LiveStacksWrapperLegacy::ID;
3030

31-
void LiveStacks::getAnalysisUsage(AnalysisUsage &AU) const {
31+
void LiveStacksWrapperLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
3232
AU.setPreservesAll();
3333
AU.addPreserved<SlotIndexesWrapperPass>();
3434
AU.addRequiredTransitive<SlotIndexesWrapperPass>();
@@ -42,11 +42,10 @@ void LiveStacks::releaseMemory() {
4242
S2RCMap.clear();
4343
}
4444

45-
bool LiveStacks::runOnMachineFunction(MachineFunction &MF) {
45+
void LiveStacks::init(MachineFunction &MF) {
4646
TRI = MF.getSubtarget().getRegisterInfo();
4747
// FIXME: No analysis is being done right now. We are relying on the
4848
// register allocators to provide the information.
49-
return false;
5049
}
5150

5251
LiveInterval &
@@ -68,6 +67,27 @@ LiveStacks::getOrCreateInterval(int Slot, const TargetRegisterClass *RC) {
6867
return I->second;
6968
}
7069

70+
AnalysisKey LiveStacksAnalysis::Key;
71+
72+
LiveStacks LiveStacksAnalysis::run(MachineFunction &MF,
73+
MachineFunctionAnalysisManager &) {
74+
LiveStacks Impl;
75+
Impl.init(MF);
76+
return Impl;
77+
}
78+
79+
bool LiveStacksWrapperLegacy::runOnMachineFunction(MachineFunction &MF) {
80+
Impl = LiveStacks();
81+
Impl.init(MF);
82+
return false;
83+
}
84+
85+
void LiveStacksWrapperLegacy::releaseMemory() { Impl = LiveStacks(); }
86+
87+
void LiveStacksWrapperLegacy::print(raw_ostream &OS, const Module *) const {
88+
Impl.print(OS);
89+
}
90+
7191
/// print - Implement the dump method.
7292
void LiveStacks::print(raw_ostream &OS, const Module*) const {
7393

llvm/lib/CodeGen/MachineVerifier.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ struct MachineVerifierLegacyPass : public MachineFunctionPass {
369369
}
370370

371371
void getAnalysisUsage(AnalysisUsage &AU) const override {
372-
AU.addUsedIfAvailable<LiveStacks>();
372+
AU.addUsedIfAvailable<LiveStacksWrapperLegacy>();
373373
AU.addUsedIfAvailable<LiveVariablesWrapperPass>();
374374
AU.addUsedIfAvailable<SlotIndexesWrapperPass>();
375375
AU.addUsedIfAvailable<LiveIntervalsWrapperPass>();
@@ -491,7 +491,8 @@ bool MachineVerifier::verify(const MachineFunction &MF) {
491491
auto *LVWrapper = PASS->getAnalysisIfAvailable<LiveVariablesWrapperPass>();
492492
if (!LiveInts)
493493
LiveVars = LVWrapper ? &LVWrapper->getLV() : nullptr;
494-
LiveStks = PASS->getAnalysisIfAvailable<LiveStacks>();
494+
auto *LSWrapper = PASS->getAnalysisIfAvailable<LiveStacksWrapperLegacy>();
495+
LiveStks = LSWrapper ? &LSWrapper->getLS() : nullptr;
495496
auto *SIWrapper = PASS->getAnalysisIfAvailable<SlotIndexesWrapperPass>();
496497
Indexes = SIWrapper ? &SIWrapper->getSI() : nullptr;
497498
}

llvm/lib/CodeGen/RegAllocBasic.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
135135
INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
136136
INITIALIZE_PASS_DEPENDENCY(RegisterCoalescer)
137137
INITIALIZE_PASS_DEPENDENCY(MachineScheduler)
138-
INITIALIZE_PASS_DEPENDENCY(LiveStacks)
138+
INITIALIZE_PASS_DEPENDENCY(LiveStacksWrapperLegacy)
139139
INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
140140
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
141141
INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass)
@@ -182,8 +182,8 @@ void RABasic::getAnalysisUsage(AnalysisUsage &AU) const {
182182
AU.addPreserved<SlotIndexesWrapperPass>();
183183
AU.addRequired<LiveDebugVariablesWrapperLegacy>();
184184
AU.addPreserved<LiveDebugVariablesWrapperLegacy>();
185-
AU.addRequired<LiveStacks>();
186-
AU.addPreserved<LiveStacks>();
185+
AU.addRequired<LiveStacksWrapperLegacy>();
186+
AU.addPreserved<LiveStacksWrapperLegacy>();
187187
AU.addRequired<ProfileSummaryInfoWrapperPass>();
188188
AU.addRequired<MachineBlockFrequencyInfoWrapperPass>();
189189
AU.addPreserved<MachineBlockFrequencyInfoWrapperPass>();

llvm/lib/CodeGen/RegAllocGreedy.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
156156
INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
157157
INITIALIZE_PASS_DEPENDENCY(RegisterCoalescer)
158158
INITIALIZE_PASS_DEPENDENCY(MachineScheduler)
159-
INITIALIZE_PASS_DEPENDENCY(LiveStacks)
159+
INITIALIZE_PASS_DEPENDENCY(LiveStacksWrapperLegacy)
160160
INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
161161
INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass)
162162
INITIALIZE_PASS_DEPENDENCY(VirtRegMapWrapperLegacy)
@@ -206,8 +206,8 @@ void RAGreedy::getAnalysisUsage(AnalysisUsage &AU) const {
206206
AU.addPreserved<SlotIndexesWrapperPass>();
207207
AU.addRequired<LiveDebugVariablesWrapperLegacy>();
208208
AU.addPreserved<LiveDebugVariablesWrapperLegacy>();
209-
AU.addRequired<LiveStacks>();
210-
AU.addPreserved<LiveStacks>();
209+
AU.addRequired<LiveStacksWrapperLegacy>();
210+
AU.addPreserved<LiveStacksWrapperLegacy>();
211211
AU.addRequired<MachineDominatorTreeWrapperPass>();
212212
AU.addPreserved<MachineDominatorTreeWrapperPass>();
213213
AU.addRequired<MachineLoopInfoWrapperPass>();

llvm/lib/CodeGen/RegAllocPBQP.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class RegAllocPBQP : public MachineFunctionPass {
121121
: MachineFunctionPass(ID), customPassID(cPassID) {
122122
initializeSlotIndexesWrapperPassPass(*PassRegistry::getPassRegistry());
123123
initializeLiveIntervalsWrapperPassPass(*PassRegistry::getPassRegistry());
124-
initializeLiveStacksPass(*PassRegistry::getPassRegistry());
124+
initializeLiveStacksWrapperLegacyPass(*PassRegistry::getPassRegistry());
125125
initializeVirtRegMapWrapperLegacyPass(*PassRegistry::getPassRegistry());
126126
}
127127

@@ -550,8 +550,8 @@ void RegAllocPBQP::getAnalysisUsage(AnalysisUsage &au) const {
550550
//au.addRequiredID(SplitCriticalEdgesID);
551551
if (customPassID)
552552
au.addRequiredID(*customPassID);
553-
au.addRequired<LiveStacks>();
554-
au.addPreserved<LiveStacks>();
553+
au.addRequired<LiveStacksWrapperLegacy>();
554+
au.addPreserved<LiveStacksWrapperLegacy>();
555555
au.addRequired<MachineBlockFrequencyInfoWrapperPass>();
556556
au.addPreserved<MachineBlockFrequencyInfoWrapperPass>();
557557
au.addRequired<MachineLoopInfoWrapperPass>();

llvm/lib/CodeGen/StackSlotColoring.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ namespace {
149149
AU.setPreservesCFG();
150150
AU.addRequired<SlotIndexesWrapperPass>();
151151
AU.addPreserved<SlotIndexesWrapperPass>();
152-
AU.addRequired<LiveStacks>();
152+
AU.addRequired<LiveStacksWrapperLegacy>();
153153
AU.addRequired<MachineBlockFrequencyInfoWrapperPass>();
154154
AU.addPreserved<MachineBlockFrequencyInfoWrapperPass>();
155155
AU.addPreservedID(MachineDominatorsID);
@@ -185,7 +185,7 @@ char &llvm::StackSlotColoringID = StackSlotColoring::ID;
185185
INITIALIZE_PASS_BEGIN(StackSlotColoring, DEBUG_TYPE,
186186
"Stack Slot Coloring", false, false)
187187
INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
188-
INITIALIZE_PASS_DEPENDENCY(LiveStacks)
188+
INITIALIZE_PASS_DEPENDENCY(LiveStacksWrapperLegacy)
189189
INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass)
190190
INITIALIZE_PASS_END(StackSlotColoring, DEBUG_TYPE,
191191
"Stack Slot Coloring", false, false)
@@ -522,7 +522,7 @@ bool StackSlotColoring::runOnMachineFunction(MachineFunction &MF) {
522522

523523
MFI = &MF.getFrameInfo();
524524
TII = MF.getSubtarget().getInstrInfo();
525-
LS = &getAnalysis<LiveStacks>();
525+
LS = &getAnalysis<LiveStacksWrapperLegacy>().getLS();
526526
MBFI = &getAnalysis<MachineBlockFrequencyInfoWrapperPass>().getMBFI();
527527
Indexes = &getAnalysis<SlotIndexesWrapperPass>().getSI();
528528

llvm/lib/CodeGen/VirtRegMap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
253253
INITIALIZE_PASS_DEPENDENCY(LiveIntervalsWrapperPass)
254254
INITIALIZE_PASS_DEPENDENCY(LiveDebugVariablesWrapperLegacy)
255255
INITIALIZE_PASS_DEPENDENCY(LiveRegMatrixWrapperLegacy)
256-
INITIALIZE_PASS_DEPENDENCY(LiveStacks)
256+
INITIALIZE_PASS_DEPENDENCY(LiveStacksWrapperLegacy)
257257
INITIALIZE_PASS_DEPENDENCY(VirtRegMapWrapperLegacy)
258258
INITIALIZE_PASS_END(VirtRegRewriter, "virtregrewriter",
259259
"Virtual Register Rewriter", false, false)
@@ -265,8 +265,8 @@ void VirtRegRewriter::getAnalysisUsage(AnalysisUsage &AU) const {
265265
AU.addRequired<SlotIndexesWrapperPass>();
266266
AU.addPreserved<SlotIndexesWrapperPass>();
267267
AU.addRequired<LiveDebugVariablesWrapperLegacy>();
268-
AU.addRequired<LiveStacks>();
269-
AU.addPreserved<LiveStacks>();
268+
AU.addRequired<LiveStacksWrapperLegacy>();
269+
AU.addPreserved<LiveStacksWrapperLegacy>();
270270
AU.addRequired<VirtRegMapWrapperLegacy>();
271271
AU.addRequired<LiveRegMatrixWrapperLegacy>();
272272

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
#include "llvm/CodeGen/LiveDebugVariables.h"
102102
#include "llvm/CodeGen/LiveIntervals.h"
103103
#include "llvm/CodeGen/LiveRegMatrix.h"
104+
#include "llvm/CodeGen/LiveStacks.h"
104105
#include "llvm/CodeGen/LiveVariables.h"
105106
#include "llvm/CodeGen/LocalStackSlotAllocation.h"
106107
#include "llvm/CodeGen/LowerEmuTLS.h"

llvm/lib/Target/AMDGPU/AMDGPUMarkLastScratchLoad.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class AMDGPUMarkLastScratchLoad : public MachineFunctionPass {
4444
void getAnalysisUsage(AnalysisUsage &AU) const override {
4545
AU.addRequired<SlotIndexesWrapperPass>();
4646
AU.addRequired<LiveIntervalsWrapperPass>();
47-
AU.addRequired<LiveStacks>();
47+
AU.addRequired<LiveStacksWrapperLegacy>();
4848
AU.setPreservesAll();
4949
MachineFunctionPass::getAnalysisUsage(AU);
5050
}
@@ -64,7 +64,7 @@ bool AMDGPUMarkLastScratchLoad::runOnMachineFunction(MachineFunction &MF) {
6464
if (ST.getGeneration() < AMDGPUSubtarget::GFX12)
6565
return false;
6666

67-
LS = &getAnalysis<LiveStacks>();
67+
LS = &getAnalysis<LiveStacksWrapperLegacy>().getLS();
6868
LIS = &getAnalysis<LiveIntervalsWrapperPass>().getLIS();
6969
SI = &getAnalysis<SlotIndexesWrapperPass>().getSI();
7070
SII = ST.getInstrInfo();
@@ -137,6 +137,6 @@ char &llvm::AMDGPUMarkLastScratchLoadID = AMDGPUMarkLastScratchLoad::ID;
137137
INITIALIZE_PASS_BEGIN(AMDGPUMarkLastScratchLoad, DEBUG_TYPE,
138138
"AMDGPU Mark last scratch load", false, false)
139139
INITIALIZE_PASS_DEPENDENCY(SlotIndexesWrapperPass)
140-
INITIALIZE_PASS_DEPENDENCY(LiveStacks)
140+
INITIALIZE_PASS_DEPENDENCY(LiveStacksWrapperLegacy)
141141
INITIALIZE_PASS_END(AMDGPUMarkLastScratchLoad, DEBUG_TYPE,
142142
"AMDGPU Mark last scratch load", false, false)

llvm/lib/Target/LoongArch/LoongArchDeadRegisterDefinitions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class LoongArchDeadRegisterDefinitions : public MachineFunctionPass {
3838
AU.addRequired<LiveIntervalsWrapperPass>();
3939
AU.addPreserved<SlotIndexesWrapperPass>();
4040
AU.addPreserved<LiveDebugVariablesWrapperLegacy>();
41-
AU.addPreserved<LiveStacks>();
41+
AU.addPreserved<LiveStacksWrapperLegacy>();
4242
MachineFunctionPass::getAnalysisUsage(AU);
4343
}
4444

llvm/lib/Target/RISCV/RISCVDeadRegisterDefinitions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class RISCVDeadRegisterDefinitions : public MachineFunctionPass {
3838
AU.addRequired<LiveIntervalsWrapperPass>();
3939
AU.addPreserved<SlotIndexesWrapperPass>();
4040
AU.addPreserved<LiveDebugVariablesWrapperLegacy>();
41-
AU.addPreserved<LiveStacks>();
41+
AU.addPreserved<LiveStacksWrapperLegacy>();
4242
MachineFunctionPass::getAnalysisUsage(AU);
4343
}
4444

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ class RISCVInsertVSETVLI : public MachineFunctionPass {
890890
AU.addPreserved<LiveIntervalsWrapperPass>();
891891
AU.addPreserved<SlotIndexesWrapperPass>();
892892
AU.addPreserved<LiveDebugVariablesWrapperLegacy>();
893-
AU.addPreserved<LiveStacks>();
893+
AU.addPreserved<LiveStacksWrapperLegacy>();
894894

895895
MachineFunctionPass::getAnalysisUsage(AU);
896896
}

0 commit comments

Comments
 (0)