summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/ConstantFolding.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-09-05 06:52:48 +0000
committerDuncan Sands <baldrick@free.fr>2011-09-05 06:52:48 +0000
commitdabc2806726a286b00313419fac8461ebe0f774c (patch)
treeb0e316861d47fb91235ebff6b1aeb19bf4729f40 /include/llvm/Analysis/ConstantFolding.h
parent26eb870d7e0e28ecb25a0cd77e6cdc0490707eff (diff)
downloadllvm-dabc2806726a286b00313419fac8461ebe0f774c.tar.gz
llvm-dabc2806726a286b00313419fac8461ebe0f774c.tar.bz2
llvm-dabc2806726a286b00313419fac8461ebe0f774c.tar.xz
Add some simple insertvalue simplifications, for the purpose of cleaning
up do-nothing exception handling code produced by dragonegg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139113 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ConstantFolding.h')
-rw-r--r--include/llvm/Analysis/ConstantFolding.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ConstantFolding.h b/include/llvm/Analysis/ConstantFolding.h
index b942010f10..05018fa161 100644
--- a/include/llvm/Analysis/ConstantFolding.h
+++ b/include/llvm/Analysis/ConstantFolding.h
@@ -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.