[PATCH] D58166: [BPI] Look through bitcasts in calcZeroHeuristic

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 00:21:57 PST 2019


samparker created this revision.
samparker added reviewers: apilipenko, bkramer, john.brawn, gberry.

Constant hoisting may have hidden a constant behind a bitcast so that it isn't folded into its users. However, this prevents BPI from calculating some of its heuristics that are based upon constant values. So, I've added a simple helper function to look through these casts.


https://reviews.llvm.org/D58166

Files:
  lib/Analysis/BranchProbabilityInfo.cpp
  test/Analysis/BranchProbabilityInfo/zero_heuristics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58166.186594.patch
Type: text/x-patch
Size: 4193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190213/3896a22f/attachment.bin>


More information about the llvm-commits mailing list