[flang-commits] [flang] [flang] AliasAnalysis: Fix pointer component logic (PR #94242)

Joel E. Denny via flang-commits flang-commits at lists.llvm.org
Thu Jun 20 13:20:32 PDT 2024


jdenny-ornl wrote:

> I am a bit wary of the approach here. I do not like that we have to do work to get correctness (we should do work to prove something is not a pointer/target as much as possible). I see easy extensibility bugs when new ops are added.

I understand your point, but how far would we take such an approach?  I copied the solution for determining `Attribute::Pointer` on `fir::CoordinateOp` from the existing solution on both `fir::AddrOfOp` and dummy args.  Is there something unique about `fir::CoordinateOp` that gives you pause?  Without this PR, do you find existing uses of `Source::isTargetOrPointer` problematic?

>  I would rather an approach where we have a mayBeATargetOrPointer flag set to true by default and that we set to false when we can prove it.

Would it maintain a list of cases (e.g., dummy args, `fir::AddrOfOp`, and possibly fir::CoordinateOp` after my solution) where we are confident we can determine no pointer/target?

https://github.com/llvm/llvm-project/pull/94242


More information about the flang-commits mailing list