[llvm] Port CodeGenPrepare to new pass manager (and BasicBlockSectionsProfil… (PR #75380)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 3 23:30:50 PST 2024
================
@@ -170,7 +155,63 @@ class BasicBlockSectionsProfileReader : public ImmutablePass {
// sections profile. \p Buf is a memory buffer that contains the list of
// functions and basic block ids to selectively enable basic block sections.
ImmutablePass *
-createBasicBlockSectionsProfileReaderPass(const MemoryBuffer *Buf);
+createBasicBlockSectionsProfileReaderWrapperPass(const MemoryBuffer *Buf);
+
+/// Analysis pass providing the \c BasicBlockSectionsProfileReader.
+///
+/// Note that this pass's result cannot be invalidated, it is immutable for the
+/// life of the module.
+class BasicBlockSectionsProfileReaderAnalysis
+ : public AnalysisInfoMixin<BasicBlockSectionsProfileReaderAnalysis> {
+ class TargetMachine;
+
+public:
+ static AnalysisKey Key;
+ typedef BasicBlockSectionsProfileReader Result;
+ BasicBlockSectionsProfileReaderAnalysis(const llvm::TargetMachine *TM)
+ : TM(TM) {}
+
+ Result run(Function &F, FunctionAnalysisManager &AM);
+
+private:
+ const llvm::TargetMachine *TM;
----------------
arsenm wrote:
Don't need llvm::
https://github.com/llvm/llvm-project/pull/75380
More information about the llvm-commits
mailing list