[CGProfile] Don't fetch BFI without profile (NFCI)
authorNikita Popov <npopov@redhat.com>
Tue, 28 Feb 2023 13:49:38 +0000 (14:49 +0100)
committerNikita Popov <npopov@redhat.com>
Tue, 28 Feb 2023 14:23:07 +0000 (15:23 +0100)
commit26202a57e5e78b5473ef657737d181f0a68ed56d
tree4fe12850de438599d69dde28e70c33988c2c1482
parentd8d91b2a25db8920c44a3dea36fc0eeff93bdfa0
[CGProfile] Don't fetch BFI without profile (NFCI)

Don't fetch BFI if the function has no entry count. Peculiarly,
the implementation was already doing this for the (no longer
existing) legacy PM implementation, but the same principle applies
to the new pass manager. The only reason why the new PM doesn't
have LazyBFI is that with the new pass manager all passes are
lazy.

This improves compile-time for non-PGO builds.
clang/test/CodeGen/sanitizer-module-constructor.c
llvm/lib/Transforms/Instrumentation/CGProfile.cpp
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-lto-defaults.ll
llvm/test/Other/new-pm-thinlto-defaults.ll