aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-03-07 10:13:40 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-03-07 10:13:40 +0000
commit636ee38a884bbcfec1de26092d1c0e3164de159d (patch)
tree7cd6bdf020b8898f342f24a2224de2cc86a3c222 /llvm/lib/CodeGen/MachineInstr.cpp
parentddbe7ee885d4579b4aa6e9078cf2f725cce6cc2a (diff)
downloadllvm-636ee38a884bbcfec1de26092d1c0e3164de159d.zip
llvm-636ee38a884bbcfec1de26092d1c0e3164de159d.tar.gz
llvm-636ee38a884bbcfec1de26092d1c0e3164de159d.tar.bz2
Try to clarify this comment some.
llvm-svn: 152221
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 3dbfda6..4a68067 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1850,10 +1850,13 @@ MachineInstrExpressionTrait::getHashValue(const MachineInstr* const &MI) {
// MachineOperand, but currently that doesn't work because there are many
// different ideas of "equality" and thus different sets of information that
// contribute to the hash code. This one happens to want to take a specific
- // subset. It's not clear that this routine uses the correct set of
- // information, it would be good to somehow ensure this function is
- // MachineInstr::isIdenticalTo with the 'IgnoreVRegDefs' filter look at the
- // same bits.
+ // subset. And it's still not clear that this routine uses the *correct*
+ // subset of information when computing the hash code. The goal is to use the
+ // same inputs for the hash code here that MachineInstr::isIdenticalTo uses to
+ // test for equality when passed the 'IgnoreVRegDefs' filter flag. It would
+ // be very useful to factor the selection of relevant inputs out of the two
+ // functions and into a common routine, but it's not clear how that can be
+ // done.
SmallVector<size_t, 8> HashComponents;
HashComponents.reserve(MI->getNumOperands() + 1);
HashComponents.push_back(MI->getOpcode());