[SimpleLoopUnswitch] Skip non-trivial unswitching of cold functions
authorRuobing Han <hanruobing@gatech.edu>
Sun, 4 Sep 2022 16:56:25 +0000 (12:56 -0400)
committerRuobing Han <hanruobing@gatech.edu>
Tue, 6 Sep 2022 23:13:31 +0000 (19:13 -0400)
commitfb45f3c9486f5d9e3003db95386432562b23577c
tree3e87d6763c3a18402662b409c5510eea433fa0ed
parentbb6d12b5ceb9386cce9021e7b6fa04696f3d294a
[SimpleLoopUnswitch] Skip non-trivial unswitching of cold functions

In the current main branch, all cold loops will not be applied non-trivial unswitch. As reported in D129599, skipping these cold loops will incur regression in SPEC benchmark.
Thus, instead of skipping cold loops, now only skipping loops in cold functions.

Reviewed By: alexgatea, aeubanks

Differential Revision: https://reviews.llvm.org/D133275
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
llvm/test/Transforms/SimpleLoopUnswitch/PGO-nontrivial-unswitch.ll
llvm/test/Transforms/SimpleLoopUnswitch/PGO-nontrivial-unswitch2.ll