================
@@ -189,30 +198,19 @@ class MachineSinking : public MachineFunctionPass {
bool EnableSinkAndFold;
public:
- static char ID; // Pass identification
-
- MachineSinking() : MachineFunctionPass(ID) {
- initializeMachineSinkingPass(*PassRegistry::getPassRegistry());
- }
-
- bool runOnMachineFunction(MachineFunction &MF) override;
-
- void getAnalysisUsage(AnalysisUsage &AU) const override {
- MachineFunctionPass::getAnalysisUsage(AU);
- AU.addRequired<AAResultsWrapperPass>();
- AU.addRequired<MachineDominatorTreeWrapperPass>();
- AU.addRequired<MachinePostDominatorTreeWrapperPass>();
- AU.addRequired<MachineCycleInfoWrapperPass>();
- AU.addRequired<MachineBranchProbabilityInfoWrapperPass>();
- AU.addPreserved<MachineCycleInfoWrapperPass>();
- AU.addPreserved<MachineLoopInfoWrapperPass>();
- AU.addRequired<ProfileSummaryInfoWrapperPass>();
- if (UseBlockFreqInfo)
- AU.addRequired<MachineBlockFrequencyInfoWrapperPass>();
- AU.addRequired<TargetPassConfig>();
- }
-
- void releaseMemory() override {
+ MachineSinking(bool EnableSinkAndFold, MachineDominatorTree *DT,
+ MachinePostDominatorTree *PDT, LiveVariables *LV,
+ MachineLoopInfo *MLI, SlotIndexes *SI, LiveIntervals *LIS,
+ MachineCycleInfo *CI, ProfileSummaryInfo *PSI,
+ MachineBlockFrequencyInfo *MBFI,
+ const MachineBranchProbabilityInfo *MBPI, AliasAnalysis *AA)
+ : DT(DT), PDT(PDT), CI(CI), PSI(PSI), MBFI(MBFI), MBPI(MBPI), AA(AA),
----------------
optimisan wrote:
Figured it's not essential, later we can just collapse impl into the new pass
class.
https://github.com/llvm/llvm-project/pull/115434
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits