[LoopSink] Don't fetch analyses without profile data (NFCI)
authorNikita Popov <npopov@redhat.com>
Tue, 28 Feb 2023 13:21:46 +0000 (14:21 +0100)
committerNikita Popov <npopov@redhat.com>
Tue, 28 Feb 2023 13:43:43 +0000 (14:43 +0100)
commit69d4e5ae7b976ded707e78d033b3490ca9ce0ba7
tree206ff6ce36e13ef32153f86986609fc7a15f78ba
parentff0ca64ea2c96ee2c3653770a9832c18ac4af998
[LoopSink] Don't fetch analyses without profile data (NFCI)

The loop sink pass only does something if the function has
profile data. Move the check for that before analyses are fetched,
to avoid computing things like BFI or MSSA unnecessarily.
llvm/lib/Transforms/Scalar/LoopSink.cpp
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-thinlto-defaults.ll