History log of /llvm-project/mlir/test/Target/LLVMIR/Import/function-attributes.ll (Results 1 – 25 of 26)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 4fc514af 29-Jan-2025 Guojin <he.guojin@gmail.com>

[MLIR][LLVM] Fix import of dso_local attribute (#124822)

The import of LLVM IR should use is isDSOLocal instead of
hasLocalLinkage to set the dso_local attribute.
Without this change, function def

[MLIR][LLVM] Fix import of dso_local attribute (#124822)

The import of LLVM IR should use is isDSOLocal instead of
hasLocalLinkage to set the dso_local attribute.
Without this change, function definitions that mostly have external
linkage would be missing dso_local attribute during translation.

---------

Co-authored-by: Tobias Gysi <tobias.gysi@nextsilicon.com>

show more ...


# 29441e4f 29-Jan-2025 Nikita Popov <npopov@redhat.com>

[IR] Convert from nocapture to captures(none) (#123181)

This PR removes the old `nocapture` attribute, replacing it with the new
`captures` attribute introduced in #116990. This change is
intended

[IR] Convert from nocapture to captures(none) (#123181)

This PR removes the old `nocapture` attribute, replacing it with the new
`captures` attribute introduced in #116990. This change is
intended to be essentially NFC, replacing existing uses of `nocapture`
with `captures(none)` without adding any new analysis capabilities.
Making use of non-`none` values is left for a followup.

Some notes:
* `nocapture` will be upgraded to `captures(none)` by the bitcode
reader.
* `nocapture` will also be upgraded by the textual IR reader. This is to
make it easier to use old IR files and somewhat reduce the test churn in
this PR.
* Helper APIs like `doesNotCapture()` will check for `captures(none)`.
* MLIR import will convert `captures(none)` into an `llvm.nocapture`
attribute. The representation in the LLVM IR dialect should be updated
separately.

show more ...


Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5
# 92a15dd7 27-Nov-2024 Krzysztof Drewniak <Krzysztof.Drewniak@amd.com>

[mlir][LLVM] Plumb range attributes on parameters and results through (#117801)

We've had the ability to define LLVM's `range` attribute through
#llvm.constant_range for some time, and have used t

[mlir][LLVM] Plumb range attributes on parameters and results through (#117801)

We've had the ability to define LLVM's `range` attribute through
#llvm.constant_range for some time, and have used this for some GPU
intrinsics. This commit allows using `llvm.range` as a parameter or
result attribute on function declarations and definitions.

show more ...


Revision tags: llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1
# 2eea9d6a 23-Jul-2024 Finlay <finlay.marno@codeplay.com>

[mlir] Rename memory attribute to memory_effects in llvmir dialect (#100108)

This commit renames the memory attribute on operations to "memory_effects" to be in line with the naming LLVM IR is using.


Revision tags: llvmorg-20-init
# aa21ee79 17-Jul-2024 Finlay <finlay.marno@codeplay.com>

[MLIR] Add attributes no_unwind and will_return to the LLVMIR dialect (#98921)

And testing.
These are being added to be used in the GPU to LLVM SPV pass.

---------

Co-authored-by: Victor Pere

[MLIR] Add attributes no_unwind and will_return to the LLVMIR dialect (#98921)

And testing.
These are being added to be used in the GPU to LLVM SPV pass.

---------

Co-authored-by: Victor Perez <victor.perez@codeplay.com>

show more ...


# e5865ec9 09-Jul-2024 runseny <145632023+runseny@users.noreply.github.com>

[MLIR][LLVM] Add ftz and fuse FP ops related function attribute support (#97812)

Adds `denormal-fp-math-f32`, `denormal-fp-math`, `fp-contract` to
llvmFuncOp attributes.

`denormal-fp-math-f32` a

[MLIR][LLVM] Add ftz and fuse FP ops related function attribute support (#97812)

Adds `denormal-fp-math-f32`, `denormal-fp-math`, `fp-contract` to
llvmFuncOp attributes.

`denormal-fp-math-f32` and `denormal-fp-math` can enable the ftz, that
is , flushing denormal to zero.

`fp-contract` can enable the fma fusion such as `mul + add -> fma`

show more ...


# d6df0187 05-Jul-2024 Finlay <finlay.marno@codeplay.com>

[MLIR] Add the convergent attribute to LLVM Dialect (#97709)

In order to use the convergent attribute in the GPUToLLVMSPV pass, I've
added the attribute to the LLVM dialect.
Some details on the co

[MLIR] Add the convergent attribute to LLVM Dialect (#97709)

In order to use the convergent attribute in the GPUToLLVMSPV pass, I've
added the attribute to the LLVM dialect.
Some details on the convergent attribute
https://llvm.org/docs/ConvergentOperations.html#convergent-operations

show more ...


Revision tags: llvmorg-18.1.8
# c012e487 12-Jun-2024 Johannes de Fine Licht <johannes@musicmedia.dk>

[MLIR][LLVM] Promote noinline/alwaysinline/optnone out of passthrough (#95110)

The `noinline`, `alwaysinline`, and `optnone` function attributes are
already being used in MLIR code for the LLVM inl

[MLIR][LLVM] Promote noinline/alwaysinline/optnone out of passthrough (#95110)

The `noinline`, `alwaysinline`, and `optnone` function attributes are
already being used in MLIR code for the LLVM inlining interface and in
some SPIR-V lowering, despite residing in the passthrough dictionary,
which is intended as exactly that -- a pass through MLIR -- and not to
model any actual semantics being handled in MLIR itself.

Promote the `noinline`, `alwaysinline`, and `optnone` attributes out of
the passthrough dictionary on `llvm.func` into first class unit
attributes, updating the import and export accordingly.

Add a verifier to `llvm.func` that checks that these attributes are not
set in an incompatible way according to the LLVM specification.

Update the LLVM dialect inlining interface to use the first class
attributes to check whether inlining is possible.

show more ...


Revision tags: llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2
# d313614b 01-Feb-2024 Sander de Smalen <sander.desmalen@arm.com>

[AArch64] Replace LLVM IR function attributes for PSTATE.ZA. (#79166)

Since https://github.com/ARM-software/acle/pull/276 the ACLE
defines attributes to better describe the use of a given SME state

[AArch64] Replace LLVM IR function attributes for PSTATE.ZA. (#79166)

Since https://github.com/ARM-software/acle/pull/276 the ACLE
defines attributes to better describe the use of a given SME state.

Previously the attributes merely described the possibility of it being
'shared' or 'preserved', whereas the new attributes have more semantics
and also describe how the data flows through the program.

For ZT0 we already had to add new LLVM IR attributes:
* aarch64_new_zt0
* aarch64_in_zt0
* aarch64_out_zt0
* aarch64_inout_zt0
* aarch64_preserves_zt0

We have now done the same for ZA, such that we add:
* aarch64_new_za (previously `aarch64_pstate_za_new`)
* aarch64_in_za (more specific variation of `aarch64_pstate_za_shared`)
* aarch64_out_za (more specific variation of `aarch64_pstate_za_shared`)
* aarch64_inout_za (more specific variation of
`aarch64_pstate_za_shared`)
* aarch64_preserves_za (previously `aarch64_pstate_za_shared,
aarch64_pstate_za_preserved`)

This explicitly removes 'pstate' from the name, because with SME2 and
the new ACLE attributes there is a difference between "sharing ZA"
(sharing
the ZA matrix register with the caller) and "sharing PSTATE.ZA" (sharing
either the ZA or ZT0 register, both part of PSTATE.ZA with the caller).

show more ...


# 748c2959 30-Jan-2024 Alex Bradbury <asb@igalia.com>

[MLIR][LLVM] Add fast-math related function attribute support (#79812)

Adds unsafe-fp-math, no-infs-fp-math, no-nans-fp-math,
approx-func-fp-math, and no-signed-zeros-fp-math function attributes.

[MLIR][LLVM] Add fast-math related function attribute support (#79812)

Adds unsafe-fp-math, no-infs-fp-math, no-nans-fp-math,
approx-func-fp-math, and no-signed-zeros-fp-math function attributes.

This allows code generators using the LLVMIR dialect to match the
codegen of Clang.

show more ...


Revision tags: llvmorg-18.1.0-rc1, llvmorg-19-init
# 21e1bf2d 11-Jan-2024 Mats Petersson <mats.petersson@arm.com>

Add more ZA modes (#77361)

Add more ZA modes

Adds the arm_shared_za and arm_preserves_za attributes to the existing
arm_new_za attribute. The functionality already exists in LLVM, so just

Add more ZA modes (#77361)

Add more ZA modes

Adds the arm_shared_za and arm_preserves_za attributes to the existing
arm_new_za attribute. The functionality already exists in LLVM, so just
"linking the pieces together".

For more details see:
https://arm-software.github.io/acle/main/acle.html#sme-attributes-relating-to-za

show more ...


# 79524ba5 13-Dec-2023 Tom Eccles <tom.eccles@arm.com>

[mlir][ArmSME] Add sve streaming compatible attribute (#75222)

Following the same path already used for ArmStreaming and
ArmLocallyStreaming.

This should correspond to clang's __arm_streaming_co

[mlir][ArmSME] Add sve streaming compatible attribute (#75222)

Following the same path already used for ArmStreaming and
ArmLocallyStreaming.

This should correspond to clang's __arm_streaming_compatible attribute.

show more ...


Revision tags: 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, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# c55a8861 04-Jul-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir][LLVM] Add alignment to LLVMFuncOp

Reviewed By: gysit

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


# 10417b13 04-Jul-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir][LLVM] Add unnamed_addr to LLVMFuncOp

This commit adds LLVM's unnamed_addr enum to LLVMFuncOp.

Reviewed By: gysit

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


# bc609640 30-Jun-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir][LLVM] Add section attribute to LLVMFuncOp

This commit adds an optional section attribute to the `LLVMFuncOp` and
adds import and export functionality for it.

Reviewed By: gysit

Differential

[mlir][LLVM] Add section attribute to LLVMFuncOp

This commit adds an optional section attribute to the `LLVMFuncOp` and
adds import and export functionality for it.

Reviewed By: gysit

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

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5
# 7d465909 25-May-2023 Cullen Rhodes <cullen.rhodes@arm.com>

[mlir][llvm] Add arm_streaming LLVM function attributes

This patch adds two optional attributes to 'llvm.func' op for the Armv9
Streaming SVE (SSVE) mode [1] that map 1-1 with LLVM function attribut

[mlir][llvm] Add arm_streaming LLVM function attributes

This patch adds two optional attributes to 'llvm.func' op for the Armv9
Streaming SVE (SSVE) mode [1] that map 1-1 with LLVM function attributes [2]:

* arm_streaming -> aarch64_pstate_sm_enabled
* arm_locally_streaming -> aarch64_pstate_sm_body

Streaming-mode is part of the interface (ABI) for functions with the
first attribute and it's the responsibility of the caller to manage
PSTATE.SM on entry/exit to functions with this attribute [3]. The LLVM
backend will emit 'smstart sm' / 'smstop sm' [4] around calls to
streaming functions.

In locally streaming functions PSTATE.SM is kept internal and managed by
the callee on entry/exit. The LLVM backend will emit 'smstart sm' /
'smstop sm' in the prologue / epilogue for functions with this
attribute.

The integration test for SSVE has been updated to no longer use the
passthrough mechanism that's intended for prototyping.

PATCH [1 / 2] in series for RFC: https://discourse.llvm.org/t/rfc-supporting-armv9-scalable-matrix-extension-sme-streaming-sve-ssve-mode-in-mlir/70678

[1] https://developer.arm.com/documentation/ddi0616/aa
[2] https://llvm.org/docs/AArch64SME.html#introduction
[3] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#671pstatesm-interfaces
[4] https://developer.arm.com/documentation/ddi0602/2023-03/Base-Instructions/SMSTART--Enables-access-to-Streaming-SVE-mode-and-SME-architectural-state--an-alias-of-MSR--immediate--

Reviewed By: awarzynski, dcaballe, WanderAway

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

show more ...


Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4
# 6628767e 10-Mar-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir][llvm] Add visibility attribute

This commit introduces the LLVM's visibility attribute and adds it to
both globals and functions.

Furthermore, this commit ensures that "thread_local" is print

[mlir][llvm] Add visibility attribute

This commit introduces the LLVM's visibility attribute and adds it to
both globals and functions.

Furthermore, this commit ensures that "thread_local" is printed in the
correct place and adds a test for that.

Reviewed By: gysit

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

show more ...


Revision tags: llvmorg-16.0.0-rc3
# bf91cd6e 17-Feb-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir][llvm] Verify LLVM module before import

This commit ensures that the importing of LLVM modules first verifies
that the module is even valid. As many tests did not work with valid
LLVM IR, they

[mlir][llvm] Verify LLVM module before import

This commit ensures that the importing of LLVM modules first verifies
that the module is even valid. As many tests did not work with valid
LLVM IR, they were fixed as part of this commit.

Some error messages were only reachable with invalid input IR, thus they
were replaced with a failures.

Reviewed By: gysit

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

show more ...


Revision tags: llvmorg-16.0.0-rc2
# 52120584 31-Jan-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

Reland "[mlir][LLVM] Add all LLVM parameter attributes"

This change was reverted because it introduced a linking issue due to
duplicated symbols. Making sure that the detail helper only has a static

Reland "[mlir][LLVM] Add all LLVM parameter attributes"

This change was reverted because it introduced a linking issue due to
duplicated symbols. Making sure that the detail helper only has a static
header implementation fixes this issue.

Reviewed By: gysit

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

show more ...


# bd0c8092 30-Jan-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

Revert "[mlir][LLVM] Add all LLVM parameter attributes"

This reverts commit 54941942c82f3a1640d50c0e354d29a3cf5535f6.

The commit introduced a linking error in flang.


# 54941942 30-Jan-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir][LLVM] Add all LLVM parameter attributes

This commit adds name accessors and verifiers for all LLVM parameter
attributes excluding the swift specific ones to the LLVM dialect.
Additionally, th

[mlir][LLVM] Add all LLVM parameter attributes

This commit adds name accessors and verifiers for all LLVM parameter
attributes excluding the swift specific ones to the LLVM dialect.
Additionally, these attributes are now also imported and exported.

Reviewed By: gysit

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

show more ...


Revision tags: llvmorg-16.0.0-rc1
# 56880fd2 25-Jan-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir][LLVM] Add result attribute import support

This commit introduces support for importing result attributes.

Depends on D142372

Reviewed By: gysit

Differential Revision: https://reviews.llvm.

[mlir][LLVM] Add result attribute import support

This commit introduces support for importing result attributes.

Depends on D142372

Reviewed By: gysit

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

show more ...


Revision tags: llvmorg-17-init
# 3d36df3e 20-Jan-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir][LLVM] Add passthrough import support

This commit extends the LLVMIR import to support function attributes by
adding them to the passthrough array attribute.

Depends on D142013

Reviewed By:

[mlir][LLVM] Add passthrough import support

This commit extends the LLVMIR import to support function attributes by
adding them to the passthrough array attribute.

Depends on D142013

Reviewed By: gysit

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

show more ...


# 9b9cfe77 12-Jan-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir][LLVM] Replace readnone with memory effects

This commit introduces LLVM's `MemoryEffects` attribute and replaces the
deprecated usage of `llvm.readnone` in the LLVM dialect.
The absence of the

[mlir][LLVM] Replace readnone with memory effects

This commit introduces LLVM's `MemoryEffects` attribute and replaces the
deprecated usage of `llvm.readnone` in the LLVM dialect.
The absence of the attribute on a `LLVMFuncOp` implies that it might
access all kinds of memory. This semantic corresponds to `llvm::Function`'s
behaviour.

Depends on D142002

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

show more ...


Revision tags: llvmorg-15.0.7
# b72dd6f7 05-Jan-2023 Christian Ulmann <christian.ulmann@nextsilicon.com>

[mlir] Add function_entry_count to LLVMFuncOp

This commit introduces the function_entry_count metadata field to the
LLVMFuncOp and adds both the corresponding import and export
funtionalities.
The i

[mlir] Add function_entry_count to LLVMFuncOp

This commit introduces the function_entry_count metadata field to the
LLVMFuncOp and adds both the corresponding import and export
funtionalities.
The import of the function metadata uses the same infrastructure as the
instruction metadata, i.e., it dispatches through a dialect interface.

Reviewed By: gysit

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

show more ...


12