aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-05-08 16:22:48 +0000
committerCraig Topper <craig.topper@gmail.com>2017-05-08 16:22:48 +0000
commit6e11a05e7eecbaae38c39e718e08c916cffb8b4b (patch)
treebd5c5d01201528a141017e7881903b35428a70c5 /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent2df38a80f1d0886907a0578958fd3534c89cb097 (diff)
downloadllvm-6e11a05e7eecbaae38c39e718e08c916cffb8b4b.zip
llvm-6e11a05e7eecbaae38c39e718e08c916cffb8b4b.tar.gz
llvm-6e11a05e7eecbaae38c39e718e08c916cffb8b4b.tar.bz2
[ValueTracking] Introduce a version of computeKnownBits that returns a KnownBits struct. Begin using it to replace internal usages of ComputeSignBit
This introduces a new interface for computeKnownBits that returns the KnownBits object instead of requiring it to be pre-constructed and passed in by reference. This is a much more convenient interface as it doesn't require the caller to figure out the BitWidth to pre-construct the object. It's so convenient that I believe we can use this interface to remove the special ComputeSignBit flavor of computeKnownBits. As a step towards that idea, this patch replaces all of the internal usages of ComputeSignBit with this new interface. As you can see from the patch there were a couple places where we called ComputeSignBit which really called computeKnownBits, and then called computeKnownBits again directly. I've reduced those places to only making one call to computeKnownBits. I bet there are probably external users that do it too. A future patch will update the external users and remove the ComputeSignBit interface. I'll also working on moving more locations to the KnownBits returning interface for computeKnownBits. Differential Revision: https://reviews.llvm.org/D32848 llvm-svn: 302437
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions