[PATCH] D83608: [NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 10:25:02 PST 2020


aeubanks added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/CodeGenPassBuilder.h:13-14
+///
+/// TODO: handle addRequiredID where, in legacy PM, one pass require other pass
+///       to run as prerequisite.
+///
----------------
I believe this is explicitly not supported in the new PM


================
Comment at: llvm/include/llvm/CodeGen/MachinePassRegistry.def:38-47
+FUNCTION_PASS("mergeicmps", MergeICmpsPass, ())
+FUNCTION_PASS("lower-constant-intrinsics", LowerConstantIntrinsicsPass, ())
+FUNCTION_PASS("unreachableblockelim", UnreachableBlockElimPass, ())
+FUNCTION_PASS("consthoist", ConstantHoistingPass, ())
+FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass, ())
+FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass, (false))
+FUNCTION_PASS("post-inline-ee-instrument", EntryExitInstrumenterPass, (true))
----------------
Is the intention that codegen IR passes will exist in both PassRegistry.def and MachinePassRegistry.def? Since people still generally use `opt` to test those passes.


================
Comment at: llvm/include/llvm/Passes/StandardInstrumentations.h:145-146
+
+void registerCodeGenCallback(PassInstrumentationCallbacks &PIC,
+                             LLVMTargetMachine &);
+
----------------
The declaration doesn't seem like it belongs here, it should probably go in `TargetPassConfig.h` since it's not part of `StandardInstrumentation`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83608/new/

https://reviews.llvm.org/D83608



More information about the llvm-commits mailing list