Mercurial > hg > CbC > CbC_llvm
comparison lib/IR/ConstantFold.h @ 120:1172e4bd9c6f
update 4.0.0
author | mir3636 |
---|---|
date | Fri, 25 Nov 2016 19:14:25 +0900 |
parents | 7d135dc70f03 |
children | c2174574ed3a |
comparison
equal
deleted
inserted
replaced
101:34baf5011add | 120:1172e4bd9c6f |
---|---|
17 //===----------------------------------------------------------------------===// | 17 //===----------------------------------------------------------------------===// |
18 | 18 |
19 #ifndef LLVM_LIB_IR_CONSTANTFOLD_H | 19 #ifndef LLVM_LIB_IR_CONSTANTFOLD_H |
20 #define LLVM_LIB_IR_CONSTANTFOLD_H | 20 #define LLVM_LIB_IR_CONSTANTFOLD_H |
21 | 21 |
22 #include "llvm/ADT/ArrayRef.h" | 22 #include "llvm/ADT/Optional.h" |
23 | 23 |
24 namespace llvm { | 24 namespace llvm { |
25 template <typename T> class ArrayRef; | |
25 class Value; | 26 class Value; |
26 class Constant; | 27 class Constant; |
27 class Type; | 28 class Type; |
28 | 29 |
29 // Constant fold various types of instruction... | 30 // Constant fold various types of instruction... |
43 ArrayRef<unsigned> Idxs); | 44 ArrayRef<unsigned> Idxs); |
44 Constant *ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val, | 45 Constant *ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val, |
45 ArrayRef<unsigned> Idxs); | 46 ArrayRef<unsigned> Idxs); |
46 Constant *ConstantFoldBinaryInstruction(unsigned Opcode, Constant *V1, | 47 Constant *ConstantFoldBinaryInstruction(unsigned Opcode, Constant *V1, |
47 Constant *V2); | 48 Constant *V2); |
48 Constant *ConstantFoldCompareInstruction(unsigned short predicate, | 49 Constant *ConstantFoldCompareInstruction(unsigned short predicate, |
49 Constant *C1, Constant *C2); | 50 Constant *C1, Constant *C2); |
50 Constant *ConstantFoldGetElementPtr(Type *Ty, Constant *C, bool inBounds, | 51 Constant *ConstantFoldGetElementPtr(Type *Ty, Constant *C, bool InBounds, |
51 ArrayRef<Constant *> Idxs); | 52 Optional<unsigned> InRangeIndex, |
52 Constant *ConstantFoldGetElementPtr(Type *Ty, Constant *C, bool inBounds, | |
53 ArrayRef<Value *> Idxs); | 53 ArrayRef<Value *> Idxs); |
54 } // End llvm namespace | 54 } // End llvm namespace |
55 | 55 |
56 #endif | 56 #endif |