Add an option to skip pass in default pipeline#1069
Add an option to skip pass in default pipeline#1069Smit-create merged 2 commits intolcompilers:mainfrom
Conversation
| app.add_flag("--indent", compiler_options.indent, "Indented print ASR/AST"); | ||
| app.add_flag("--tree", compiler_options.tree, "Tree structure print ASR/AST"); | ||
| app.add_option("--pass", arg_pass, "Apply the ASR pass and show ASR (implies --show-asr)"); | ||
| app.add_option("--skip_pass", skip_pass, "Skip an ASR pass in default pipeline"); |
There was a problem hiding this comment.
What if I want to skip multiple passes? Like loop unrolling and function inlining? I think we should treat skip_pass and pass command line arguments in the same fashion while parsing them but just ignore the pass which is present skip_pass vector.
There was a problem hiding this comment.
Yes, I consider it will be like the way in parse_pass_arg().
although in the issue mentioned just said Add an option to skip/ignore a pass in the default pipeline
So I left it here.
|
Rest this is a good PR. @redbopo Would you like to complete it so that we can merge? |
|
Thanks for reviews, @czgdp1807 , I'll add it soon. |
| } | ||
| } | ||
| _parse_pass_arg(arg_pass, _user_defined_passes); | ||
| _parse_pass_arg(skip_pass, _skip_passes); |
|
Thanks for reviews @czgdp1807 , is it okay to merge it now? |
certik
left a comment
There was a problem hiding this comment.
I think this is fine for now. I think we have to ultimately rework how passes are managed and make this more general. Until then I think this works.
a9807b0 to
47794b8
Compare
There was a problem hiding this comment.
LGTM. But merge after #1411 is complete. In fact once #1411 is complete, @Smit-create would you be able to add this same feature to LFortran as well. We will merge both this PR and the one you will create for LFortran together. This is a good feature so I guess shouldn't wait for next libasr sync.
|
@Smit-create Please rebase on top of latest |
Also change option to --skip-pass, format like other options.
47794b8 to
6525a76
Compare
Add an option to skip/ignore a pass in the default pipeline in issue_943
Although there will be conflict with print asr pass PR
I think it's okay to just start.