[PATCH] D15466: Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst
David Li via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 11 17:56:58 PST 2015
davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.
This is a nice improvement -- this change looks good to me.
================
Comment at: lib/Analysis/BranchProbabilityInfo.cpp:126
@@ -125,3 +125,3 @@
if (isa<UnreachableInst>(TI))
PostDominatedByUnreachable.insert(BB);
return false;
----------------
davidxl wrote:
> Is it better to move the new logic here in the same place?
Actually I meant line 142 -- but it is probably not cleaner.
================
Comment at: lib/Analysis/BranchProbabilityInfo.cpp:157
@@ +156,3 @@
+ // in calcInvokeHeuristics().
+ return false;
+ }
----------------
davidxl wrote:
> It seems there is no need to return false here -- the code following will handle it just ok. Inserting BB into PostDomByUnreachable is good enough
discard this comment -- though it does not matter what successor BPs are when the BB's weight is zero, it is still better to use the heurisitic later.
http://reviews.llvm.org/D15466
More information about the llvm-commits
mailing list