[flang-commits] [flang] [Flang][MLIR] Teach AddAliasTags getFuncArgName to deal with omp::TargetOp's (PR #92036)
via flang-commits
flang-commits at lists.llvm.org
Tue May 14 10:45:50 PDT 2024
agozillon wrote:
> Yes you were right to assume that this should work already. I should have got to this sooner.
>
> I think `fir::AliasAnalysis::getSource` is wrong to say that these are dummy arguments. That is what is causing the TBAA tags pass to get confused. `getFuncArgName` should assert that `func` is non-null, and release builds should return `""` if it is not (so that we don't tag things that aren't dummy arguments as dummy arguments).
>
> I think `isDummyArgument` (https://github.com/llvm/llvm-project/blob/main/flang/lib/Optimizer/Analysis/AliasAnalysis.cpp#L31) needs to check that the "entry block" has an immediate parent that implements `mlir::FunctionOpInterface`. I'll post a patch.
Thank you very much! That seems like a more appropriate fix for the time being, and we can approach the idea of handling TargetOp in passes like this in the future after some more thought if at all necessary.
I'll be on vacation until next Thursday, but I'll have a look at your patch ASAP to check if it resolves the issue (feel free to tag me in it and drop a message with the link here)! After which we can likely close this PR! I'll leave it open for the time being incase of further discussion.
https://github.com/llvm/llvm-project/pull/92036
More information about the flang-commits
mailing list