[SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops
authorRuobing Han <hanruobing@gatech.edu>
Mon, 1 Aug 2022 17:22:45 +0000 (17:22 +0000)
committerRuobing Han <hanruobing@gatech.edu>
Mon, 8 Aug 2022 18:12:04 +0000 (18:12 +0000)
commitf756f06cc471b91d81d7f7f15d9df76ed24de730
tree522dc01ac406696b3a5afed41b16dbb7b8437ca2
parent6c52f82d77a1b8d9d9f8b585c73f94e58191b5a9
[SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops

With profile data, non-trivial LoopUnswitch will only apply on non-cold loops, as unswitching cold loops may not gain much benefit but significantly increase the code size.

Reviewed By: aeubanks, asbirlea

Differential Revision: https://reviews.llvm.org/D129599
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-thinlto-defaults.ll
llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
llvm/test/Transforms/LoopPredication/preserve-bpi.ll
llvm/test/Transforms/SimpleLoopUnswitch/PGO-nontrivial-unswitch.ll
llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-markloopasdeleted.ll