diff options
Diffstat (limited to 'lib/VMCore/Instruction.cpp')
-rw-r--r-- | lib/VMCore/Instruction.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index fdddba9..2c8b8b2 100644 --- a/lib/VMCore/Instruction.cpp +++ b/lib/VMCore/Instruction.cpp @@ -200,12 +200,10 @@ bool Instruction::isIdenticalToWhenDefined(const Instruction *I) const { if (const CallInst *CI = dyn_cast<CallInst>(this)) return CI->isTailCall() == cast<CallInst>(I)->isTailCall() && CI->getCallingConv() == cast<CallInst>(I)->getCallingConv() && - CI->getAttributes().getRawPointer() == - cast<CallInst>(I)->getAttributes().getRawPointer(); + CI->getAttributes() == cast<CallInst>(I)->getAttributes(); if (const InvokeInst *CI = dyn_cast<InvokeInst>(this)) return CI->getCallingConv() == cast<InvokeInst>(I)->getCallingConv() && - CI->getAttributes().getRawPointer() == - cast<InvokeInst>(I)->getAttributes().getRawPointer(); + CI->getAttributes() == cast<InvokeInst>(I)->getAttributes(); if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(this)) { if (IVI->getNumIndices() != cast<InsertValueInst>(I)->getNumIndices()) return false; @@ -253,12 +251,11 @@ bool Instruction::isSameOperationAs(const Instruction *I) const { if (const CallInst *CI = dyn_cast<CallInst>(this)) return CI->isTailCall() == cast<CallInst>(I)->isTailCall() && CI->getCallingConv() == cast<CallInst>(I)->getCallingConv() && - CI->getAttributes().getRawPointer() == - cast<CallInst>(I)->getAttributes().getRawPointer(); + CI->getAttributes() == cast<CallInst>(I)->getAttributes(); if (const InvokeInst *CI = dyn_cast<InvokeInst>(this)) return CI->getCallingConv() == cast<InvokeInst>(I)->getCallingConv() && - CI->getAttributes().getRawPointer() == - cast<InvokeInst>(I)->getAttributes().getRawPointer(); + CI->getAttributes() == + cast<InvokeInst>(I)->getAttributes(); if (const InsertValueInst *IVI = dyn_cast<InsertValueInst>(this)) { if (IVI->getNumIndices() != cast<InsertValueInst>(I)->getNumIndices()) return false; @@ -348,7 +345,7 @@ bool Instruction::mayThrow() const { /// /// In LLVM, the Add, Mul, And, Or, and Xor operators are associative. /// -bool Instruction::isAssociative(unsigned Opcode, const Type *Ty) { +bool Instruction::isAssociative(unsigned Opcode) { return Opcode == And || Opcode == Or || Opcode == Xor || Opcode == Add || Opcode == Mul; } |