|
26 | 26 | #include <optional> |
27 | 27 |
|
28 | 28 | namespace llvm { |
29 | | - template <typename T> class ArrayRef; |
30 | | - class Value; |
31 | | - class Constant; |
32 | | - class Type; |
| 29 | +template <typename T> class ArrayRef; |
| 30 | +class Value; |
| 31 | +class Constant; |
| 32 | +class Type; |
33 | 33 |
|
34 | | - // Constant fold various types of instruction... |
35 | | - LLVM_ABI Constant * |
36 | | - ConstantFoldCastInstruction(unsigned opcode, ///< The opcode of the cast |
37 | | - Constant *V, ///< The source constant |
38 | | - Type *DestTy ///< The destination type |
39 | | - ); |
40 | | - LLVM_ABI Constant *ConstantFoldSelectInstruction(Constant *Cond, Constant *V1, |
41 | | - Constant *V2); |
42 | | - LLVM_ABI Constant *ConstantFoldExtractElementInstruction(Constant *Val, |
43 | | - Constant *Idx); |
44 | | - LLVM_ABI Constant *ConstantFoldInsertElementInstruction(Constant *Val, |
45 | | - Constant *Elt, |
46 | | - Constant *Idx); |
47 | | - LLVM_ABI Constant *ConstantFoldShuffleVectorInstruction(Constant *V1, |
48 | | - Constant *V2, |
49 | | - ArrayRef<int> Mask); |
50 | | - LLVM_ABI Constant * |
51 | | - ConstantFoldExtractValueInstruction(Constant *Agg, ArrayRef<unsigned> Idxs); |
52 | | - LLVM_ABI Constant * |
53 | | - ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val, |
54 | | - ArrayRef<unsigned> Idxs); |
55 | | - LLVM_ABI Constant *ConstantFoldUnaryInstruction(unsigned Opcode, Constant *V); |
56 | | - LLVM_ABI Constant *ConstantFoldBinaryInstruction(unsigned Opcode, |
57 | | - Constant *V1, Constant *V2); |
58 | | - LLVM_ABI Constant * |
59 | | - ConstantFoldCompareInstruction(CmpInst::Predicate Predicate, Constant *C1, |
60 | | - Constant *C2); |
61 | | - LLVM_ABI Constant * |
62 | | - ConstantFoldGetElementPtr(Type *Ty, Constant *C, |
63 | | - std::optional<ConstantRange> InRange, |
64 | | - ArrayRef<Value *> Idxs); |
65 | | -} // End llvm namespace |
| 34 | +// Constant fold various types of instruction... |
| 35 | +LLVM_ABI Constant * |
| 36 | +ConstantFoldCastInstruction(unsigned opcode, ///< The opcode of the cast |
| 37 | + Constant *V, ///< The source constant |
| 38 | + Type *DestTy ///< The destination type |
| 39 | +); |
| 40 | +LLVM_ABI Constant *ConstantFoldSelectInstruction(Constant *Cond, Constant *V1, |
| 41 | + Constant *V2); |
| 42 | +LLVM_ABI Constant *ConstantFoldExtractElementInstruction(Constant *Val, |
| 43 | + Constant *Idx); |
| 44 | +LLVM_ABI Constant *ConstantFoldInsertElementInstruction(Constant *Val, |
| 45 | + Constant *Elt, |
| 46 | + Constant *Idx); |
| 47 | +LLVM_ABI Constant *ConstantFoldShuffleVectorInstruction(Constant *V1, |
| 48 | + Constant *V2, |
| 49 | + ArrayRef<int> Mask); |
| 50 | +LLVM_ABI Constant *ConstantFoldExtractValueInstruction(Constant *Agg, |
| 51 | + ArrayRef<unsigned> Idxs); |
| 52 | +LLVM_ABI Constant *ConstantFoldInsertValueInstruction(Constant *Agg, |
| 53 | + Constant *Val, |
| 54 | + ArrayRef<unsigned> Idxs); |
| 55 | +LLVM_ABI Constant *ConstantFoldUnaryInstruction(unsigned Opcode, Constant *V); |
| 56 | +LLVM_ABI Constant *ConstantFoldBinaryInstruction(unsigned Opcode, Constant *V1, |
| 57 | + Constant *V2); |
| 58 | +LLVM_ABI Constant *ConstantFoldCompareInstruction(CmpInst::Predicate Predicate, |
| 59 | + Constant *C1, Constant *C2); |
| 60 | +LLVM_ABI Constant * |
| 61 | +ConstantFoldGetElementPtr(Type *Ty, Constant *C, |
| 62 | + std::optional<ConstantRange> InRange, |
| 63 | + ArrayRef<Value *> Idxs); |
| 64 | +} // namespace llvm |
66 | 65 |
|
67 | 66 | #endif |
0 commit comments