diff options
author | Sebastian Pop <spop@nvidia.com> | 2025-09-15 08:18:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-15 18:48:32 +0530 |
commit | 895cda70a95529fd22aac05eee7c34f7624996af (patch) | |
tree | 3421ecf4f6eb253fc82b7089fbbbb7f040963dda /clang/lib/CodeGen/BackendUtil.cpp | |
parent | e0a33cb599f8614b3d897ad2bd2f9fa8e1acbac5 (diff) | |
download | llvm-895cda70a95529fd22aac05eee7c34f7624996af.zip llvm-895cda70a95529fd22aac05eee7c34f7624996af.tar.gz llvm-895cda70a95529fd22aac05eee7c34f7624996af.tar.bz2 |
Introduce -fexperimental-loop-fuse to clang and flang (#142686)
This patch adds the flag -fexperimental-loop-fuse to the clang and flang
drivers. This is primarily useful for experiments as we envision to
enable the pass one day.
The options are based on the same principles and reason on which we have
`floop-interchange`.
---------
Co-authored-by: Madhur Amilkanthwar <madhura@nvidia.com>
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 3f095c0..8c99af2 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -896,6 +896,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline( PipelineTuningOptions PTO; PTO.LoopUnrolling = CodeGenOpts.UnrollLoops; PTO.LoopInterchange = CodeGenOpts.InterchangeLoops; + PTO.LoopFusion = CodeGenOpts.FuseLoops; // For historical reasons, loop interleaving is set to mirror setting for loop // unrolling. PTO.LoopInterleaving = CodeGenOpts.UnrollLoops; @@ -1331,6 +1332,7 @@ runThinLTOBackend(CompilerInstance &CI, ModuleSummaryIndex *CombinedIndex, Conf.SampleProfile = std::move(SampleProfile); Conf.PTO.LoopUnrolling = CGOpts.UnrollLoops; Conf.PTO.LoopInterchange = CGOpts.InterchangeLoops; + Conf.PTO.LoopFusion = CGOpts.FuseLoops; // For historical reasons, loop interleaving is set to mirror setting for loop // unrolling. Conf.PTO.LoopInterleaving = CGOpts.UnrollLoops; |