Skip to content

[Tablegen] Add keyword dump. #68793

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

Merged
merged 22 commits into from
Oct 19, 2023
Merged

[Tablegen] Add keyword dump. #68793

merged 22 commits into from
Oct 19, 2023

Conversation

fpetrogalli
Copy link
Member

The keyword is intended for debugging purpose. It prints a message to stderr.

This patch is based on code originally written by Adam Nemet, and on the feedback received by the reviewers in
https://reviews.llvm.org/D157492.

The keyword is intended for debugging purpose. It prints a message to
stderr.

This patch is based on code originally written by Adam Nemet, and on
the feedback received by the reviewers in
https://reviews.llvm.org/D157492.
@fpetrogalli fpetrogalli requested a review from Artem-B October 11, 2023 11:20
@fpetrogalli fpetrogalli requested a review from nhaehnle October 11, 2023 11:22
@wangpc-pp wangpc-pp self-requested a review October 11, 2023 11:43
Copy link
Collaborator

@nhaehnle nhaehnle left a comment

Choose a reason for hiding this comment

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

Acked, modulo some minor nits and a suggestion.

Typo in the title: "keywork"

@fpetrogalli fpetrogalli changed the title [Tablegen] Add keywork dump. [Tablegen] Add keyword dump. Oct 12, 2023
Copy link
Contributor

@wangpc-pp wangpc-pp left a comment

Choose a reason for hiding this comment

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

LGTM but please wait for others.

@wangpc-pp
Copy link
Contributor

Oh! Don't forget to add a ReleaseNote!

@fpetrogalli
Copy link
Member Author

fpetrogalli commented Oct 12, 2023

Oh! Don't forget to add a ReleaseNote!

I prepared a separate patch for both dump and !repr: #68893.

fpetrogalli added a commit to fpetrogalli/llvm-project that referenced this pull request Oct 12, 2023
* `dump`, added in llvm#68793
* `!repr`, added in llvm#68716

The keyword `assert` was missing, so I have added that too.
Copy link
Member

@Artem-B Artem-B left a comment

Choose a reason for hiding this comment

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

LGTM, with a few nits/suggestions.

@github-actions
Copy link

github-actions bot commented Oct 13, 2023

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

@fpetrogalli
Copy link
Member Author

@Artem-B

I wonder what the dump from multiple instances of in-multiclass dump would look like. Can we tell them apart somehow? I think they all will be attributed to the source location of the dump itself. I think we'll need some sort of reference to the instantiation point, too.

I like this a lot - it can get nasty if someone start using dump statements across layers of class/multiclass indirection.
I actually had the same issue with assert, which does not come as surprise given the similarities with dump.

Not sure if it's worth it, but I think it would be useful. We can consider it as a follow-up change.

If this is OK with you, I will create an issue and link it to this PR.

@fpetrogalli
Copy link
Member Author

@Artem-B - gentle ping, I'd like to get a final blessing from you.

Francesco

Copy link
Member

@Artem-B Artem-B left a comment

Choose a reason for hiding this comment

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

LGTM, with one suggestion for the docs.

@fpetrogalli fpetrogalli merged commit db9b6f4 into llvm:main Oct 19, 2023
fpetrogalli added a commit that referenced this pull request Oct 19, 2023
* `dump`, added in #68793
* `!repr`, added in #68716
fpetrogalli added a commit that referenced this pull request Oct 19, 2023
…68897)

* `dump`, added in #68793
* `!repr`, added in #68716

The keyword `assert` was missing, so I have added that too.
cuviper pushed a commit to cuviper/llvm.vim that referenced this pull request Feb 21, 2024
…ators. (#68897)

* `dump`, added in llvm/llvm-project#68793
* `!repr`, added in llvm/llvm-project#68716

The keyword `assert` was missing, so I have added that too.
github-actions bot pushed a commit to ararslan/llvm.vim that referenced this pull request May 1, 2024
…#68897)

* `dump`, added in llvm/llvm-project#68793
* `!repr`, added in llvm/llvm-project#68716

The keyword `assert` was missing, so I have added that too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants