[llvm-commits] CVS: llvm/include/llvm/Transforms/Utils/Local.h

Chris Lattner lattner at cs.uiuc.edu
Mon Jan 12 12:27:01 PST 2004


Changes in directory llvm/include/llvm/Transforms/Utils:

Local.h updated: 1.13 -> 1.14

---
Log message:

llvm::ConstantFoldInstruction


---
Diffs of the changes:  (+7 -0)

Index: llvm/include/llvm/Transforms/Utils/Local.h
diff -u llvm/include/llvm/Transforms/Utils/Local.h:1.13 llvm/include/llvm/Transforms/Utils/Local.h:1.14
--- llvm/include/llvm/Transforms/Utils/Local.h:1.13	Thu Dec 18 23:56:20 2003
+++ llvm/include/llvm/Transforms/Utils/Local.h	Mon Jan 12 12:25:56 2004
@@ -38,6 +38,13 @@
 ///
 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...





More information about the llvm-commits mailing list