[llvm-commits] [llvm] r152221 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp

Chandler Carruth chandlerc at gmail.com
Wed Mar 7 02:13:41 PST 2012


Author: chandlerc
Date: Wed Mar  7 04:13:40 2012
New Revision: 152221

URL: http://llvm.org/viewvc/llvm-project?rev=152221&view=rev
Log:
Try to clarify this comment some.

Modified:
    llvm/trunk/lib/CodeGen/MachineInstr.cpp

Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=152221&r1=152220&r2=152221&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Wed Mar  7 04:13:40 2012
@@ -1850,10 +1850,13 @@
   // 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());





More information about the llvm-commits mailing list