diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-06-23 14:47:36 +0000 | 
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-06-23 14:47:36 +0000 | 
| commit | 8c57cfd51b21332ee5c6b0cbded00f3a3f1a3116 (patch) | |
| tree | 3424caa8b94b27775f8c53c4556e1d56fe8e9f32 | |
| parent | 6b568964ba92ea5b05860623e80da2a4db2bfac0 (diff) | |
| download | bcm5719-llvm-8c57cfd51b21332ee5c6b0cbded00f3a3f1a3116.tar.gz bcm5719-llvm-8c57cfd51b21332ee5c6b0cbded00f3a3f1a3116.zip  | |
[BranchFolding] Document why replacing HashMachineInstr with hash_code doesn't work
llvm-svn: 240415
| -rw-r--r-- | llvm/lib/CodeGen/BranchFolding.cpp | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/BranchFolding.cpp b/llvm/lib/CodeGen/BranchFolding.cpp index d3d276ff0df..618266731c0 100644 --- a/llvm/lib/CodeGen/BranchFolding.cpp +++ b/llvm/lib/CodeGen/BranchFolding.cpp @@ -270,7 +270,9 @@ static unsigned HashMachineInstr(const MachineInstr *MI) {    for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++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;      switch (Op.getType()) {      case MachineOperand::MO_Register:  | 

