aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorDaniel Hoekwater <hoekwater@google.com>2024-09-27 13:57:07 +0000
committerGitHub <noreply@github.com>2024-09-27 09:57:07 -0400
commit22c8b1d853dfde925eb63c4907332c596048c631 (patch)
tree9579ca67be8af4bd21862f674596ae049c1fa86d /llvm/lib/Transforms/Utils/InlineFunction.cpp
parenteb16acedf54ac76543b3f9d6071d578472b1630d (diff)
downloadllvm-22c8b1d853dfde925eb63c4907332c596048c631.zip
llvm-22c8b1d853dfde925eb63c4907332c596048c631.tar.gz
llvm-22c8b1d853dfde925eb63c4907332c596048c631.tar.bz2
[BranchRelaxation] Remove quadratic behavior in relaxation pass (#96250)
Currently, we recompute block offsets after each relaxation. This causes the complexity to be O(n^2) in the number of instructions, inflating compile time. If we instead recompute block offsets after each iteration of the outer loop, the complexity is O(n). Recomputing offsets in the outer loop will cause some out-of-range branches to be missed in the inner loop, but they will be relaxed in the next iteration of the outer loop. This change may introduce unnecessary relaxations for an architecture where the relaxed branch is smaller than the unrelaxed branch, but AFAIK there is no such architecture.
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions