[PATCH] D15466: Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 14:57:58 PST 2015


davidxl added inline comments.

================
Comment at: lib/Analysis/BranchProbabilityInfo.cpp:126
@@ -125,3 +125,3 @@
     if (isa<UnreachableInst>(TI))
       PostDominatedByUnreachable.insert(BB);
     return false;
----------------
Is it better to move the new logic here in the same place?

================
Comment at: lib/Analysis/BranchProbabilityInfo.cpp:157
@@ +156,3 @@
+      // in calcInvokeHeuristics().
+      return false;
+    }
----------------
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


http://reviews.llvm.org/D15466





More information about the llvm-commits mailing list