[flang-commits] [clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)
Nikita Popov via flang-commits
flang-commits at lists.llvm.org
Mon Aug 25 08:58:24 PDT 2025
nikic wrote:
@sjoerdmeijer Let me address two points separately.
The first is the original submission of this PR. There was an existing PR to enable loop interchange in https://github.com/llvm/llvm-project/pull/124911, and discussion for this enablement was consolidated there. I can see no evidence that reviewers at the time believed that loop interchange / dependence analysis is ready to be enabled. You *could* have posted a comment there asking whether people think it's okay to enable it just for Flang due to difference language characteristics -- and I expect you'd have gotten a fairly clear "no" on making this language-dependent. But that did not happen. I guess this was just a miscommunication.
Now, regarding the issues in dependence analysis that have been found more recently: Yes, I believe these issues are quite severe and justify a revert. It's not that these issues are easy to trigger, but that they point to some rather fundamental issues in the dependence analysis implementation, which will likely require non-trivial changes to fully address. I don't want to backport all necessary changes to LLVM 21.
And yes, there is a certain double standard when it comes to issues in a newly enabled pass, and issues in a pass that has already been enabled for a very long time. In the latter case, it would take some rather extreme circumstances for us to disable the pass entirely, while in the former case this is the default response for non-trivial issues.
https://github.com/llvm/llvm-project/pull/140182
More information about the flang-commits
mailing list