-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add command line option --polly={yes|no} #18159
Add command line option --polly={yes|no} #18159
Conversation
probably simpler to always have the option ( |
dbe9419
to
0495dfd
Compare
Thank you for the feedback @tkelman! I updated the PR accordingly. Best, |
0495dfd
to
f2348c4
Compare
@@ -46,6 +46,7 @@ static const char opts[] = | |||
" -O, --optimize={0,1,2,3} Set the optimization level (default 2 if unspecified or 3 if specified as -O)\n" | |||
" --inline={yes|no} Control whether inlining is permitted (overrides functions declared as @inline)\n" | |||
" --check-bounds={yes|no} Emit bounds checks always or never (ignoring declarations)\n" | |||
" --polly={yes|no} Enable or disable the polyhedral optimizer Polly (overrides @polly declaration)\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should put #ifdef USE_POLLY
around this
Passing `--polly=no` will cause `@polly` declarations to be ignored. This facilitates debugging or evaluating performance differences between using/not using Polly without having to manually remove `@polly` declarations from functions.
lgtm. if we add another similar option in the future, maybe we should transition to a feature list (e.g. is this still WIP, or can we merge it? |
f2348c4
to
2116a6c
Compare
Thank you for the feedback! It's no longer WIP. |
New command-line flags should be mentioned in NEWS.md |
When this option is passed
@polly
declarations will be ignored. This facilitates debugging or evaluating performance differences between using/not using Polly without having to manually remove@polly
declarations from functions.I also wanted to ask you for some advice on the following issues: The
polly
field in theJLOptions
type will also be present in a non-Polly build (USE_POLLY := 0
) because I don't know how I could hide it in this case. Do you think that there would be a better alternative for this or would that be acceptable?Furthermore, I also wanted to add according test cases to
test/cmdlineargs.jl
:But the problem for the second test case is that in a non-Polly build
--disable-polly
would not be available which would make this test fail. A possible solution would be to add the following to thebuild_h.jl.phy
target inbase/Makefile
:Then it should be possible to make the above test cases conditional by adding:
Do you think that this would be a convenient solution?
Thank you in advance for your help!
Best,
Matthias
@TobiG @vtjnash @timholy