From 98a45667fb5158f71890f7b242768ad6096d43a5 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 12 Jan 2004 18:25:56 +0000 Subject: [PATCH] llvm::ConstantFoldInstruction llvm-svn: 10787 --- include/llvm/Transforms/Utils/Local.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index c786c965126..05db3b12552 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...