Skip to content

Conversation

vzakhari
Copy link
Contributor

This is a follow-up on #140803, which was disabled in #142128
due to #143219.

@vzakhari vzakhari requested review from tblah and usha1830 August 28, 2025 23:53
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Aug 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Aug 28, 2025

@llvm/pr-subscribers-flang-driver
@llvm/pr-subscribers-flang-openmp

@llvm/pr-subscribers-flang-fir-hlfir

Author: Slava Zakharin (vzakhari)

Changes

This is a follow-up on #140803, which was disabled in #142128
due to #143219.


Full diff: https://github.com/llvm/llvm-project/pull/155949.diff

1 Files Affected:

  • (modified) flang/lib/Optimizer/Passes/Pipelines.cpp (+1-1)
diff --git a/flang/lib/Optimizer/Passes/Pipelines.cpp b/flang/lib/Optimizer/Passes/Pipelines.cpp
index 98f947a1f635d..6cc3290ff5cc2 100644
--- a/flang/lib/Optimizer/Passes/Pipelines.cpp
+++ b/flang/lib/Optimizer/Passes/Pipelines.cpp
@@ -14,7 +14,7 @@
 
 /// Force setting the no-alias attribute on fuction arguments when possible.
 static llvm::cl::opt<bool> forceNoAlias("force-no-alias", llvm::cl::Hidden,
-                                        llvm::cl::init(false));
+                                        llvm::cl::init(true));
 
 namespace fir {
 

@usha1830
Copy link
Contributor

Looks good to me.

One suggestion: I don’t think the tests should be modified to use the flag to turn off noalias. It’s better to keep the tests using the default behavior, unless the test is specifically meant to verify the case where noalias should be avoided.

Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

nit: I agree the tests should be updated. I don't mind doing that for you in a separate PR if you don't have time. I understand the test conflicts are only because of my revert.

@vzakhari
Copy link
Contributor Author

I am planning removing the --force-no-alias option and updating the tests in a separate PR, if this change sticks. I would prefer keeping the test updates now: if we have to revert the option back to false, then we can just flip the switch and leave the tests as-is.

Thank you for the review and all the work you put into trying to resolve the exchange2 issues!

@vzakhari vzakhari merged commit a36c134 into llvm:main Aug 29, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:driver flang:fir-hlfir flang:openmp flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants