[flang-commits] [clang] [flang] [llvm] Introduce -fexperimental-loop-fuse to clang and flang (PR #142686)
Madhur Amilkanthwar via flang-commits
flang-commits at lists.llvm.org
Mon Sep 15 23:47:25 PDT 2025
================
@@ -65,6 +65,9 @@ class PipelineTuningOptions {
/// false.
bool LoopInterchange;
+ /// Tuning option to enable/disable loop fusion. Its default value is false.
+ bool LoopFusion;
----------------
madhur13490 wrote:
In `ThinLTOCodeGenerator.cpp`, I need to do `PTO.LoopFusion = False`. Such change is also needed in `mlir/lib/ExecutionEngine/OptUtils.cpp`.
This is required at each site which is using `PipelineTuningOptions`. For `LoopInterchange` and others, initialization occurs in `PassBuilderPipelines.cpp`, but for LoopFusion, I can't do this because the definition of the LoopFusion variable is in `NewPMDriver.cpp`, as suggested by @kasuga-fj.
I am inclined to follow the way LoopInterchange is initialized (and thus move the definition of LoopFusion from `NewPMDriver.cpp` to `PassBuilderPipelines.cpp`)
What do you think?
https://github.com/llvm/llvm-project/pull/142686
More information about the flang-commits
mailing list