aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/ConstantFold.cpp7
-rw-r--r--lib/VMCore/ConstantFold.h2
-rw-r--r--lib/VMCore/ConstantFolding.h2
3 files changed, 11 insertions, 0 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp
index ef929d7315..b15c472459 100644
--- a/lib/VMCore/ConstantFold.cpp
+++ b/lib/VMCore/ConstantFold.cpp
@@ -1600,6 +1600,13 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode,
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 ||
diff --git a/lib/VMCore/ConstantFold.h b/lib/VMCore/ConstantFold.h
index 2824979cf4..ee3c64cc59 100644
--- a/lib/VMCore/ConstantFold.h
+++ b/lib/VMCore/ConstantFold.h
@@ -45,6 +45,8 @@ namespace llvm {
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
diff --git a/lib/VMCore/ConstantFolding.h b/lib/VMCore/ConstantFolding.h
index 2824979cf4..ee3c64cc59 100644
--- a/lib/VMCore/ConstantFolding.h
+++ b/lib/VMCore/ConstantFolding.h
@@ -45,6 +45,8 @@ namespace llvm {
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