Skip to content

Commit

Permalink
[flang][TBAABuilder] not all loads and stores are inside of functions (
Browse files Browse the repository at this point in the history
…#84305)

TBAA builder assumed that all loads/stores are inside of functions and
hit an assertion once it found loads and stores inside of an
omp::ReductionDeclareOp.

For now just don't add TBAA tags to those loads and stores. They would
end up in a different TBAA tree to the host function after
OpenMPIRBuilder inlines them anyway so there isn't an easy way of making
this work.
  • Loading branch information
tblah committed Mar 8, 2024
1 parent 860a400 commit c76d853
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flang/lib/Optimizer/CodeGen/TBAABuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ void TBAABuilder::attachTBAATag(AliasAnalysisOpInterface op, Type baseFIRType,
return;

mlir::LLVM::LLVMFuncOp func = op->getParentOfType<mlir::LLVM::LLVMFuncOp>();
assert(func && "func.func should have already been converted to llvm.func");
if (!func)
return;

++tagAttachmentCounter;
if (tagAttachmentLimit != kTagAttachmentUnlimited &&
Expand Down

0 comments on commit c76d853

Please sign in to comment.