[flang-commits] [flang] [flang] AliasAnalysis: Fix pointer component logic (PR #94242)
via flang-commits
flang-commits at lists.llvm.org
Wed Aug 21 00:48:57 PDT 2024
https://github.com/jeanPerier commented:
Thanks @jdenny-ornl for the update. This looks better!
I am still a bit bothered by the fact that the code is turned in a way were it is proving aliasing instead of no aliasing (i.e., it is doing `if (cdt1) then mayalias else if (cdt2) then mayalias .... else noalias` ), this makes it harder to validate that aliasing cases are not missing via human review (at least in my experience). But I have to concede the standard is a bit written in that way in section 15.5.2.14 of F2023, and I do not have immediate suggestions to reverse the logic in a clearer way.
Can I ask you to push the `isRecordWithPointerComponent` and `isPointerReference` NFC change as well as the alias-analysis-9.fir renaming in a preliminary patch so that your functional changes stands out?
Then I will run this update through some end-to-end apps and keep you posted.
Do you know any apps where I should see performance improvement (i.e., was your change motivated by some use case in some app?). Note that in general I think we should try to change aliasing code in the future either to simplify the logic, or when motivated by some actual performance use case because these changes need thorough review, which require a lot of brain bandwidth. I have limited faith in end-to-end testing currently for aliasing given flang has a rather limited usage of it, so my concern is the introduction of hard to catch dormant optimization bugs (so thank you for all the LIT tests you are adding in your patch, this is great).
https://github.com/llvm/llvm-project/pull/94242
More information about the flang-commits
mailing list