Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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 5 commits into from
Mar 13, 2024

Conversation

czgdp1807
Copy link
Collaborator

apply_passes(al, asr, _user_defined_passes, pass_options,
diagnostics);
} else if( apply_default_passes ) {
pass_options.fast = is_fast;
if( is_fast ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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 pass_options.fast is alone enough. is_fast was redundant.

@@ -287,12 +286,10 @@ namespace LCompilers {
PassOptions& pass_options,
diag::Diagnostics &diagnostics) {
if( !_user_defined_passes.empty() ) {
pass_options.fast = true;
Copy link
Collaborator Author

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 of pass_options.

@czgdp1807 czgdp1807 merged commit 44c6b96 into lcompilers:main Mar 13, 2024
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

Successfully merging this pull request may close these issues.

1 participant