Skip to content

Replace print-at-pass-number cl::opt with print-before-pass-number #76211

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 3 commits into from
Jan 8, 2024

Conversation

arpilipe
Copy link
Contributor

The existing option prints the IR after the pass, but it's not clear from its name. In this patch I change the option to print the IR before the pass and change the name to make the behavior clear.

Printing the IR before the pass is slightly simpler than after as I don't need to worry about printAfterPassInvalidated case. Either before or after the pass would be ok for the original use case this option was introduced for.

The existing option prints the IR after the pass, but it's not clear
from its name. In this patch I change the option to print the IR
before the pass and change the name to make the behavior clear.

Printing the IR before the pass is slightly simpler than after as
I don't need to worry about printAfterPassInvalidated case. Either
before or after the pass would be ok for the original use case this
option was introduced for.
Copy link

github-actions bot commented Dec 22, 2023

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

PrintAtPassNumber("print-at-pass-number", cl::init(0), cl::Hidden,
cl::desc("Print IR at pass with this number as "
PrintBeforePassNumber("print-before-pass-number", cl::init(0), cl::Hidden,
cl::desc("Print IR before the pass with this number as "
"reported by print-passes-names"));
Copy link
Contributor

Choose a reason for hiding this comment

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

should this help text be print-pass-numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@arpilipe arpilipe merged commit 0e7199c into llvm:main Jan 8, 2024
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
…lvm#76211)

The existing option prints the IR after the pass, but it's not clear
from its name. In this patch I change the option to print the IR before
the pass and change the name to make the behavior clear.

Printing the IR before the pass is slightly simpler than after as I
don't need to worry about printAfterPassInvalidated case. Either before
or after the pass would be ok for the original use case this option was
introduced for.
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.

2 participants