aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Bytecode/Reader/InstructionReader.cpp4
-rw-r--r--lib/Target/SparcV9/SparcV9InstrInfo.cpp16
-rw-r--r--lib/Target/SparcV9/SparcV9PreSelection.cpp4
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp2
-rw-r--r--lib/VMCore/BasicBlock.cpp4
-rw-r--r--lib/VMCore/Constants.cpp4
6 files changed, 17 insertions, 17 deletions
diff --git a/lib/Bytecode/Reader/InstructionReader.cpp b/lib/Bytecode/Reader/InstructionReader.cpp
index 40360991f5..a4750b0e59 100644
--- a/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/lib/Bytecode/Reader/InstructionReader.cpp
@@ -122,8 +122,8 @@ bool BytecodeParser::ParseInstruction(const uchar *&Buf, const uchar *EndBuf,
if (ParseRawInst(Buf, EndBuf, Raw))
return true;
- if (Raw.Opcode >= Instruction::FirstBinaryOp &&
- Raw.Opcode < Instruction::NumBinaryOps && Raw.NumOperands == 2) {
+ if (Raw.Opcode >= Instruction::BinaryOpsBegin &&
+ Raw.Opcode < Instruction::BinaryOpsEnd && Raw.NumOperands == 2) {
Res = BinaryOperator::create((Instruction::BinaryOps)Raw.Opcode,
getValue(Raw.Ty, Raw.Arg1),
getValue(Raw.Ty, Raw.Arg2));
diff --git a/lib/Target/SparcV9/SparcV9InstrInfo.cpp b/lib/Target/SparcV9/SparcV9InstrInfo.cpp
index 148b76ef5a..662c80a357 100644
--- a/lib/Target/SparcV9/SparcV9InstrInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9InstrInfo.cpp
@@ -266,15 +266,15 @@ CreateIntSetInstruction(const TargetMachine& target,
// Entry == 0 ==> no immediate constant field exists at all.
// Entry > 0 ==> abs(immediate constant) <= Entry
//
-vector<int> MaxConstantsTable(Instruction::NumOtherOps);
+vector<int> MaxConstantsTable(Instruction::OtherOpsEnd);
static int
MaxConstantForInstr(unsigned llvmOpCode)
{
int modelOpCode = -1;
- if (llvmOpCode >= Instruction::FirstBinaryOp &&
- llvmOpCode < Instruction::NumBinaryOps)
+ if (llvmOpCode >= Instruction::BinaryOpsBegin &&
+ llvmOpCode < Instruction::BinaryOpsEnd)
modelOpCode = ADD;
else
switch(llvmOpCode) {
@@ -300,15 +300,15 @@ static void
InitializeMaxConstantsTable()
{
unsigned op;
- assert(MaxConstantsTable.size() == Instruction::NumOtherOps &&
+ assert(MaxConstantsTable.size() == Instruction::OtherOpsEnd &&
"assignments below will be illegal!");
- for (op = Instruction::FirstTermOp; op < Instruction::NumTermOps; ++op)
+ for (op = Instruction::TermOpsBegin; op < Instruction::TermOpsEnd; ++op)
MaxConstantsTable[op] = MaxConstantForInstr(op);
- for (op = Instruction::FirstBinaryOp; op < Instruction::NumBinaryOps; ++op)
+ for (op = Instruction::BinaryOpsBegin; op < Instruction::BinaryOpsEnd; ++op)
MaxConstantsTable[op] = MaxConstantForInstr(op);
- for (op = Instruction::FirstMemoryOp; op < Instruction::NumMemoryOps; ++op)
+ for (op = Instruction::MemoryOpsBegin; op < Instruction::MemoryOpsEnd; ++op)
MaxConstantsTable[op] = MaxConstantForInstr(op);
- for (op = Instruction::FirstOtherOp; op < Instruction::NumOtherOps; ++op)
+ for (op = Instruction::OtherOpsBegin; op < Instruction::OtherOpsEnd; ++op)
MaxConstantsTable[op] = MaxConstantForInstr(op);
}
diff --git a/lib/Target/SparcV9/SparcV9PreSelection.cpp b/lib/Target/SparcV9/SparcV9PreSelection.cpp
index 916938dabe..56c34edbb7 100644
--- a/lib/Target/SparcV9/SparcV9PreSelection.cpp
+++ b/lib/Target/SparcV9/SparcV9PreSelection.cpp
@@ -214,8 +214,8 @@ static Instruction* DecomposeConstantExpr(ConstantExpr* CE,
"constantGEP", &insertBefore);
default: // must be a binary operator
- assert(CE->getOpcode() >= Instruction::FirstBinaryOp &&
- CE->getOpcode() < Instruction::NumBinaryOps &&
+ assert(CE->getOpcode() >= Instruction::BinaryOpsBegin &&
+ CE->getOpcode() < Instruction::BinaryOpsEnd &&
"Unrecognized opcode in ConstantExpr");
getArg1 = CE->getOperand(0);
if (ConstantExpr* CEarg = dyn_cast<ConstantExpr>(getArg1))
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp
index 5abfe27238..7c9d60fa20 100644
--- a/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/lib/Transforms/Instrumentation/TraceValues.cpp
@@ -179,7 +179,7 @@ static inline bool TraceThisOpCode(unsigned opCode) {
// Explicitly test for opCodes *not* to trace so that any new opcodes will
// be traced by default (VoidTy's are already excluded)
//
- return (opCode < Instruction::FirstOtherOp &&
+ return (opCode < Instruction::OtherOpsBegin &&
opCode != Instruction::Alloca &&
opCode != Instruction::PHINode &&
opCode != Instruction::Cast);
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp
index 667346c9c1..6ddcc08c82 100644
--- a/lib/VMCore/BasicBlock.cpp
+++ b/lib/VMCore/BasicBlock.cpp
@@ -19,7 +19,7 @@
// instruction list. This is not a real instruction.
//
struct DummyInst : public Instruction {
- DummyInst() : Instruction(Type::VoidTy, NumOtherOps) {
+ DummyInst() : Instruction(Type::VoidTy, OtherOpsEnd) {
// This should not be garbage monitored.
LeakDetector::removeGarbageObject(this);
}
@@ -33,7 +33,7 @@ struct DummyInst : public Instruction {
// Methods for support type inquiry through isa, cast, and dyn_cast...
static inline bool classof(const DummyInst *) { return true; }
static inline bool classof(const Instruction *I) {
- return I->getOpcode() == NumOtherOps;
+ return I->getOpcode() == OtherOpsEnd;
}
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index d0413f12b3..8464c437fc 100644
--- a/lib/VMCore/Constants.cpp
+++ b/lib/VMCore/Constants.cpp
@@ -634,8 +634,8 @@ ConstantExpr *ConstantExpr::get(unsigned Opcode, Constant *C1, Constant *C2) {
// Its not in the table so create a new one and put it in the table.
// Check the operands for consistency first
- assert((Opcode >= Instruction::FirstBinaryOp &&
- Opcode < Instruction::NumBinaryOps) &&
+ assert((Opcode >= Instruction::BinaryOpsBegin &&
+ Opcode < Instruction::BinaryOpsEnd) &&
"Invalid opcode in binary constant expression");
assert(C1->getType() == C2->getType() &&