aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectThread.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2025-09-04 20:54:09 +0100
committerGitHub <noreply@github.com>2025-09-04 20:54:09 +0100
commit2d9e452ab0f3ae864f587e2c9313541e499422e0 (patch)
tree68ff101831fc8900686746b9c7100ea1029f4c45 /lldb/source/Commands/CommandObjectThread.cpp
parent13875dc513fe6284a415ffa2efb4cad353ec1a7f (diff)
downloadllvm-2d9e452ab0f3ae864f587e2c9313541e499422e0.zip
llvm-2d9e452ab0f3ae864f587e2c9313541e499422e0.tar.gz
llvm-2d9e452ab0f3ae864f587e2c9313541e499422e0.tar.bz2
[LoopUnroll] Introduce parallel reduction phis when unrolling. (#149470)
When partially or runtime unrolling loops with reductions, currently the reductions are performed in-order in the loop, negating most benefits from unrolling such loops. This patch extends unrolling code-gen to keep a parallel reduction phi per unrolled iteration and combining the final result after the loop. For out-of-order CPUs, this allows executing mutliple reduction chains in parallel. For now, the initial transformation is restricted to cases where we unroll a small number of iterations (hard-coded to 4, but should maybe be capped by TTI depending on the execution units), to avoid introducing an excessive amount of parallel phis. It also requires single block loops for now, where the unrolled iterations are known to not exit the loop (either due to runtime unrolling or partial unrolling). This ensures that the unrolled loop will have a single basic block, with a single exit block where we can place the final reduction value computation. The initial implementation also only supports parallelizing loops with a single reduction and only integer reductions. Those restrictions are just to keep the initial implementation simpler, and can easily be lifted as follow-ups. With corresponding TTI to the AArch64 unrolling preferences which I will also share soon, this triggers in ~300 loops across a wide range of workloads, including LLVM itself, ffmgep, av1aom, sqlite, blender, brotli, zstd and more. PR: https://github.com/llvm/llvm-project/pull/149470
Diffstat (limited to 'lldb/source/Commands/CommandObjectThread.cpp')
0 files changed, 0 insertions, 0 deletions