diff options
author | Alina Sbirlea <asbirlea@google.com> | 2024-01-23 09:42:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 09:42:47 -0800 |
commit | edeaf41e22cc7b1ab9ef30954762f2a08a3c3561 (patch) | |
tree | 3c357796c5cb801bc736e64d8d7aa9c6539c9340 /clang/lib/Interpreter/Interpreter.cpp | |
parent | 3428c28b3d611ac608bb8e22633c65f605a6511e (diff) | |
download | llvm-edeaf41e22cc7b1ab9ef30954762f2a08a3c3561.zip llvm-edeaf41e22cc7b1ab9ef30954762f2a08a3c3561.tar.gz llvm-edeaf41e22cc7b1ab9ef30954762f2a08a3c3561.tar.bz2 |
[ConstantHoisting] Cache OptForSize. (#79170)
CacheOptForSize to remove quadratic behavior.
For each constant analyzed, ConstantHoising calls
`shouldOptimizeForSize(F)`, which calls `PSI.getTotalCallCount(F)`.
PSI.getTotalCallCount(F) goes through all the instructions in all basic
blocks, and checks if each is a call, to count them up.
This reduces `llc` time for a very large IR from ~10min to under 3min.
Reproducer testcase is much too large to share.
Diffstat (limited to 'clang/lib/Interpreter/Interpreter.cpp')
0 files changed, 0 insertions, 0 deletions