This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC] Improved diagnostic messages for invalid registers
ClosedPublic

Authored by dp on Sep 7 2020, 6:45 AM.

Details

Summary

Corrected parser to issue meaningful error messages for invalid and malformed registers.

See bug 41303.

Diff Detail

Event Timeline

dp created this revision.Sep 7 2020, 6:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 7 2020, 6:45 AM
dp requested review of this revision.Sep 7 2020, 6:45 AM
arsenm accepted this revision.Sep 8 2020, 1:00 PM
This revision is now accepted and ready to land.Sep 8 2020, 1:00 PM
arsenm added inline comments.Sep 8 2020, 1:01 PM
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
2394

Not sure why we would special case this one

dp added inline comments.Sep 8 2020, 4:41 PM
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
2394

I was not sure if null is a register. So the message "register not available on this GPU" looked a bit weird for null.

Do you think it looks ok? Please advise.

This revision was automatically updated to reflect the committed changes.