[BPI] Look through bitcasts in calcZeroHeuristic

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.

Differential Revision: https://reviews.llvm.org/D58166


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354119 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed