[llvm] [NewPM][CodeGen] add TargetPassConfig like API (PR #70906)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 1 01:13:23 PDT 2023


================
@@ -122,6 +129,26 @@ template <typename DerivedT> class CodeGenPassBuilder {
                       raw_pwrite_stream &Out, raw_pwrite_stream *DwoOut,
                       CodeGenFileType FileType) const;
 
+  bool parseTargetMIRPass(MachineFunctionPassManager &MFPM,
+                          StringRef Name) const {
+    llvm_unreachable("parseTargetMIRPass is not overridden");
+  }
+
+  bool parseMIRPass(MachineFunctionPassManager &MFPM, StringRef Name) const;
+
+  Error parseMIRPipeline(MachineFunctionPassManager &MFPM,
+                         StringRef Text) const {
+    for (auto [LHS, RHS] = Text.split(','); RHS != "";
+         std::tie(LHS, RHS) = RHS.split(',')) {
----------------
arsenm wrote:

Not sure I understand the second split 

https://github.com/llvm/llvm-project/pull/70906


More information about the llvm-commits mailing list