Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TableGen] Introduce a less aggressive suppression for HwMode Decoder… #86060

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

superZWT123
Copy link
Contributor

@superZWT123 superZWT123 commented Mar 21, 2024

  1. Remove 'AllModes' and 'DefaultMode' suffixes for DecoderTables under default HwMode.
  2. Introduce a less aggressive suppression for HwMode DecoderTable, only reduce necessary tables duplications. This allows encodings under different HwModes to retain the original DecoderNamespace.
  3. Change 'suppress-per-hwmode-duplicates' command option from bool type to enum type, allowing users to choose what level of suppression to use.

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be
notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write
permissions for the repository. In which case you can instead tag reviewers by
name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review
by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate
is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

Copy link

github-actions bot commented Mar 21, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@superZWT123 superZWT123 force-pushed the feature_tablegen_hwmode_decoder_fix branch from 478b4e1 to cc5470e Compare March 21, 2024 02:53
@superZWT123
Copy link
Contributor Author

Hi kparzysz, nvjle ,following the discussion on the previous pull request pre-pull-request, I have changed the type of ‘suppress-per-hwmode-duplicates’ from 'bool' to 'enum', allowing users to choose the degree of table suppression they prefer. Could you please take another look at it and provide your review comments ? Thanks a lot!

@superZWT123 superZWT123 force-pushed the feature_tablegen_hwmode_decoder_fix branch from cc5470e to b2a9206 Compare March 21, 2024 08:13
@superZWT123
Copy link
Contributor Author

Perhaps I should use the '@'. I couldn’t add reviewers, so I’m not sure if my previous message notified you~ @nvjle @kparzysz

@nvjle
Copy link
Contributor

nvjle commented Mar 22, 2024

Perhaps I should use the '@'. I couldn’t add reviewers, so I’m not sure if my previous message notified you~ @nvjle @kparzysz

Hi @superZWT123,
I just saw this PR now that you added the @. Until you have github commit access, you won't be able to use the ordinary Reviewers pull down menu yet. I will re-review this iteration of the patch soon.

@superZWT123
Copy link
Contributor Author

Perhaps I should use the '@'. I couldn’t add reviewers, so I’m not sure if my previous message notified you~ @nvjle @kparzysz

Hi @superZWT123, I just saw this PR now that you added the @. Until you have github commit access, you won't be able to use the ordinary Reviewers pull down menu yet. I will re-review this iteration of the patch soon.

Thank you, nvjle .

@superZWT123
Copy link
Contributor Author

Hi @nvjle , I hope this message finds you well. I want to kindly remind you about the pending review of the code we discussed. The completion of this part is crucial as the remaining fixing for 'EncodingByHwMode' are dependent on it. I understand and appreciate the time and effort it takes to review code, and I hope we can expedite this process to keep the project moving forward smoothly.

@superZWT123
Copy link
Contributor Author

superZWT123 commented Mar 29, 2024

Hi, @topperc,
Could you help review this PR? The logic of this part of the code is relatively simple, and we have had extensive discussions on it before. I have another fix related to ‘EncodingByHwMode’ that I plan to submit after this one is finalized. I tested my fix on RISCV, enabling ‘EncodingByHwMode’, and everything works as expected. The adaptation required from users to utilize ‘EncodingByHwMode’ is minimal. After this PR is concluded, I will also submit a simple example for RISCV as a reference. Thank you very much!
RFC:https://discourse.llvm.org/t/rfc-fix-tablegen-for-hwmode/77625
PRE-PR(The last three comments are discussions about this pr.):#84906

llvm/utils/TableGen/DecoderEmitter.cpp Outdated Show resolved Hide resolved
llvm/utils/TableGen/DecoderEmitter.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@superZWT123
Copy link
Contributor Author

LGTM

Hi @topperc , could you please help me merge this PR into the main branch? I’m not a committer and don’t have write access to this repository. Thank you very much!

@superZWT123 superZWT123 force-pushed the feature_tablegen_hwmode_decoder_fix branch from 9334cc3 to fd93753 Compare March 30, 2024 03:04
…Table

1. Remove 'AllModes' and 'DefaultMode' suffixes for DecoderTables under
   default HwMode.
2. Introduce a less aggressive suppression for HwMode DecoderTable, only
   reduce necessary tables duplications. This allows encodings under different HwModes
   to retain the original DecoderNamespace.
3. Change 'suppress-per-hwmode-duplicates' command option from bool type to enum type,
   allowing users to choose what level of suppression to use.
Use std::set to collect HwModes for DecoderNamespace, simplifying
code logic.
@superZWT123 superZWT123 force-pushed the feature_tablegen_hwmode_decoder_fix branch from fd93753 to a2fee80 Compare March 31, 2024 10:38
@vfdff vfdff merged commit da1d3d8 into llvm:main Apr 1, 2024
4 checks passed
Copy link

github-actions bot commented Apr 1, 2024

@superZWT123 Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested
by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as
the builds can include changes from many authors. It is not uncommon for your
change to be included in a build that fails due to someone else's changes, or
infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself.
This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants