1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

[BranchFolding] Document why replacing HashMachineInstr with hash_code doesn't work

llvm-svn: 240415
This commit is contained in:
Benjamin Kramer 2015-06-23 14:47:36 +00:00
parent 7873dd07ed
commit 3b6db9b474

View File

@ -270,7 +270,9 @@ static unsigned HashMachineInstr(const MachineInstr *MI) {
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
const MachineOperand &Op = MI->getOperand(i); const MachineOperand &Op = MI->getOperand(i);
// Merge in bits from the operand if easy. // Merge in bits from the operand if easy. We can't use MachineOperand's
// hash_code here because it's not deterministic and we sort by hash value
// later.
unsigned OperandHash = 0; unsigned OperandHash = 0;
switch (Op.getType()) { switch (Op.getType()) {
case MachineOperand::MO_Register: case MachineOperand::MO_Register: