aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-26 05:26:32 +0000
committerChris Lattner <sabre@nondot.org>2005-09-26 05:26:32 +0000
commitc5406b55d58b7378822d5f6316bf253ad0eaa82d (patch)
treea3eaeb6e3caa8c422b00f0ea6c789be9a813c2a7 /include/llvm/Transforms
parent562a055ca731c2f673cc4cfb60de963fce5e38a6 (diff)
downloadexternal_llvm-c5406b55d58b7378822d5f6316bf253ad0eaa82d.zip
external_llvm-c5406b55d58b7378822d5f6316bf253ad0eaa82d.tar.gz
external_llvm-c5406b55d58b7378822d5f6316bf253ad0eaa82d.tar.bz2
add a new function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23443 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/Utils/Local.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h
index 2cf47e6..6c8153d 100644
--- a/include/llvm/Transforms/Utils/Local.h
+++ b/include/llvm/Transforms/Utils/Local.h
@@ -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...