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:
Dan Gohman
2009-06-12 19:03:05 +00:00
parent b0e8e228ff
commit 17fb0d24eb
2 changed files with 8 additions and 4 deletions

View File

@@ -180,8 +180,9 @@ static bool isEquivalentType(const Type *Ty1, const Type *Ty2) {
/// isEquivalentOperation - determine whether the two operations are the same
/// except that pointer-to-A and pointer-to-B are equivalent. This should be
/// kept in sync with Instruction::isSameOperandAs.
static bool isEquivalentOperation(const Instruction *I1, const Instruction *I2) {
/// kept in sync with Instruction::isSameOperationAs.
static bool
isEquivalentOperation(const Instruction *I1, const Instruction *I2) {
if (I1->getOpcode() != I2->getOpcode() ||
I1->getNumOperands() != I2->getNumOperands() ||
!isEquivalentType(I1->getType(), I2->getType()))