Skip to content
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

How to set passes for clspv-opt? #1163

Closed
robquill opened this issue Jul 24, 2023 · 3 comments
Closed

How to set passes for clspv-opt? #1163

robquill opened this issue Jul 24, 2023 · 3 comments

Comments

@robquill
Copy link

Hi,

When I try to run:

./clspv-opt --replace-physical-pointer-bitcasts broken.ll

I get this error message:

No passes specified to run!

./clspv-opt --help-list-hidden shows that --replace-physical-pointer-bitcasts is an option

Also running ./clspv-opt on it's own also gives the "No passes specified to run!" error message.

I used commit 3374c5a

Does anyone know how to debug which passes are available?

@rjodinchr
Copy link
Collaborator

rjodinchr commented Jul 24, 2023

here is how to run a specific pass with clspv-opt:

clspv-opt <source> -o <destination> --passes=<comma_separated_list_of_passes>

Here is an example:

; RUN: clspv-opt %s -o %t --passes=simplify-pointer-bitcast,replace-pointer-bitcast

For clspv specific passes, one can find the list here:
https://github.com/google/clspv/blob/3374c5a5abff3aa655934767c5d4fbc0008bd52e/lib/PassRegistry.def

@rjodinchr
Copy link
Collaborator

rjodinchr commented Jul 24, 2023

--replace-physical-pointer-bitcasts is an option, not a pass.
It is enabled by default: https://github.com/google/clspv/blob/3374c5a5abff3aa655934767c5d4fbc0008bd52e/lib/ReplacePointerBitcastPass.cpp#L44C1L47C1

@robquill
Copy link
Author

OK, got it. Thanks. So what I should have done is: ./clspv-opt --passes=replace-pointer-bitcasts broken.ll which works (or rather, reproduces the assert I wanted to debug).

Thanks for the quick reply. I will close this issue.

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

No branches or pull requests

2 participants