Move some constant folding logic for loads out of instcombine into
[oota-llvm.git] / include / llvm / Analysis / ConstantFolding.h
index 9805c6cf28d3d5de5e407ee52d846900a28a8e7e..78a16daeb7a157decbdc292028815ec594920c86 100644 (file)
@@ -62,6 +62,10 @@ Constant *ConstantFoldCompareInstOperands(unsigned Predicate,
                                           LLVMContext &Context,
                                           const TargetData *TD = 0);
 
+/// ConstantFoldLoadFromConstPtr - Return the value that a load from C would
+/// produce if it is constant and determinable.  If this is not determinable,
+/// return null.
+Constant *ConstantFoldLoadFromConstPtr(Constant *C, const TargetData *TD = 0);
 
 /// ConstantFoldLoadThroughGEPConstantExpr - Given a constant and a
 /// getelementptr constantexpr, return the constant value being addressed by the