Add some simple insertvalue simplifications, for the purpose of cleaning
[oota-llvm.git] / include / llvm / Analysis / ConstantFolding.h
index b942010f10ca88cbe6540e248b374ad979e38959..05018fa1617a5d13c7b36660acf46202ad95836b 100644 (file)
@@ -61,6 +61,12 @@ Constant *ConstantFoldCompareInstOperands(unsigned Predicate,
                                           Constant *LHS, Constant *RHS,
                                           const TargetData *TD = 0);
 
+/// ConstantFoldInsertValueInstruction - Attempt to constant fold an insertvalue
+/// instruction with the specified operands and indices.  The constant result is
+/// returned if successful; if not, null is returned.
+Constant *ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val,
+                                             ArrayRef<unsigned> Idxs);
+
 /// ConstantFoldLoadFromConstPtr - Return the value that a load from C would
 /// produce if it is constant and determinable.  If this is not determinable,
 /// return null.