diff options
| author | Madhur Amilkanthwar <madhura@nvidia.com> | 2025-09-16 16:43:37 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-16 16:43:37 +0530 |
| commit | a134b0621798d0c07a6c5ea23d8e8388b04c26ad (patch) | |
| tree | 79af25146e38b73d4c2206bc8c643ebdcbb08700 /clang/lib/CodeGen/BackendUtil.cpp | |
| parent | c5474cdc27d99f6ebab1d501f93ec1aa6dc8235b (diff) | |
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.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 3f095c03397f..8c99af2bdff8 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; |
