diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-12 18:25:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-12 18:25:56 +0000 |
commit | 77ab3f1c89cf810e355014d575138f7e51fa1931 (patch) | |
tree | d5d592c5e2f80f8f6ac5ced5e7bce5c1868d772d /include/llvm/Transforms/Utils/Local.h | |
parent | c4a15098296e08f05216a73822145485f2e3e11b (diff) |
llvm::ConstantFoldInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/Local.h')
-rw-r--r-- | include/llvm/Transforms/Utils/Local.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index c786c96512..05db3b1255 100644 --- a/include/llvm/Transforms/Utils/Local.h +++ b/include/llvm/Transforms/Utils/Local.h @@ -38,6 +38,13 @@ bool doConstantPropagation(BasicBlock::iterator &I); /// bool ConstantFoldTerminator(BasicBlock *BB); +/// ConstantFoldInstruction - Attempt to constant fold the specified +/// instruction. If successful, the constant result is returned, if not, null +/// is returned. Note that this function can only fail when attempting to fold +/// instructions like loads and stores, which have no constant expression form. +/// +Constant *ConstantFoldInstruction(Instruction *I); + //===----------------------------------------------------------------------===// // Local dead code elimination... |