[clang] [flang] [llvm] add -floop-fuse to clang and flang (PR #142686)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 29 07:17:19 PDT 2025


================
@@ -518,6 +524,9 @@ PassBuilder::buildO1FunctionSimplificationPipeline(OptimizationLevel Level,
 
   invokeLoopOptimizerEndEPCallbacks(LPM2, Level);
 
+  if (PTO.LoopFuse)
+    FPM.addPass(LoopFusePass());
+
----------------
kasuga-fj wrote:

> LoopFusion is a function pass

I don't think this implies that the pass should be part of the function simplification pipeline. Its position should be determined by what the pass actually does. The appropriate placement likely depends on what you're trying to achieve with it.

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


More information about the llvm-commits mailing list