Skip to content

[docs] Try to make it easier to find info about new PM vs legacy PM #80834

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
Feb 6, 2024

Conversation

bjope
Copy link
Collaborator

@bjope bjope commented Feb 6, 2024

Seen several beginner questions popping up in discourse about how to implement and run custom passes. And then it turns out that they are following the old "Writing an LLVM Pass" guide that describe legacy passes, and then things are mixed up when they try to run that pass using opt that nowadays default to the new pass manager.

This is an attempt to make it slightly clearer in the User Guides that there are two different "Writing an LLVM Pass" pages depending on which pass manager that should be used. This is done by renaming the legacy version of "Writing an LLVM Pass" as "Writing an LLVM Pass (legacy PM version)".
Also reordered the links to put the link to the new pass manager documentation first.

This patch also moves the warning text that cross references the description on how to write a pass for legacy/new PM to make sure it ends up already in the beginning of the descriptions.

Also adding a new warning in the "Running a pass with opt" section of the legacy PM version of the guide, to inform that those examples are outdated.

Seen several beginner questions popping up in discourse about
how to implement and run custom passes. And then it turns out
that they are following the old "Writing an LLVM Pass" guide that
describe legacy passes, and then things are mixed up when they
try to run that pass using opt that nowadays default to the
new pass manager.

This is an attempt to make it slightly clearer in the User Guides
that there are two different "Writing an LLVM Pass" pages depending
on which pass manager that should be used. This is done by renaming
the legacy version of "Writing an LLVM Pass" as "Writing an LLVM Pass
(legacy PM version)".
Also reordered the links to put the link to the new pass manager
documentation first.

This patch also moves the warning text that cross references
the description on how to write a pass for legacy/new PM to make
sure it ends up already in the beginning of the descriptions.

Also adding a new warning in the "Running a pass with opt" section of
the legacy PM version of the guide, to inform that those examples
are outdated.
@bjope bjope requested a review from aeubanks February 6, 2024 13:58
@bjope bjope merged commit 1b5fae9 into llvm:main Feb 6, 2024
@bjope bjope deleted the doc_pm branch March 20, 2024 13:51
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