[clang] [flang] [llvm] add -floop-fuse to clang and flang (PR #142686)
Madhur Amilkanthwar via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 08:50:17 PDT 2025
================
@@ -204,6 +205,10 @@ static cl::opt<bool>
EnableLoopInterchange("enable-loopinterchange", cl::init(false), cl::Hidden,
cl::desc("Enable the LoopInterchange Pass"));
+static cl::opt<bool> EnableLoopFusion("enable-loopfusion", cl::init(false),
----------------
madhur13490 wrote:
As I said, I am taking over this patch from Sebastian. Your comment makes me think.
The primary purpose of this patch is to user-facing option to allow turning fusion on or off. Not everyone is aware of the options provided by developer tools like opt.
I see the precedence in the code. In `flang/include/flang/Frontend/CodegenOptions.def` I see options for loop-versioning, unrolling etc.
I see clang and flang differ here. clang doesn't seem to have such options except for `floop-interchange`.
`floop-interchange` was introduced in https://github.com/llvm/llvm-project/pull/125830
Having `fexperimental-loop-fusion` is more of syntactic sugar and convenience is based on the same principles of https://github.com/llvm/llvm-project/pull/125830.
I can remove the change from `PassBuilderPipelines.cpp` i.e. EnableFusion, as it can be redundant.
https://github.com/llvm/llvm-project/pull/142686
More information about the llvm-commits
mailing list