aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Transforms/SimpleLoopUnswitch
diff options
context:
space:
mode:
authorMiguel Saldivar <miguel.saldivar@hpe.com>2025-09-03 02:24:21 -0700
committerGitHub <noreply@github.com>2025-09-03 10:24:21 +0100
commitbe1e50f56af8e270a0396eef8f62626fbbb84996 (patch)
tree2f3b2909b4c32149e40591214bb49e44ab011aaf /llvm/test/Transforms/SimpleLoopUnswitch
parent759a2ac5b0ee09be9dbb51ad50143d7db990a94a (diff)
downloadllvm-main.zip
llvm-main.tar.gz
llvm-main.tar.bz2
[flang] Avoid unnecessary looping for constants (#156403)HEADmain
Going through and doing `convertToAttribute` for all elements, if they are the same can be costly. If the elements are the same, we can just call `convertToAttribute` once. This does give us a significant speed-up: ```console $ hyperfine --warmup 1 --runs 5 ./slow.sh ./fast.sh Benchmark 1: ./slow.sh Time (mean ± σ): 1.606 s ± 0.014 s [User: 1.393 s, System: 0.087 s] Range (min … max): 1.591 s … 1.628 s 5 runs Benchmark 2: ./fast.sh Time (mean ± σ): 452.9 ms ± 7.6 ms [User: 249.9 ms, System: 83.3 ms] Range (min … max): 443.9 ms … 461.7 ms 5 runs Summary ./fast.sh ran 3.55 ± 0.07 times faster than ./slow.sh ``` Fixes #125444
Diffstat (limited to 'llvm/test/Transforms/SimpleLoopUnswitch')
0 files changed, 0 insertions, 0 deletions