This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Let (MC)Register APIs check isStackSlot
ClosedPublic

Authored by mtrofin on Sep 30 2020, 10:46 AM.

Details

Summary

The user is expected to make the isStackSlot check before calling isPhysicalRegister
or isVirtualRegister. The APIs assert otherwise. We can improve the usability
of these APIs by carrying out the check in the 2 APIs: they become a
complete "source of truth" and remove an extra responsibility from the
user.

Diff Detail

Event Timeline

mtrofin created this revision.Sep 30 2020, 10:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2020, 10:46 AM
mtrofin requested review of this revision.Sep 30 2020, 10:46 AM
qcolombet accepted this revision.Oct 1 2020, 9:29 AM
This revision is now accepted and ready to land.Oct 1 2020, 9:29 AM
This revision was automatically updated to reflect the committed changes.