[llvm] [NewPM][CodeGen] Port selection dag isel to new pass manager (PR #83567)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 05:46:22 PDT 2024
================
@@ -473,15 +573,32 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
// ask for passes that have been required anyway.
if (UseMBPI && OptLevel != CodeGenOptLevel::None)
- FuncInfo->BPI = &getAnalysis<BranchProbabilityInfoWrapperPass>().getBPI();
+ FuncInfo->BPI =
+ &MFP.getAnalysis<BranchProbabilityInfoWrapperPass>().getBPI();
else
FuncInfo->BPI = nullptr;
if (OptLevel != CodeGenOptLevel::None)
- AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
+ AA = &MFP.getAnalysis<AAResultsWrapperPass>().getAAResults();
else
AA = nullptr;
+ SP = &MFP.getAnalysis<StackProtector>().getLayoutInfo();
+
+#ifndef NDEBUG
+ TTI = &MFP.getAnalysis<TargetTransformInfoWrapperPass>().getTTI(Fn);
+#endif
+}
+
+bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
+ const Function &Fn = mf.getFunction();
+
+ bool InstrRef = mf.shouldUseDebugInstrRef();
+
+ FuncInfo->set(MF->getFunction(), *MF, CurDAG);
+
+ ISEL_DUMP(dbgs() << "\n\n\n=== " << FuncName << "\n");
----------------
arsenm wrote:
```suggestion
ISEL_DUMP(dbgs() << "\n\n\n=== " << FuncName << '\n');
```
https://github.com/llvm/llvm-project/pull/83567
More information about the llvm-commits
mailing list