mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
Make it possible to create an SCEVUnknown from an APInt as well as an int.
llvm-svn: 34816
This commit is contained in:
parent
e5456dea52
commit
ee77d22f26
@ -19,6 +19,7 @@
|
||||
namespace llvm {
|
||||
class ConstantInt;
|
||||
class ConstantRange;
|
||||
class APInt;
|
||||
|
||||
enum SCEVTypes {
|
||||
// These should be ordered in terms of increasing complexity to make the
|
||||
@ -463,6 +464,7 @@ namespace llvm {
|
||||
/// getIntegerSCEV - Given an integer or FP type, create a constant for the
|
||||
/// specified signed integer value and return a SCEV for the constant.
|
||||
static SCEVHandle getIntegerSCEV(int Val, const Type *Ty);
|
||||
static SCEVHandle getIntegerSCEV(const APInt& Val);
|
||||
|
||||
Value *getValue() const { return V; }
|
||||
|
||||
|
@ -460,6 +460,10 @@ SCEVHandle SCEVUnknown::getIntegerSCEV(int Val, const Type *Ty) {
|
||||
return SCEVUnknown::get(C);
|
||||
}
|
||||
|
||||
SCEVHandle SCEVUnknown::getIntegerSCEV(const APInt& Val) {
|
||||
return SCEVUnknown::get(ConstantInt::get(Val));
|
||||
}
|
||||
|
||||
/// getTruncateOrZeroExtend - Return a SCEV corresponding to a conversion of the
|
||||
/// input value to the specified type. If the type must be extended, it is zero
|
||||
/// extended.
|
||||
|
Loading…
Reference in New Issue
Block a user