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.
39 KiB
39 KiB