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

Add flag that will end compilation at or before a specified pass #9025

Closed
LouisJenkinsCS opened this issue Mar 29, 2018 · 5 comments
Closed

Comments

@LouisJenkinsCS
Copy link
Member

LouisJenkinsCS commented Mar 29, 2018

I believe there should be a flag that can be used to end compilation early. Currently there are flags to disable specific optimizations, to disable all optimization, and even to stop before code generation. A flag that stops compilation at a particular point helps compiler developers test up to a specific pass without having to wait for everything to finish or have to filter their results. It can also benefit developers that interact with the compiler as it provides more customization.

A proposed flag could be something like --stop-after-pass <passname>.

Edit:

Related issue: #9003

@mppf
Copy link
Member

mppf commented Mar 30, 2018

Sounds fine to me, and relatively simple to implement. I suspect there would be no objections to adding such a flag as a developer-only flag.

@LouisJenkinsCS
Copy link
Member Author

LouisJenkinsCS commented Mar 30, 2018

I believe I have found where to implement --stop-at, which is runpasses.cpp:168-188. I can see about adding some code that compares the name of the current pass to the the desired pass, should be easy enough to do.

@LouisJenkinsCS
Copy link
Member Author

Added the flag --stop-after-pass <passname> and I handle it appropriately. Will be in PR once finished all fixes and changes.

mppf added a commit that referenced this issue Apr 23, 2018
Add '--ignore-user-errors' and '--stop-after-pass' compiler flags

[PR by @LouisJenkinsCS - thanks! tested/reviewed by @mppf]

Introduced new flag, `--ignore-user-errors` which functions similar to `--ignore-errors` where it will continue compilation after discovering a user error, but unlike `--ignore-errors` it will stop at internal errors. The rationale for such a change is discussed in issue #9024.

Also introduced is a new flag, `--stop-after-pass` which will cease compilation after the requested pass, which must match in name. If a pass is declared, it will check on each pass whether or not the names match and if so it will 'short-circuit' compilation to end early. The rationale for such a change is discussed in issue #9025 

[Passed full local testing]
@bradcray
Copy link
Member

@LouisJenkinsCS: Can this issue be closed now that PR #9206 is merged?

@LouisJenkinsCS
Copy link
Member Author

Yep, forgot about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants