HomePhabricator

Eliminate implicit Register->unsigned conversions in VirtRegMap. NFC
Audit Requireda58a27513ba9

Authored by dsanders on Aug 12 2019, 5:55 PM.

Description

Eliminate implicit Register->unsigned conversions in VirtRegMap. NFC

Summary:
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:

  1. 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().
  2. Temporarily annotate the implicit conversion to unsigned with LLVM_ATTRIBUTE_DEPRECATED to make them visible
  3. Eliminate implicit conversions by propagating Register/MCRegister/ explicit-conversions appropriately
  4. 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

Reviewers: arsenm

Subscribers: MatzeB, wdng, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65685

llvm-svn: 368643

Details

Auditors
grosbach
Committed
dsandersAug 12 2019, 5:55 PM
Differential Revision
D65685: Eliminate implicit Register->unsigned conversions in VirtRegMap. NFC
Parents
rGd8c47d52da51: [TSan] Fix test failing on Linux
Branches
Unknown
Tags
Unknown