History log of /llvm-project/flang/lib/Optimizer/CodeGen/TBAABuilder.cpp (Results 1 – 13 of 13)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7
# 6cd86d0f 04-Jun-2024 Slava Zakharin <szakharin@nvidia.com>

[flang] Use fir.declare/fir.dummy_scope for TBAA tags attachments. (#92472)

With MLIR inlining (e.g. `flang-new -mmlir -inline-all=true`)
the current TBAA tags attachment is suboptimal, because
we

[flang] Use fir.declare/fir.dummy_scope for TBAA tags attachments. (#92472)

With MLIR inlining (e.g. `flang-new -mmlir -inline-all=true`)
the current TBAA tags attachment is suboptimal, because
we may lose information about the callee's dummy arguments
(by bypassing fir.declare in AliasAnalysis::getSource).
This is a conservative first step to improve the situation.
This patch makes AddAliasTagsPass to account for fir.dummy_scope
hierarchy after MLIR inlining and use it to place the TBAA tags
into TBAA trees corresponding to different function scopes.
The pass uses special mode of AliasAnalysis to find the instantiation
point of a Fortran variable (a [hl]fir.decalre) when searching
for the source of a memory reference. In this mode, AliasAnalysis
will always stop at fir.declare operations that have dummy_scope
operands - there should not be a reason to past throught it
for the purpose of TBAA tags attachment.

show more ...


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5
# fac349a1 28-Apr-2024 Christian Sigg <chsigg@users.noreply.github.com>

Reapply "[mlir] Mark `isa/dyn_cast/cast/...` member functions depreca… (#90406)

…ted. (#89998)" (#90250)

This partially reverts commit 7aedd7dc754c74a49fe84ed2640e269c25414087.

This change rem

Reapply "[mlir] Mark `isa/dyn_cast/cast/...` member functions depreca… (#90406)

…ted. (#89998)" (#90250)

This partially reverts commit 7aedd7dc754c74a49fe84ed2640e269c25414087.

This change removes calls to the deprecated member functions. It does
not mark the functions deprecated yet and does not disable the
deprecation warning in TypeSwitch. This seems to cause problems with
MSVC.

show more ...


# 7aedd7dc 26-Apr-2024 dyung <douglas.yung@sony.com>

Revert "[mlir] Mark `isa/dyn_cast/cast/...` member functions deprecated. (#89998)" (#90250)

This reverts commit 950b7ce0b88318f9099e9a7c9817d224ebdc6337.

This change is causing build failures on

Revert "[mlir] Mark `isa/dyn_cast/cast/...` member functions deprecated. (#89998)" (#90250)

This reverts commit 950b7ce0b88318f9099e9a7c9817d224ebdc6337.

This change is causing build failures on a bot
https://lab.llvm.org/buildbot/#/builders/216/builds/38157

show more ...


# 950b7ce0 26-Apr-2024 Christian Sigg <chsigg@users.noreply.github.com>

[mlir] Mark `isa/dyn_cast/cast/...` member functions deprecated. (#89998)

See https://mlir.llvm.org/deprecation and
https://discourse.llvm.org/t/preferred-casting-style-going-forward.


Revision tags: llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2
# c76d853c 08-Mar-2024 Tom Eccles <tom.eccles@arm.com>

[flang][TBAABuilder] not all loads and stores are inside of functions (#84305)

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

[flang][TBAABuilder] not all loads and stores are inside of functions (#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.

show more ...


Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0
# 6042c2eb 14-Sep-2023 Tom Eccles <tom.eccles@arm.com>

[flang] use TBAAForest in TBAABuilder

This is important to ensure that tags end up in the same trees that were
created in the FIR TBAA pass. If they are in different trees then
everything in one tre

[flang] use TBAAForest in TBAABuilder

This is important to ensure that tags end up in the same trees that were
created in the FIR TBAA pass. If they are in different trees then
everything in one tree will be assumed to MayAlias with everything in the
other tree. This leads to poor performance.

@vzakhari requested that the old (not-per-function) trees are
maintained so I left the old test intact.

PR: https://github.com/llvm/llvm-project/pull/68437

show more ...


# cfe8ae38 03-Oct-2023 Slava Zakharin <szakharin@nvidia.com>

[flang] TBAA for memory accesses of derived type values. (#68047)

Since HLFIR bufferization can introduce shallow copies of derived
type values we have to be careful not to treat these load/store

[flang] TBAA for memory accesses of derived type values. (#68047)

Since HLFIR bufferization can introduce shallow copies of derived
type values we have to be careful not to treat these load/store
operations as data-only-accesses. If a derived type has descriptor
members, we attach any-access tag now.

show more ...


Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# 1dda134f 18-Jul-2023 Markus Böck <markus.bock+llvm@nextsilicon.com>

[mlir][flang] Convert TBAA metadata to an attribute representation

The current representation of TBAA is the very last in-tree user of the `llvm.metadata` operation.
Using ops to model metadata has

[mlir][flang] Convert TBAA metadata to an attribute representation

The current representation of TBAA is the very last in-tree user of the `llvm.metadata` operation.
Using ops to model metadata has a few disadvantages:
* Building a graph has to be done through some weakly typed indirection mechanism such as `SymbolRefAttr`
* Creating the metadata has to be done through a builder within a metadata op.
* It is not multithreading safe as operation insertion into the same block is not thread-safe

This patch therefore converts TBAA metadata into an attribute representation, in a similar manner as it has been done for alias groups and access groups in previous patches.

This additionally has the large benefit of giving us more "correctness by construction" as it makes things like cycles in a TBAA graph, or references to an incorrectly typed metadata node impossible.

Differential Revision: https://reviews.llvm.org/D155444

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2
# 30408f5c 11-Apr-2023 Valentin Clement <clementval@gmail.com>

[flang][NFC] Move TypeConverter.h header file to include dir

After the extraction of the TypeConverter, move the header files
to the include dir so the shared library build is fine.

Reviewed By: Pe

[flang][NFC] Move TypeConverter.h header file to include dir

After the extraction of the TypeConverter, move the header files
to the include dir so the shared library build is fine.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D147979

show more ...


Revision tags: llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4
# ba0c082b 02-Mar-2023 Tobias Gysi <tobias.gysi@nextsilicon.com>

[flang] Use the newly introduced AliasAnalysisOpInterface.

This revision uses the AliasAnalysisOpInterface introduced in
https://reviews.llvm.org/D144851 to set the tbaa attributes
of load and store

[flang] Use the newly introduced AliasAnalysisOpInterface.

This revision uses the AliasAnalysisOpInterface introduced in
https://reviews.llvm.org/D144851 to set the tbaa attributes
of load and store ops. With the attribute it is also possible to
set the attribute on atomics as well as on memcopy and
memove intrinsics as soon as https://reviews.llvm.org/D144965
lands.

Reviewed By: vzakhari

Differential Revision: https://reviews.llvm.org/D145044

show more ...


Revision tags: llvmorg-16.0.0-rc3
# fef08da4 10-Feb-2023 Tobias Gysi <tobias.gysi@nextsilicon.com>

[mlir][llvm] Store memory op metadata using op attributes.

The revision introduces operation attributes to store tbaa metadata on
load and store operations rather than relying using dialect attribut

[mlir][llvm] Store memory op metadata using op attributes.

The revision introduces operation attributes to store tbaa metadata on
load and store operations rather than relying using dialect attributes.
At the same time, the change also ensures the provided getters and
setters instead are used instead of a string based lookup. The latter
is done for the tbaa, access groups, and alias scope attributes.

The goal of this change is to ensure the metadata attributes are only
placed on operations that have the corresponding operation attributes.
This is imported since only these operations later on translate these
attributes to LLVM IR. Dialect attributes placed on other operations
are lost during the translation.

Reviewed By: vzakhari, Dinistro

Differential Revision: https://reviews.llvm.org/D143654

show more ...


Revision tags: llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init
# b1476365 19-Jan-2023 Slava Zakharin <szakharin@nvidia.com>

[NFC][flang] Added debug option to bisect TBAA tag attachments.

Reviewed By: jeanPerier, PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D142070


# 9c84d20f 17-Jan-2023 Slava Zakharin <szakharin@nvidia.com>

[flang] Generate TBAA information.

This is initial version of TBAA information generation for Flang
generated IR. The desired behavior is that TBAA type descriptors
are generated for FIR types durin

[flang] Generate TBAA information.

This is initial version of TBAA information generation for Flang
generated IR. The desired behavior is that TBAA type descriptors
are generated for FIR types during FIR to LLVM types conversion,
and then TBAA access tags are attached to memory accessing operations
when they are converted to LLVM IR dialect.

In the initial version the type conversion is not producing
TBAA type descriptors, and all memory accesses are just partitioned
into two sets of box and non-box accesses, which can never alias.

The TBAA generation is enabled by default at >O0 optimization levels.
TBAA generation may also be enabled via `apply-tbaa` option of
`fir-to-llvm-ir` conversion pass. `-mllvm -disable-tbaa` engineering
option allows disabling TBAA generation to override Flang's default
(e.g. when -O1 is used).

SPEC CPU2006/437.leslie3d speeds up by more than 2x on Icelake.

Reviewed By: jeanPerier, clementval

Differential Revision: https://reviews.llvm.org/D141820

show more ...