[PATCH] D85781: [BPI] Improve static heuristics for integer comparisons

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 22:02:58 PDT 2020


ebrevnov added a comment.

Any perf data?



================
Comment at: llvm/lib/Analysis/BranchProbabilityInfo.cpp:880
+                                ZH_TAKEN_WEIGHT + ZH_NONTAKEN_WEIGHT);
+  bool isProb;
   Value *RHS = CI->getOperand(1);
----------------
I think we better avoid extending the scope of 'isProb' variable. Please either introduce scope local variable or just use CI->isTrueWhenEqual directly in the 'if'.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85781/new/

https://reviews.llvm.org/D85781



More information about the llvm-commits mailing list