[LoopVectorize] Only fetch BFI if profile summary available
authorNikita Popov <npopov@redhat.com>
Tue, 28 Feb 2023 10:49:26 +0000 (11:49 +0100)
committerNikita Popov <npopov@redhat.com>
Tue, 28 Feb 2023 13:16:21 +0000 (14:16 +0100)
commit4bc254c66442ce64075eb257105fb89e53e8a89f
tree67e3b596aa966479668957cc3924ec1228783af9
parenta98b031e4f38520dbf53c2f25efac6c4dd77d0b5
[LoopVectorize] Only fetch BFI if profile summary available

BlockFrequencyInfo should generally only be fetched in PGO builds
where a PSI profile summary is available. However, LoopVectorize
was fetching it unconditionally.

This results in a small compile-time improvement for non-PGO builds.

Differential Revision: https://reviews.llvm.org/D144953
llvm/include/llvm/Transforms/Vectorize/LoopVectorize.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-lto-defaults.ll
llvm/test/Other/new-pm-thinlto-defaults.ll