[clang] [flang] [lld] [llvm] Test entry-points for pass-plugins with Bye in clang, flang and lld (PR #172463)
Stefan Gränitz via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 17 04:57:38 PST 2025
================
@@ -0,0 +1,62 @@
+! REQUIRES: plugins, examples
+
+! Entry-points in default and -O0 pipeline
+!
+! RUN: %flang -fpass-plugin=%llvmshlibdir/Bye%pluginext \
+! RUN: -Xflang -load -Xflang %llvmshlibdir/Bye%pluginext \
+! RUN: -mllvm -print-ep-callbacks -o /dev/null -S %s | FileCheck --check-prefix=EP %s
+!
+! RUN: %flang -fpass-plugin=%llvmshlibdir/Bye%pluginext -flto=full -O0 \
+! RUN: -Xflang -load -Xflang %llvmshlibdir/Bye%pluginext \
+! RUN: -mllvm -print-ep-callbacks -o /dev/null -S %s | FileCheck --check-prefix=EP %s
+!
+! RUN: %flang -fpass-plugin=%llvmshlibdir/Bye%pluginext -flto=thin -O0 \
+! RUN: -Xflang -load -Xflang %llvmshlibdir/Bye%pluginext \
+! RUN: -mllvm -print-ep-callbacks -o /dev/null -S %s | FileCheck --check-prefix=EP %s
+!
+! EP: PipelineStart
+! EP: PipelineEarlySimplification
+! EP-NOT: Peephole
+! EP: ScalarOptimizerLate
+! EP-NOT: Peephole
+! EP: OptimizerEarly
+! EP: VectorizerStart
+! EP: VectorizerEnd
+! EP: OptimizerLast
----------------
weliveindetail wrote:
Interesting indeed. Quick debug shows that registration happens and callbacks are invoked. However, the vectorizer passes don't run, because `runBeforePass()` tells us to skip them: https://github.com/llvm/llvm-project/blob/354cfba5209eed5ea6bafb6a3e69e65148c4e25d/llvm/include/llvm/IR/PassManagerImpl.h#L73-L74 Is that a bug?
https://github.com/llvm/llvm-project/pull/172463
More information about the llvm-commits
mailing list