Eliminate implicit Register->unsigned conversions in VirtRegMap. NFC
This was mostly an experiment to assess the feasibility of completely
eliminating a problematic implicit conversion case in D61321 in advance of
landing that* but it also happens to align with the goal of propagating the
use of Register/MCRegister instead of unsigned so I believe it makes sense
to commit it.
The overall process for eliminating the implicit conversions from
Register/MCRegister -> unsigned was to:
- Add an explicit conversion to support genuinely required conversions to unsigned. For example, using them as an index for IndexedMap. Sadly it's not possible to have an explicit and implicit conversion to the same type and only deprecate the implicit one so I called the explicit conversion get().
- Temporarily annotate the implicit conversion to unsigned with LLVM_ATTRIBUTE_DEPRECATED to make them visible
- Eliminate implicit conversions by propagating Register/MCRegister/ explicit-conversions appropriately
- Remove the deprecation added in 2.
- My conclusion is that it isn't feasible as there's too much code to update in one go.
Depends on D65678
Subscribers: MatzeB, wdng, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D65685