Give Instruction::isSameOperationAs a corresponding comment to note
the relationship with MergeFunctions.cpp's isEquivalentOperation, and make a trivial code reordering so that the two functions are easier to compare. Fix the name of Instruction::isSameOperationAs in MergeFunction.cpp's isEquivalentOperation's comment, and fix a nearby 80-column violation. llvm-svn: 73241
This commit is contained in:
@@ -218,9 +218,12 @@ bool Instruction::isIdenticalTo(const Instruction *I) const {
|
||||
}
|
||||
|
||||
// isSameOperationAs
|
||||
// This should be kept in sync with isEquivalentOperation in
|
||||
// lib/Transforms/IPO/MergeFunctions.cpp.
|
||||
bool Instruction::isSameOperationAs(const Instruction *I) const {
|
||||
if (getOpcode() != I->getOpcode() || getType() != I->getType() ||
|
||||
getNumOperands() != I->getNumOperands())
|
||||
if (getOpcode() != I->getOpcode() ||
|
||||
getNumOperands() != I->getNumOperands() ||
|
||||
getType() != I->getType())
|
||||
return false;
|
||||
|
||||
// We have two instructions of identical opcode and #operands. Check to see
|
||||
|
||||
Reference in New Issue
Block a user