diff options
author | Puyan Lotfi <puyan@puyan.org> | 2019-12-10 04:40:36 -0500 |
---|---|---|
committer | Puyan Lotfi <puyan@puyan.org> | 2019-12-10 20:16:14 -0500 |
commit | f364686f34d80e0873b478933952c6b664177ce4 (patch) | |
tree | 7ebbca9bd0af9cc8843681a8f017925d3d70c70b /llvm/lib/CodeGen | |
parent | d5e66f0e060da7f175cedf4f545fb4e13df7707e (diff) | |
download | bcm5719-llvm-f364686f34d80e0873b478933952c6b664177ce4.tar.gz bcm5719-llvm-f364686f34d80e0873b478933952c6b664177ce4.zip |
[llvm][MIRVRegNamerUtil] Adding hashing against MachineInstr flags.
Now, flags will result in differing hashes for a given MI. In effect, if
you have two instructions with everything identical except for their
flags then you should get two different hashes and fewer collisions.
Differential Revision: https://reviews.llvm.org/D70479
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MIRVRegNamerUtils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRVRegNamerUtils.cpp b/llvm/lib/CodeGen/MIRVRegNamerUtils.cpp index 998d391bf83..be29f8cd64b 100644 --- a/llvm/lib/CodeGen/MIRVRegNamerUtils.cpp +++ b/llvm/lib/CodeGen/MIRVRegNamerUtils.cpp @@ -69,7 +69,7 @@ std::string VRegRenamer::getInstructionOpcodeHash(MachineInstr &MI) { return 0; }; - SmallVector<unsigned, 16> MIOperands = {MI.getOpcode()}; + SmallVector<unsigned, 16> MIOperands = {MI.getOpcode(), MI.getFlags()}; llvm::transform(MI.uses(), std::back_inserter(MIOperands), GetHashableMO); auto HashMI = hash_combine_range(MIOperands.begin(), MIOperands.end()); |