Skip to content

[PassBuilder] Expose parametrized passes related functions #85357

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
Mar 16, 2024

Conversation

paperchalice
Copy link
Contributor

@paperchalice paperchalice commented Mar 15, 2024

Some targets have passes with parameters, e.g. ARM, AMDGPU and MIPS.
For example, AMDGPU has a pass AMDGPUAtomicOptimizerPass
which need a ScanOption, this commit enables the syntax
like -passes=amdgpu-atomic-optimizer<strategy=dpp> for backend passes.

@paperchalice paperchalice requested review from aeubanks and arsenm March 15, 2024 03:45
Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

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

Can you add some example names? I'm not sure exactly what you're talking about

Comment on lines 661 to 662
assert(false &&
"unable to strip pass name from parametrized pass specification");
Copy link
Contributor

Choose a reason for hiding this comment

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

llvm_unreachable

}
if (!Params.empty() &&
(!Params.consume_front("<") || !Params.consume_back(">"))) {
assert(false && "invalid format for parametrized pass name");
Copy link
Contributor

Choose a reason for hiding this comment

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

llvm_unreachable

@paperchalice
Copy link
Contributor Author

paperchalice commented Mar 15, 2024

Can you add some example names? I'm not sure exactly what you're talking about

Example in AMDGPU, AMDGPUAtomicOptimizerPass need ScanOption, expose these functions to enable the syntax like -passes=amdgpu-atomic-optimizer<strategy=dpp>.

@arsenm
Copy link
Contributor

arsenm commented Mar 15, 2024

Can you add some example names? I'm not sure exactly what you're talking about

Example in AMDGPU, AMDGPUAtomicOptimizerPass need ScanOption, expose these functions to enable the syntax like -passes=amdgpu-atomic-optimizer<strategy=dpp>.

Can you add to the commit description?

@paperchalice paperchalice force-pushed the pb branch 2 times, most recently from 9a0c055 to 2200b53 Compare March 15, 2024 07:54
Some targets have passes with parameters, e.g. ARM, AMDGPU and MIPS.
For example, AMDGPU has a pass `AMDGPUAtomicOptimizerPass`
which need a `ScanOption`, this commit enables the syntax
like `-passes=amdgpu-atomic-optimizer<strategy=dpp>` for backend passes.
@paperchalice paperchalice merged commit 5a3cc7b into llvm:main Mar 16, 2024
@paperchalice paperchalice deleted the pb branch March 21, 2024 13:10
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