aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-08-14 17:45:39 +0000
committerChris Lattner <sabre@nondot.org>2002-08-14 17:45:39 +0000
commite4c3764a9fa7bb7c6438567b2ddbf3f3d3ac8390 (patch)
treed53a88b92c7ae36a457044aa3264e095175336f8 /lib
parent500888b7e8b4ad9901b13f298d0194eafd34b354 (diff)
downloadexternal_llvm-e4c3764a9fa7bb7c6438567b2ddbf3f3d3ac8390.zip
external_llvm-e4c3764a9fa7bb7c6438567b2ddbf3f3d3ac8390.tar.gz
external_llvm-e4c3764a9fa7bb7c6438567b2ddbf3f3d3ac8390.tar.bz2
Remove support for NOT instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3313 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/ExecutionEngine/Interpreter/Execution.cpp29
-rw-r--r--lib/Transforms/IPO/MutateStructTypes.cpp6
2 files changed, 0 insertions, 35 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp
index 9add907..7bf276a 100644
--- a/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -268,34 +268,6 @@ Annotation *GlobalAddress::Create(AnnotationID AID, const Annotable *O, void *){
return new GlobalAddress(Addr, true); // Simply invoke the ctor
}
-
-//===----------------------------------------------------------------------===//
-// Unary Instruction Implementations
-//===----------------------------------------------------------------------===//
-
-#define IMPLEMENT_UNARY_OPERATOR(OP, TY) \
- case Type::TY##TyID: Dest.TY##Val = OP Src.TY##Val; break
-
-static void executeNotInst(UnaryOperator &I, ExecutionContext &SF) {
- const Type *Ty = I.getOperand(0)->getType();
- GenericValue Src = getOperandValue(I.getOperand(0), SF);
- GenericValue Dest;
- switch (Ty->getPrimitiveID()) {
- IMPLEMENT_UNARY_OPERATOR(~, UByte);
- IMPLEMENT_UNARY_OPERATOR(~, SByte);
- IMPLEMENT_UNARY_OPERATOR(~, UShort);
- IMPLEMENT_UNARY_OPERATOR(~, Short);
- IMPLEMENT_UNARY_OPERATOR(~, UInt);
- IMPLEMENT_UNARY_OPERATOR(~, Int);
- IMPLEMENT_UNARY_OPERATOR(~, ULong);
- IMPLEMENT_UNARY_OPERATOR(~, Long);
- IMPLEMENT_UNARY_OPERATOR(~, Pointer);
- default:
- cout << "Unhandled type for Not instruction: " << Ty << "\n";
- }
- SetValue(&I, Dest, SF);
-}
-
//===----------------------------------------------------------------------===//
// Binary Instruction Implementations
//===----------------------------------------------------------------------===//
@@ -1184,7 +1156,6 @@ bool Interpreter::executeInstruction() {
executeBinaryInst(cast<BinaryOperator>(I), SF);
} else {
switch (I.getOpcode()) {
- case Instruction::Not: executeNotInst(cast<UnaryOperator>(I),SF); break;
// Terminators
case Instruction::Ret: executeRetInst (cast<ReturnInst>(I), SF); break;
case Instruction::Br: executeBrInst (cast<BranchInst>(I), SF); break;
diff --git a/lib/Transforms/IPO/MutateStructTypes.cpp b/lib/Transforms/IPO/MutateStructTypes.cpp
index 174f7a1..f0dc16f 100644
--- a/lib/Transforms/IPO/MutateStructTypes.cpp
+++ b/lib/Transforms/IPO/MutateStructTypes.cpp
@@ -365,12 +365,6 @@ void MutateStructTypes::transformFunction(Function *m) {
case Instruction::Invoke:
assert(0 && "Insn not implemented!");
- // Unary Instructions
- case Instruction::Not:
- NewI = UnaryOperator::create((Instruction::UnaryOps)I.getOpcode(),
- ConvertValue(I.getOperand(0)));
- break;
-
// Binary Instructions
case Instruction::Add:
case Instruction::Sub: