[llvm] [CodeGen] Support start/stop in CodeGenPassBuilder (PR #70912)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 16 16:01:23 PST 2024


================
@@ -469,20 +486,36 @@ template <typename DerivedT> class CodeGenPassBuilder {
   const DerivedT &derived() const {
     return static_cast<const DerivedT &>(*this);
   }
+
+  void setStartStopPasses(const TargetPassConfig::StartStopInfo &Info) const;
+
+  Error verifyStartStop(const TargetPassConfig::StartStopInfo &Info) const;
+
+  mutable SmallVector<llvm::unique_function<bool(StringRef)>, 4>
----------------
paperchalice wrote:

Currently IR passes and machine function passes are handled by different classes, and `-start/stop` options should support both IR and machine function passes, but it's OK to merge them into one class, because only `buildPipeline` creates instance of `AddIRPass` and `AddMachinePass`.

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


More information about the llvm-commits mailing list