================ @@ -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), ---------------- cdevadas wrote:
Should have used `RequiredAnalyses` instead of this long list of arguments. https://github.com/llvm/llvm-project/pull/115434 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits