From b53a1d67b13fa2f036e18180523ea336100e5240 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Wed, 7 Mar 2012 10:13:40 +0000 Subject: [PATCH] Try to clarify this comment some. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152221 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineInstr.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 3dbfda6072b..4a6806784a5 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/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 HashComponents; HashComponents.reserve(MI->getNumOperands() + 1); HashComponents.push_back(MI->getOpcode());