Skip to content

[Pass][NFC] Sort and format passes in PassRegistery.def #73762

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 1 commit into from
Nov 29, 2023

Conversation

paperchalice
Copy link
Contributor

  • Sort all passes in alphabetical order.
  • Format llvm/lib/Passes/PassRegistry.def.
  • Remove redundant semicolon.

@paperchalice
Copy link
Contributor Author

CC @boomanaiden154

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

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

Thanks for looking into cleaning this up.

I didn't realize this would create so much churn when suggesting it. I think it would be good to have regardless, but curious what other reviewers think.

I also don't think we should be formatting the *_WITH_PARAMS macros as it seems to significantly hurt readability. Maybe wrap them in // clang-format off and // clang-format on so the file can be automatically formatted but without hurting readability?

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

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

LGTM

@nikic
Copy link
Contributor

nikic commented Nov 29, 2023

I also don't think we should be formatting the *_WITH_PARAMS macros as it seems to significantly hurt readability. Maybe wrap them in // clang-format off and // clang-format on so the file can be automatically formatted but without hurting readability?

The WITH_PARAMS formatting looks ok to me. We were lucky and this did not fall into the terrible "align to opening parentheses" heuristic.

@boomanaiden154
Copy link
Contributor

The WITH_PARAMS formatting looks ok to me. We were lucky and this did not fall into the terrible "align to opening parentheses" heuristic.

Sounds good. No strong preference on my end. It's a little bit less consistent, but still easy enough to figure out what's going on.

@paperchalice
Copy link
Contributor Author

If it looks good, could someone merge this? I don't have write access. Thanks!

@boomanaiden154
Copy link
Contributor

If it looks good, could someone merge this? I don't have write access. Thanks!

I can do it. Side note: Now that you've landed a couple patches, you can probably email Chris and request commit access (https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access).

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.

3 participants