summaryrefslogtreecommitdiff
path: root/lib/VMCore/Instruction.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-06-12 19:03:05 +0000
committerDan Gohman <gohman@apple.com>2009-06-12 19:03:05 +0000
commit194ae785e1f94619cbdcdcf2921caa6997277d32 (patch)
treeec636d8af95957cde1dba2d9d1b43b2d2f245c05 /lib/VMCore/Instruction.cpp
parent5d0da6be217e1b652874a936847a8dfc6039693e (diff)
downloadllvm-194ae785e1f94619cbdcdcf2921caa6997277d32.tar.gz
llvm-194ae785e1f94619cbdcdcf2921caa6997277d32.tar.bz2
llvm-194ae785e1f94619cbdcdcf2921caa6997277d32.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73241 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instruction.cpp')
-rw-r--r--lib/VMCore/Instruction.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp
index 7556b8ebe7..e0764e494b 100644
--- a/lib/VMCore/Instruction.cpp
+++ b/lib/VMCore/Instruction.cpp
@@ -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