-
Notifications
You must be signed in to change notification settings - Fork 171
Remove is_fast
and its associated methods from PassManager
#2600
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9466224
DEV: Removed is_fast and its associated methods
czgdp1807 6881e80
DEV: Remove usage of non-existent functions
czgdp1807 5dd4f8e
TEST: Add processing of fast tag in tests.toml file
czgdp1807 ab4425a
TEST: Set fast=true for inline_function_calls
czgdp1807 70aaf07
TEST: Updated reference tests
czgdp1807 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,7 +106,6 @@ namespace LCompilers { | |
{"insert_deallocate", &pass_insert_deallocate} | ||
}; | ||
|
||
bool is_fast; | ||
bool apply_default_passes; | ||
bool c_skip_pass; // This will contain the passes that are to be skipped in C | ||
|
||
|
@@ -196,7 +195,7 @@ namespace LCompilers { | |
} | ||
} | ||
|
||
PassManager(): is_fast{false}, apply_default_passes{false}, | ||
PassManager(): apply_default_passes{false}, | ||
c_skip_pass{false} { | ||
_passes = { | ||
"nested_vars", | ||
|
@@ -287,12 +286,10 @@ namespace LCompilers { | |
PassOptions& pass_options, | ||
diag::Diagnostics &diagnostics) { | ||
if( !_user_defined_passes.empty() ) { | ||
pass_options.fast = true; | ||
apply_passes(al, asr, _user_defined_passes, pass_options, | ||
diagnostics); | ||
} else if( apply_default_passes ) { | ||
pass_options.fast = is_fast; | ||
if( is_fast ) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was wrong earlier. The user input should never be modified. In fact |
||
if( pass_options.fast ) { | ||
apply_passes(al, asr, _with_optimization_passes, pass_options, | ||
diagnostics); | ||
} else { | ||
|
@@ -371,14 +368,6 @@ namespace LCompilers { | |
} | ||
} | ||
|
||
void use_optimization_passes() { | ||
is_fast = true; | ||
} | ||
|
||
void do_not_use_optimization_passes() { | ||
is_fast = false; | ||
} | ||
|
||
void use_default_passes(bool _c_skip_pass=false) { | ||
apply_default_passes = true; | ||
c_skip_pass = _c_skip_pass; | ||
|
6 changes: 3 additions & 3 deletions
6
...unction_calls-func_inline_01-8b6a5da.json → ...unction_calls-func_inline_01-fba3c47.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Same here.
pass_options.fast
should only be read from the command line and should not be set to true deliberately. This line caused bugs in LC and optimisations weren't being applied to LLVM because of such modifications ofpass_options
.