aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorMadhur Amilkanthwar <madhura@nvidia.com>2025-09-16 16:43:37 +0530
committerGitHub <noreply@github.com>2025-09-16 16:43:37 +0530
commita134b0621798d0c07a6c5ea23d8e8388b04c26ad (patch)
tree79af25146e38b73d4c2206bc8c643ebdcbb08700 /clang/lib/CodeGen/BackendUtil.cpp
parentc5474cdc27d99f6ebab1d501f93ec1aa6dc8235b (diff)
downloadllvm-a134b0621798d0c07a6c5ea23d8e8388b04c26ad.zip
llvm-a134b0621798d0c07a6c5ea23d8e8388b04c26ad.tar.gz
llvm-a134b0621798d0c07a6c5ea23d8e8388b04c26ad.tar.bz2
Reapply "Introduce -fexperimental-loop-fusion to clang and flang (#158844)
This PR is a reapplication of https://github.com/llvm/llvm-project/pull/142686
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp2
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;