[NFC][llvm][MIRVRegNamerUtils] Refactoring GetHashableMO into switch-statement.
authorPuyan Lotfi <puyan@puyan.org>
Sat, 14 Dec 2019 05:58:44 +0000 (00:58 -0500)
committerPuyan Lotfi <puyan@puyan.org>
Sat, 14 Dec 2019 07:31:07 +0000 (02:31 -0500)
commit816985c12053e0f0654e28e1a517799954ea5360
treeb20c58ae24e2345af22c376872f82c378095f56c
parent6cc2b1d789172143d9eff98412ee477ad8c7cad7
[NFC][llvm][MIRVRegNamerUtils] Refactoring GetHashableMO into switch-statement.

This refactors the if-statements handling the hashing of various
MachineOperand types into a switch-statement. The purpose is to cover
all the basis for all MachineOperand types while being very deliberate
about which MachineOperand types we are not handling and why (better
added comments). This patch is a NFC redo of https://reviews.llvm.org/D71396.
Much of the changes present in D71396 will come in smaller follow-up patches
that will add support for hashing the MachineOperand types that aren't
covered piece-meal with tests for each new case.
llvm/lib/CodeGen/MIRVRegNamerUtils.cpp