This is an archive of the discontinued LLVM Phabricator instance.

Move register namespacing definitions from TargetRegisterInfo to Register and a new MCRegister
ClosedPublic

Authored by dsanders on Jul 31 2019, 6:56 PM.

Details

Summary

The namespacing in Register is currently slightly wrong as there is a
(rarely used) stack slot namespace too. The namespacing doesn't use
anything from the Target so we can move the definition from
TargetRegisterInfo to Register/MCRegister to keep it in the appropriate
places for the MC and CodeGen layers

Note: To keep the patch reasonably sized for review I've left stub
functions in the original TargetRegisterInfo. We should update all the uses
instead

Event Timeline

dsanders created this revision.Jul 31 2019, 6:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 31 2019, 6:56 PM
Herald added a subscriber: wdng. · View Herald Transcript
dsanders retitled this revision from Move register namespacing definitions from TargetRegisterInfo to Register to Move register namespacing definitions from TargetRegisterInfo to Register and a new MCRegister.
dsanders edited the summary of this revision. (Show Details)
arsenm accepted this revision.Jul 31 2019, 8:31 PM

LGTM

This revision is now accepted and ready to land.Jul 31 2019, 8:31 PM
dsanders updated this revision to Diff 212716.Jul 31 2019, 8:33 PM

Update as discussed at https://reviews.llvm.org/D65552
Made it independent of D65552. Added initial MCRegister to house the bit that belongs there.

arsenm added inline comments.Jul 31 2019, 8:49 PM
llvm/include/llvm/MC/MCRegister.h
19–20

The actual MCPhysReg member is missing?

dsanders marked an inline comment as done.Aug 1 2019, 1:09 PM
dsanders added inline comments.
llvm/include/llvm/MC/MCRegister.h
19–20

The note on line 17 is referring to this. It's added in D65599

This revision was automatically updated to reflect the committed changes.