aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/Expressions.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-11 04:27:34 +0000
committerChris Lattner <sabre@nondot.org>2001-09-11 04:27:34 +0000
commit69f8ce051e34638fc4b3df4acbb33266d9eefd9d (patch)
tree4695f53e1e99f54fc06b2f7deb2e1c91623c26bf /include/llvm/Analysis/Expressions.h
parent871ffd7a2e03209bfea8b197a4a50759abd4065e (diff)
Handle subtract in expression classifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@548 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/Expressions.h')
-rw-r--r--include/llvm/Analysis/Expressions.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/include/llvm/Analysis/Expressions.h b/include/llvm/Analysis/Expressions.h
index 0471fb21a6..9ddd5863b5 100644
--- a/include/llvm/Analysis/Expressions.h
+++ b/include/llvm/Analysis/Expressions.h
@@ -11,6 +11,7 @@
#define LLVM_ANALYSIS_EXPRESSIONS_H
#include <assert.h>
+class Type;
class Value;
class ConstPoolInt;
@@ -42,15 +43,13 @@ struct ExprType {
Offset = CPV; Var = 0; Scale = 0;
ExprTy = Constant;
}
- inline ExprType(Value *Val) {
- Var = Val; Offset = Scale = 0;
- ExprTy = Var ? Linear : Constant;
- }
- inline ExprType(const ConstPoolInt *scale, Value *var,
- const ConstPoolInt *offset) {
- Scale = scale; Var = var; Offset = offset;
- ExprTy = Scale ? ScaledLinear : (Var ? Linear : Constant);
- }
+ ExprType(Value *Val); // Create a linear or constant expression
+ ExprType(const ConstPoolInt *scale, Value *var, const ConstPoolInt *offset);
+
+ // If this expression has an intrinsic type, return it. If it is zero, return
+ // the specified type.
+ //
+ const Type *getExprType(const Type *Default) const;
};
} // End namespace analysis