[PATCH] D88138: [NPM] Add target specific hook to add passes for New Pass Manager

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 16:58:53 PDT 2020


aeubanks added a comment.

This looks good, just a couple nits



================
Comment at: llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp:280
+      [](ModulePassManager &MPM, PassBuilder::OptimizationLevel Level) {
+        LoopPassManager LPM(false);
+        FunctionPassManager FPM(false);
----------------
We should probably thread the DebugPassManager bool into here as a new param to `registerPassBuilderCallbacks()`.


================
Comment at: llvm/test/CodeGen/Hexagon/registerpassbuildercallbacks.ll:3
+; REQUIRES: asserts
+; NPM-O1: Running pass: HexagonVectorLoopCarriedReusePass on Loop at depth 1 containing: %for.body<header><latch><exiting>
+
----------------
I think just the `Running pass: ...Pass` part is sufficient, the `on Loop ...` seems brittle


================
Comment at: llvm/test/CodeGen/Hexagon/registerpassbuildercallbacks.ll:6
+; Function Attrs: noinline nounwind optnone
+define dso_local void @foo() {
+entry:
----------------
How did you come up with this IR?

I've typically seen something like the IR in llvm/test/Other/new-pm-defaults.ll to test this sort of stuff.


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

https://reviews.llvm.org/D88138



More information about the llvm-commits mailing list