summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-19 21:34:28 +0000
committerChris Lattner <sabre@nondot.org>2003-10-19 21:34:28 +0000
commit3b237fcd385a734b49bb54893ce256ba181e36f9 (patch)
treee2cbde4832ffbd2160bea61006af1cbe415e3604 /lib
parent4661dc6a6abc9ef22e674fe4951a715befd4e072 (diff)
downloadllvm-3b237fcd385a734b49bb54893ce256ba181e36f9.tar.gz
llvm-3b237fcd385a734b49bb54893ce256ba181e36f9.tar.bz2
llvm-3b237fcd385a734b49bb54893ce256ba181e36f9.tar.xz
Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9269 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/IPA/FindUnsafePointerTypes.cpp2
-rw-r--r--lib/AsmParser/Lexer.l2
-rw-r--r--lib/AsmParser/llvmAsmParser.y4
-rw-r--r--lib/Bytecode/Reader/InstructionReader.cpp2
-rw-r--r--lib/CodeGen/InstrSelection/InstrForest.cpp4
-rw-r--r--lib/Target/SparcV9/InstrSelection/InstrForest.cpp4
-rw-r--r--lib/Target/SparcV9/SparcV9InstrInfo.cpp2
-rw-r--r--lib/Transforms/ExprTypeConvert.cpp8
-rw-r--r--lib/Transforms/IPO/MutateStructTypes.cpp2
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp2
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp2
-rw-r--r--lib/VMCore/InstrTypes.cpp2
-rw-r--r--lib/VMCore/Instruction.cpp2
13 files changed, 19 insertions, 19 deletions
diff --git a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
index 3f28a6fb96..3897ec8488 100644
--- a/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
+++ b/lib/Analysis/IPA/FindUnsafePointerTypes.cpp
@@ -43,7 +43,7 @@ static inline bool isSafeInstruction(const Instruction *I) {
case Instruction::GetElementPtr:
case Instruction::Call:
case Instruction::Invoke:
- case Instruction::PHINode:
+ case Instruction::PHI:
return true;
}
return false;
diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l
index f0f007b4b3..3092891527 100644
--- a/lib/AsmParser/Lexer.l
+++ b/lib/AsmParser/Lexer.l
@@ -219,7 +219,7 @@ setgt { RET_TOK(BinaryOpVal, SetGT, SETGT); }
setle { RET_TOK(BinaryOpVal, SetLE, SETLE); }
setge { RET_TOK(BinaryOpVal, SetGE, SETGE); }
-phi { RET_TOK(OtherOpVal, PHINode, PHI); }
+phi { RET_TOK(OtherOpVal, PHI, PHI_TOK); }
call { RET_TOK(OtherOpVal, Call, CALL); }
cast { RET_TOK(OtherOpVal, Cast, CAST); }
shl { RET_TOK(OtherOpVal, Shl, SHL); }
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index efb9d3e890..eb56f113e8 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -785,7 +785,7 @@ Module *RunVMAsmParser(const std::string &Filename, FILE *F) {
// Other Operators
%type <OtherOpVal> ShiftOps
-%token <OtherOpVal> PHI CALL CAST SHL SHR VAARG VANEXT
+%token <OtherOpVal> PHI_TOK CALL CAST SHL SHR VAARG VANEXT
%token VA_ARG // FIXME: OBSOLETE
%start Module
@@ -1747,7 +1747,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
$$ = new VANextInst($2, *$4);
delete $4;
}
- | PHI PHIList {
+ | PHI_TOK PHIList {
const Type *Ty = $2->front().first->getType();
$$ = new PHINode(Ty);
$$->op_reserve($2->size()*2);
diff --git a/lib/Bytecode/Reader/InstructionReader.cpp b/lib/Bytecode/Reader/InstructionReader.cpp
index 84ad4c587a..97becaace6 100644
--- a/lib/Bytecode/Reader/InstructionReader.cpp
+++ b/lib/Bytecode/Reader/InstructionReader.cpp
@@ -158,7 +158,7 @@ void BytecodeParser::ParseInstruction(const unsigned char *&Buf,
case Instruction::Cast:
Result = new CastInst(getValue(RI.Type, Args[0]), getType(Args[1]));
break;
- case Instruction::PHINode: {
+ case Instruction::PHI: {
if (Args.size() == 0 || (Args.size() & 1))
throw std::string("Invalid phi node encountered!\n");
diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp
index 496e279ef9..7ae2373764 100644
--- a/lib/CodeGen/InstrSelection/InstrForest.cpp
+++ b/lib/CodeGen/InstrSelection/InstrForest.cpp
@@ -299,7 +299,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
InstrTreeNode* opTreeNode;
if (isa<Instruction>(operand) && operand->hasOneUse() &&
cast<Instruction>(operand)->getParent() == instr->getParent() &&
- instr->getOpcode() != Instruction::PHINode &&
+ instr->getOpcode() != Instruction::PHI &&
instr->getOpcode() != Instruction::Call)
{
// Recursively create a treeNode for it.
@@ -334,7 +334,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
if (numChildren > 2)
{
unsigned instrOpcode = treeNode->getInstruction()->getOpcode();
- assert(instrOpcode == Instruction::PHINode ||
+ assert(instrOpcode == Instruction::PHI ||
instrOpcode == Instruction::Call ||
instrOpcode == Instruction::Load ||
instrOpcode == Instruction::Store ||
diff --git a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp
index 496e279ef9..7ae2373764 100644
--- a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp
+++ b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp
@@ -299,7 +299,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
InstrTreeNode* opTreeNode;
if (isa<Instruction>(operand) && operand->hasOneUse() &&
cast<Instruction>(operand)->getParent() == instr->getParent() &&
- instr->getOpcode() != Instruction::PHINode &&
+ instr->getOpcode() != Instruction::PHI &&
instr->getOpcode() != Instruction::Call)
{
// Recursively create a treeNode for it.
@@ -334,7 +334,7 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
if (numChildren > 2)
{
unsigned instrOpcode = treeNode->getInstruction()->getOpcode();
- assert(instrOpcode == Instruction::PHINode ||
+ assert(instrOpcode == Instruction::PHI ||
instrOpcode == Instruction::Call ||
instrOpcode == Instruction::Load ||
instrOpcode == Instruction::Store ||
diff --git a/lib/Target/SparcV9/SparcV9InstrInfo.cpp b/lib/Target/SparcV9/SparcV9InstrInfo.cpp
index 1807ea0414..b4b4702352 100644
--- a/lib/Target/SparcV9/SparcV9InstrInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9InstrInfo.cpp
@@ -365,7 +365,7 @@ MaxConstantForInstr(unsigned llvmOpCode)
case Instruction::Malloc:
case Instruction::Alloca:
case Instruction::GetElementPtr:
- case Instruction::PHINode:
+ case Instruction::PHI:
case Instruction::Cast:
case Instruction::Call: modelOpCode = V9::ADDi; break;
diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp
index abf6e90a29..8408a297ab 100644
--- a/lib/Transforms/ExprTypeConvert.cpp
+++ b/lib/Transforms/ExprTypeConvert.cpp
@@ -196,7 +196,7 @@ bool ExpressionConvertibleToType(Value *V, const Type *Ty,
return false;
break;
}
- case Instruction::PHINode: {
+ case Instruction::PHI: {
PHINode *PN = cast<PHINode>(I);
for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i)
if (!ExpressionConvertibleToType(PN->getIncomingValue(i), Ty, CTMap, TD))
@@ -402,7 +402,7 @@ Value *ConvertExpressionToType(Value *V, const Type *Ty, ValueMapCache &VMC,
break;
}
- case Instruction::PHINode: {
+ case Instruction::PHI: {
PHINode *OldPN = cast<PHINode>(I);
PHINode *NewPN = new PHINode(Ty, Name);
@@ -808,7 +808,7 @@ static bool OperandConvertibleToType(User *U, Value *V, const Type *Ty,
}
return false;
- case Instruction::PHINode: {
+ case Instruction::PHI: {
PHINode *PN = cast<PHINode>(I);
for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i)
if (!ExpressionConvertibleToType(PN->getIncomingValue(i), Ty, CTMap, TD))
@@ -1141,7 +1141,7 @@ static void ConvertOperandToType(User *U, Value *OldVal, Value *NewVal,
#endif
break;
- case Instruction::PHINode: {
+ case Instruction::PHI: {
PHINode *OldPN = cast<PHINode>(I);
PHINode *NewPN = new PHINode(NewTy, Name);
VMC.ExprMap[I] = NewPN;
diff --git a/lib/Transforms/IPO/MutateStructTypes.cpp b/lib/Transforms/IPO/MutateStructTypes.cpp
index 91302afbef..736da63beb 100644
--- a/lib/Transforms/IPO/MutateStructTypes.cpp
+++ b/lib/Transforms/IPO/MutateStructTypes.cpp
@@ -425,7 +425,7 @@ void MutateStructTypes::transformFunction(Function *m) {
}
// Miscellaneous Instructions
- case Instruction::PHINode: {
+ case Instruction::PHI: {
const PHINode &OldPN = cast<PHINode>(I);
PHINode *PN = new PHINode(ConvertType(OldPN.getType()));
for (unsigned i = 0; i < OldPN.getNumIncomingValues(); ++i)
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp
index f6bc4ceaac..d4fa79c88f 100644
--- a/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/lib/Transforms/Instrumentation/TraceValues.cpp
@@ -180,7 +180,7 @@ static inline bool TraceThisOpCode(unsigned opCode) {
//
return (opCode < Instruction::OtherOpsBegin &&
opCode != Instruction::Alloca &&
- opCode != Instruction::PHINode &&
+ opCode != Instruction::PHI &&
opCode != Instruction::Cast);
}
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index c837f0bb6e..7d34df48eb 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -75,7 +75,7 @@ unsigned Reassociate::getRank(Value *V) {
// for PHI nodes, we cannot have infinite recursion here, because there
// cannot be loops in the value graph that do not go through PHI nodes.
//
- if (I->getOpcode() == Instruction::PHINode ||
+ if (I->getOpcode() == Instruction::PHI ||
I->getOpcode() == Instruction::Alloca ||
I->getOpcode() == Instruction::Malloc || isa<TerminatorInst>(I) ||
I->mayWriteToMemory()) // Cannot move inst if it writes to memory!
diff --git a/lib/VMCore/InstrTypes.cpp b/lib/VMCore/InstrTypes.cpp
index f1b5c4f100..137f18169e 100644
--- a/lib/VMCore/InstrTypes.cpp
+++ b/lib/VMCore/InstrTypes.cpp
@@ -25,7 +25,7 @@ TerminatorInst::TerminatorInst(Instruction::TermOps iType, Instruction *IB)
//===----------------------------------------------------------------------===//
PHINode::PHINode(const PHINode &PN)
- : Instruction(PN.getType(), Instruction::PHINode) {
+ : Instruction(PN.getType(), Instruction::PHI) {
Operands.reserve(PN.Operands.size());
for (unsigned i = 0; i < PN.Operands.size(); i+=2) {
Operands.push_back(Use(PN.Operands[i], this));
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp
index 179a988eb5..b6bedf4748 100644
--- a/lib/VMCore/Instruction.cpp
+++ b/lib/VMCore/Instruction.cpp
@@ -87,7 +87,7 @@ const char *Instruction::getOpcodeName(unsigned OpCode) {
case GetElementPtr: return "getelementptr";
// Other instructions...
- case PHINode: return "phi";
+ case PHI: return "phi";
case Cast: return "cast";
case Call: return "call";
case Shl: return "shl";