[PATCH] D70479: [MIRVRegNamerUtils] Add additional hashing on MachineInstr flags.
Aditya Nandakumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 08:53:00 PST 2019
aditya_nandakumar added inline comments.
================
Comment at: llvm/lib/CodeGen/MIRVRegNamerUtils.cpp:123
+ MIOperands.push_back(MachineInstr::FPExcept);
+
auto HashMI = hash_combine_range(MIOperands.begin(), MIOperands.end());
----------------
I'd probably just do
```
if (unsigned Flag = MI.getFlags())
MIOperands.push_back(Flag);
```
That should be equivalent to what you're doing above.
In fact, I'd just simplify it to
```
MIOperands.push_back(MI.getFlags());
```
with 0 (no flags) being also valid enough to contribute to the hash.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70479/new/
https://reviews.llvm.org/D70479
More information about the llvm-commits
mailing list