[flang-commits] [flang] [flang] Use fir.declare/fir.dummy_scope for TBAA tags attachments. (PR #92472)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Thu May 23 02:44:56 PDT 2024
================
@@ -30,8 +30,15 @@ using namespace mlir;
static bool isDummyArgument(mlir::Value v) {
auto blockArg{mlir::dyn_cast<mlir::BlockArgument>(v)};
- if (!blockArg)
+ if (!blockArg) {
+ auto defOp = v.getDefiningOp();
+ if (defOp) {
+ if (auto declareOp = mlir::dyn_cast<fir::DeclareOp>(defOp))
+ if (declareOp.getDummyScope())
+ return true;
----------------
tblah wrote:
Ahh hang on. `getInstantiationPoint` will be `false` and so `getSource` will track through the `fir.declare` in my example.
`getSource` does use `isDummyArgument` in other places though, and I am worried about a similar confusion. For example, if an unknown operation leads to an unknown source, then the above mechanism could occur (I think maybe this could happen when using mlir inlining inside of an openmp or openacc container operation).
https://github.com/llvm/llvm-project/pull/92472
More information about the flang-commits
mailing list