[PATCH] D11605: [LoopUnswitch] Add block frequency analysis to recognize hot/cold regions
Chen Li via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 11:48:45 PDT 2015
chenli added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:441
@@ +440,3 @@
+
+ if (LoopUnswitchWithBlockFrequency) {
+ BranchProbabilityInfo BPI(*F, *LI);
----------------
davidxl wrote:
> Note that this also triggers the check when PGO is not enabled (e.g, with static prediction).
>
> To check if PGO is on, do:
>
> HasProfileData = F.getEntryCount().hasValue();
> if (HasProfileData) {
>
> ..
Do you mean that without PGO enabled, this should never be triggered?
http://reviews.llvm.org/D11605
More information about the llvm-commits
mailing list