add a new function
authorChris Lattner <sabre@nondot.org>
Mon, 26 Sep 2005 05:26:32 +0000 (05:26 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 26 Sep 2005 05:26:32 +0000 (05:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23443 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Utils/Local.h

index 2cf47e622ab671ecd0f2e92c65250debe2b35422..6c8153ddf09bce35ac75d17e356691d30c8379b0 100644 (file)
@@ -22,6 +22,7 @@ namespace llvm {
 class Pass;
 class PHINode;
 class AllocaInst;
+class ConstantExpr;
 
 //===----------------------------------------------------------------------===//
 //  Local constant propagation...
@@ -55,6 +56,10 @@ bool canConstantFoldCallTo(Function *F);
 /// with the specified arguments, returning null if unsuccessful.
 Constant *ConstantFoldCall(Function *F, const std::vector<Constant*> &Operands);
 
+/// ConstantFoldLoadThroughGEPConstantExpr - Given a constant and a
+/// getelementptr constantexpr, return the constant value being addressed by the
+/// constant expression, or null if something is funny and we can't decide.
+Constant *ConstantFoldLoadThroughGEPConstantExpr(Constant *C, ConstantExpr *CE);
 
 //===----------------------------------------------------------------------===//
 //  Local dead code elimination...