This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC] Refactored exp tgt handling
ClosedPublic

Authored by dp on Jan 22 2021, 1:53 AM.

Details

Summary

Summary of changes:

  • Separated tgt encoding from parsing;
  • Separated tgt decoding from printing;
  • Improved errors handling;
  • Disabled leading zeroes in index. The following code is no longer accepted: exp pos00 v3, v2, v1, v0

Diff Detail

Event Timeline

dp created this revision.Jan 22 2021, 1:53 AM
dp requested review of this revision.Jan 22 2021, 1:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 22 2021, 1:53 AM
foad added a subscriber: foad.Jan 22 2021, 6:03 AM

Separated tgt encoding from parsing;
Separated tgt decoding from printing;

Is there a reason for this? Do you want to use the encoding/decoding logic from somewhere else?

dp added a comment.Jan 22 2021, 6:11 AM

Separated tgt encoding from parsing;
Separated tgt decoding from printing;

Is there a reason for this? Do you want to use the encoding/decoding logic from somewhere else?

No, this is an attempt to make code more manageable. I believe that encoding/decoding logic should be in one place rather than split between parser and instruction printer. I think that most encoding/decoding logic have already been moved to AMDGPUBaseInfo.

arsenm accepted this revision.Jan 22 2021, 12:23 PM
This revision is now accepted and ready to land.Jan 22 2021, 12:23 PM
This revision was automatically updated to reflect the committed changes.
MaskRay added a subscriber: MaskRay.EditedJan 26 2021, 9:13 AM

In your commit the message has just Reviewers:. The Reviewers: list does not necessarily mean all the people on the list have acknowledged the patch so Reviewers: is mostly useless. Many people agree that both Reviewed by: & Differential Revision: should be present.

arc amend can fetch the Phabricator summary and amend the local description.

You can install llvm/.git/hooks/pre-push to prevent accidental Summary:, Reviewers:, Subscribers: and Tags:.

dp added a comment.Jan 26 2021, 9:54 AM

In your commit the message has just Reviewers:.

"git log" seems to display the list of reviewers correctly:

Reviewers: arsenm, rampitec, foad

When I open this commit on github, the reviewer list seems to be present as well:
https://github.com/llvm/llvm-project/commit/745064e36b8751548061cc72039dc039c566d175

What am I missing?

In D95216#2523107, @dp wrote:

In your commit the message has just Reviewers:.

"git log" seems to display the list of reviewers correctly:

Reviewers: arsenm, rampitec, foad

When I open this commit on github, the reviewer list seems to be present as well:
https://github.com/llvm/llvm-project/commit/745064e36b8751548061cc72039dc039c566d175

What am I missing?

arc diff created message does not have Reviewers:. arc amend can drop the tag as well.

dp added a comment.Jan 26 2021, 11:05 AM

Thanks. I did not know that use of these tags have obsoleted.