- Constant *ConstantFoldSelectInstruction(const Constant *Cond,
- const Constant *V1,
- const Constant *V2);
- Constant *ConstantFoldExtractElementInstruction(const Constant *Val,
- const Constant *Idx);
- Constant *ConstantFoldInsertElementInstruction(const Constant *Val,
- const Constant *Elt,
- const Constant *Idx);
- Constant *ConstantFoldShuffleVectorInstruction(const Constant *V1,
- const Constant *V2,
- const Constant *Mask);
- Constant *ConstantFoldBinaryInstruction(unsigned Opcode, const Constant *V1,
- const Constant *V2);
+ Constant *ConstantFoldSelectInstruction(Constant *Cond,
+ Constant *V1, Constant *V2);
+ Constant *ConstantFoldExtractElementInstruction(Constant *Val, Constant *Idx);
+ Constant *ConstantFoldInsertElementInstruction(Constant *Val, Constant *Elt,
+ Constant *Idx);
+ Constant *ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2,
+ Constant *Mask);
+ Constant *ConstantFoldExtractValueInstruction(Constant *Agg,
+ ArrayRef<unsigned> Idxs);
+ Constant *ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val,
+ ArrayRef<unsigned> Idxs);
+ Constant *ConstantFoldBinaryInstruction(unsigned Opcode, Constant *V1,
+ Constant *V2);