aboutsummaryrefslogtreecommitdiff
path: root/llvm/include/llvm/IR/Constants.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/IR/Constants.h')
-rw-r--r--llvm/include/llvm/IR/Constants.h36
1 files changed, 8 insertions, 28 deletions
diff --git a/llvm/include/llvm/IR/Constants.h b/llvm/include/llvm/IR/Constants.h
index b5445ff71b74..c50dff43dc74 100644
--- a/llvm/include/llvm/IR/Constants.h
+++ b/llvm/include/llvm/IR/Constants.h
@@ -1017,19 +1017,10 @@ public:
static Constant *getNot(Constant *C);
static Constant *getAdd(Constant *C1, Constant *C2, bool HasNUW = false,
bool HasNSW = false);
- static Constant *getFAdd(Constant *C1, Constant *C2);
static Constant *getSub(Constant *C1, Constant *C2, bool HasNUW = false,
bool HasNSW = false);
- static Constant *getFSub(Constant *C1, Constant *C2);
static Constant *getMul(Constant *C1, Constant *C2, bool HasNUW = false,
bool HasNSW = false);
- static Constant *getFMul(Constant *C1, Constant *C2);
- static Constant *getUDiv(Constant *C1, Constant *C2, bool isExact = false);
- static Constant *getSDiv(Constant *C1, Constant *C2, bool isExact = false);
- static Constant *getFDiv(Constant *C1, Constant *C2);
- static Constant *getURem(Constant *C1, Constant *C2);
- static Constant *getSRem(Constant *C1, Constant *C2);
- static Constant *getFRem(Constant *C1, Constant *C2);
static Constant *getAnd(Constant *C1, Constant *C2);
static Constant *getOr(Constant *C1, Constant *C2);
static Constant *getXor(Constant *C1, Constant *C2);
@@ -1093,14 +1084,6 @@ public:
return getShl(C1, C2, true, false);
}
- static Constant *getExactSDiv(Constant *C1, Constant *C2) {
- return getSDiv(C1, C2, true);
- }
-
- static Constant *getExactUDiv(Constant *C1, Constant *C2) {
- return getUDiv(C1, C2, true);
- }
-
static Constant *getExactAShr(Constant *C1, Constant *C2) {
return getAShr(C1, C2, true);
}
@@ -1201,10 +1184,6 @@ public:
/// Return true if this is a compare constant expression
bool isCompare() const;
- /// Return true if this is an insertvalue or extractvalue expression,
- /// and the getIndices() method may be used.
- bool hasIndices() const;
-
/// Select constant expr
///
/// \param OnlyIfReducedTy see \a getWithOperands() docs.
@@ -1294,9 +1273,6 @@ public:
static Constant *getShuffleVector(Constant *V1, Constant *V2,
ArrayRef<int> Mask,
Type *OnlyIfReducedTy = nullptr);
- static Constant *getInsertValue(Constant *Agg, Constant *Val,
- ArrayRef<unsigned> Idxs,
- Type *OnlyIfReducedTy = nullptr);
/// Return the opcode at the root of this constant expression
unsigned getOpcode() const { return getSubclassDataFromValue(); }
@@ -1305,10 +1281,6 @@ public:
/// FCMP constant expression.
unsigned getPredicate() const;
- /// Assert that this is an insertvalue or exactvalue
- /// expression and return the list of indices.
- ArrayRef<unsigned> getIndices() const;
-
/// Assert that this is a shufflevector and return the mask. See class
/// ShuffleVectorInst for a description of the mask representation.
ArrayRef<int> getShuffleMask() const;
@@ -1352,6 +1324,14 @@ public:
/// would make it harder to remove ConstantExprs altogether.
Instruction *getAsInstruction(Instruction *InsertBefore = nullptr) const;
+ /// Whether creating a constant expression for this binary operator is
+ /// desirable.
+ static bool isDesirableBinOp(unsigned Opcode);
+
+ /// Whether creating a constant expression for this binary operator is
+ /// supported.
+ static bool isSupportedBinOp(unsigned Opcode);
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
static bool classof(const Value *V) {
return V->getValueID() == ConstantExprVal;