This is an archive of the discontinued LLVM Phabricator instance.

[MC] Define and use MCRegisterInfo::regsOverlap
ClosedPublic

Authored by foad on Feb 11 2022, 2:46 AM.

Details

Summary

Separate MCRegisterInfo::regsOverlap out from
TargetRegisterInfo::regsOverlap. This is useful in the AMDGPU AsmParser
where we only have access to MCRegisterInfo.

Diff Detail

Event Timeline

foad created this revision.Feb 11 2022, 2:46 AM
foad requested review of this revision.Feb 11 2022, 2:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2022, 2:46 AM
foad added inline comments.Feb 11 2022, 2:49 AM
llvm/include/llvm/CodeGen/TargetRegisterInfo.h
422

Seems like I need MCRegisterInfo:: here because the overloads can't be disambiguated from the argument type, Register vs MCRegister.

llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
3381–3382

I no longer call mc2PseudoReg on the arguments here because I don't understand what it's for. Is that OK?

Can you include the motivation to the summary?

foad edited the summary of this revision. (Show Details)Feb 13 2022, 5:17 AM
arsenm accepted this revision.Feb 14 2022, 7:10 AM
This revision is now accepted and ready to land.Feb 14 2022, 7:10 AM
MaskRay accepted this revision.Feb 14 2022, 12:02 PM
This revision was landed with ongoing or failed builds.Feb 14 2022, 12:48 PM
This revision was automatically updated to reflect the committed changes.