summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/ValueTracking.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-12-26 20:15:01 +0000
committerChris Lattner <sabre@nondot.org>2010-12-26 20:15:01 +0000
commitbb89710dddf967199dfc56e8bf5d28b0003f2ee6 (patch)
treef66bc68414010cc54a71225bc0a8ff4d920786f7 /include/llvm/Analysis/ValueTracking.h
parente6bb649ec63059d795a31198c3c569c137e7ad59 (diff)
downloadllvm-bb89710dddf967199dfc56e8bf5d28b0003f2ee6.tar.gz
llvm-bb89710dddf967199dfc56e8bf5d28b0003f2ee6.tar.bz2
llvm-bb89710dddf967199dfc56e8bf5d28b0003f2ee6.tar.xz
move isBytewiseValue out to ValueTracking.h/cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ValueTracking.h')
-rw-r--r--include/llvm/Analysis/ValueTracking.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h
index dcc150d18d..370282d0c0 100644
--- a/include/llvm/Analysis/ValueTracking.h
+++ b/include/llvm/Analysis/ValueTracking.h
@@ -77,7 +77,13 @@ namespace llvm {
///
bool CannotBeNegativeZero(const Value *V, unsigned Depth = 0);
-
+ /// isBytewiseValue - If the specified value can be set by repeating the same
+ /// byte in memory, return the i8 value that it is represented with. This is
+ /// true for all i8 values obviously, but is also true for i32 0, i32 -1,
+ /// i16 0xF0F0, double 0.0 etc. If the value can't be handled with a repeated
+ /// byte store (e.g. i16 0x1234), return null.
+ Value *isBytewiseValue(Value *V);
+
/// FindInsertedValue - Given an aggregrate and an sequence of indices, see if
/// the scalar value indexed is already around as a register, for example if
/// it were inserted directly into the aggregrate.