[all-commits] [llvm/llvm-project] 6327d2: [CHR] Add a threshold for the code duplication
xur-llvm via All-commits
all-commits at lists.llvm.org
Tue Nov 22 11:38:14 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6327d263f5e2a18645979fac2525b574866adbe5
https://github.com/llvm/llvm-project/commit/6327d263f5e2a18645979fac2525b574866adbe5
Author: Rong Xu <xur at google.com>
Date: 2022-11-22 (Tue, 22 Nov 2022)
Changed paths:
M llvm/lib/Passes/PassBuilderPipelines.cpp
M llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
A llvm/test/Transforms/PGOProfile/chr-dup-threshold.ll
Log Message:
-----------
[CHR] Add a threshold for the code duplication
ControlHeightReduction (CHR) clones the code region to reduce the
branches in the hot code path. The number of clones is linear to the
depth of the region.
Currently it does not have control over the code size increase. We are
seeing one ~9000 BB functions get expanded to ~250000 BBs, an 25x
increase. This creates a big compile time issue for the downstream
optimizations.
This patch adds a cap for number of clones for one region.
Differential Revision: https://reviews.llvm.org/D138333
More information about the All-commits
mailing list