[llvm-commits] CVS: llvm/lib/VMCore/ConstantFolding.cpp ConstantFolding.h
Reid Spencer
reid at x10sys.com
Sun Dec 3 21:19:48 PST 2006
Changes in directory llvm/lib/VMCore:
ConstantFolding.cpp updated: 1.106 -> 1.107
ConstantFolding.h updated: 1.49 -> 1.50
---
Log message:
For PR950: http://llvm.org/PR950 : Implement a stub for folding ICmp and FCmp instructions
---
Diffs of the changes: (+9 -0)
ConstantFolding.cpp | 7 +++++++
ConstantFolding.h | 2 ++
2 files changed, 9 insertions(+)
Index: llvm/lib/VMCore/ConstantFolding.cpp
diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.106 llvm/lib/VMCore/ConstantFolding.cpp:1.107
--- llvm/lib/VMCore/ConstantFolding.cpp:1.106 Sun Dec 3 20:45:43 2006
+++ llvm/lib/VMCore/ConstantFolding.cpp Sun Dec 3 23:19:34 2006
@@ -1600,6 +1600,13 @@
return 0;
}
+Constant *llvm::ConstantFoldCompare(
+ unsigned opcode, Constant *C1, Constant *C2, unsigned short predicate)
+{
+ // Place holder for future folding of ICmp and FCmp instructions
+ return 0;
+}
+
Constant *llvm::ConstantFoldGetElementPtr(const Constant *C,
const std::vector<Value*> &IdxList) {
if (IdxList.size() == 0 ||
Index: llvm/lib/VMCore/ConstantFolding.h
diff -u llvm/lib/VMCore/ConstantFolding.h:1.49 llvm/lib/VMCore/ConstantFolding.h:1.50
--- llvm/lib/VMCore/ConstantFolding.h:1.49 Sun Nov 26 19:05:10 2006
+++ llvm/lib/VMCore/ConstantFolding.h Sun Dec 3 23:19:34 2006
@@ -45,6 +45,8 @@
const Constant *Mask);
Constant *ConstantFoldBinaryInstruction(unsigned Opcode, const Constant *V1,
const Constant *V2);
+ Constant *ConstantFoldCompare(unsigned opcode, Constant *C1, Constant *C2,
+ unsigned short predicate);
Constant *ConstantFoldGetElementPtr(const Constant *C,
const std::vector<Value*> &IdxList);
} // End llvm namespace
More information about the llvm-commits
mailing list