History log of /llvm-project/mlir/lib/Target/LLVMIR/ModuleImport.cpp (Results 1 – 25 of 131)
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 ...


# 2a1f7958 29-Jan-2025 Henrich Lauko <xlauko@mail.muni.cz>

[MLIR] Fix import of invokes with mismatched variadic types (#124828)

This resolves the same issue addressed in
https://github.com/llvm/llvm-project/pull/124286, but for invoke
operations. The iss

[MLIR] Fix import of invokes with mismatched variadic types (#124828)

This resolves the same issue addressed in
https://github.com/llvm/llvm-project/pull/124286, but for invoke
operations. The issue arose from duplicated logic for both imports. This
PR also refactors the common import code for call and invoke
instructions to mitigate issues in the future.

show more ...


Revision tags: llvmorg-21-init
# 95d993a8 24-Jan-2025 Henrich Lauko <xlauko@mail.muni.cz>

[MLIR] Fix import of calls with mismatched variadic types (#124286)

Previously, an indirect call was incorrectly generated when
`llvm::CallBase::getCalledFunction` returned null due to a type misma

[MLIR] Fix import of calls with mismatched variadic types (#124286)

Previously, an indirect call was incorrectly generated when
`llvm::CallBase::getCalledFunction` returned null due to a type mismatch
between the call and the function. This patch updates the code to use
`llvm::CallBase::getCalledOperand` instead.

show more ...


# f023da12 16-Jan-2025 Matthias Springer <me@m-sp.org>

[mlir][IR] Remove factory methods from `FloatType` (#123026)

This commit removes convenience methods from `FloatType` to make it
independent of concrete interface implementations.

See discussion

[mlir][IR] Remove factory methods from `FloatType` (#123026)

This commit removes convenience methods from `FloatType` to make it
independent of concrete interface implementations.

See discussion here:
https://discourse.llvm.org/t/rethink-on-approach-to-low-precision-fp-types/82361

Note for LLVM integration: Replace `FloatType::getF32(` with
`Float32Type::get(` etc.

show more ...


Revision tags: llvmorg-19.1.7
# 38fcf624 11-Jan-2025 William Moses <gh@wsmoses.com>

[MLIR] Import LLVM add flag to disable loadalldialects (#122574)

Co-authored-by: Oleksandr "Alex" Zinenko <ftynse@gmail.com>


# 1c067a51 08-Jan-2025 William Moses <gh@wsmoses.com>

[MLIR] Enable import of non self referential alias scopes (#121987)

Fixes #121965.

---------

Co-authored-by: Christian Ulmann <christianulmann@gmail.com>
Co-authored-by: Alex Zinenko <git@ozi

[MLIR] Enable import of non self referential alias scopes (#121987)

Fixes #121965.

---------

Co-authored-by: Christian Ulmann <christianulmann@gmail.com>
Co-authored-by: Alex Zinenko <git@ozinenko.com>

show more ...


# b5f21671 05-Jan-2025 William Moses <gh@wsmoses.com>

MLIR: Enable importing inlineasm calls (#121624)


Revision tags: 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
# 40afff7b 15-Nov-2024 lfrenot <leon.frenot@ens-lyon.fr>

[mlir][LLVM] Add disjoint flag (#115855)

The implementation is mostly based on the one existing for the exact
flag.

disjoint means that for each bit, that bit is zero in at least one of
the inp

[mlir][LLVM] Add disjoint flag (#115855)

The implementation is mostly based on the one existing for the exact
flag.

disjoint means that for each bit, that bit is zero in at least one of
the inputs. This allows the Or to be treated as an Add since no carry
can occur from any bit. If the disjoint keyword is present, the result
value of the or is a [poison
value](https://llvm.org/docs/LangRef.html#poisonvalues) if both inputs
have a one in the same bit position. For vectors, only the element
containing the bit is poison.

show more ...


# 89aaf2cf 11-Nov-2024 lfrenot <leon.frenot@ens-lyon.fr>

[mlir][LLVM] Add nneg flag (#115498)

This implementation is based on the existing one for the exact flag.

If the nneg flag is set and the argument is negative, the result is a
poison value.


# afa178d3 08-Nov-2024 lfrenot <leon.frenot@gmail.com>

[mlir][LLVM] Add exact flag (#115327)

The implementation is mostly based on the one existing for the nsw and
nuw flags.

If the exact flag is present, the corresponding operation returns a
poiso

[mlir][LLVM] Add exact flag (#115327)

The implementation is mostly based on the one existing for the nsw and
nuw flags.

If the exact flag is present, the corresponding operation returns a
poison value when the result is not exact. (For a division, if rounding
happens; for a right shift, if a non-zero bit is shifted out.)

show more ...


# b613a540 08-Nov-2024 Matthias Springer <me@m-sp.org>

[mlir][IR][NFC] Cleanup insertion point API usage (#115415)

Use `setInsertionPointToStart` / `setInsertionPointToEnd` when possible.


Revision tags: llvmorg-19.1.3
# 922992a2 18-Oct-2024 Jay Foad <jay.foad@amd.com>

Fix typo "instrinsic" (#112899)


# 1dfb104e 16-Oct-2024 Sirui Mu <msrlancern@gmail.com>

[mlir][LLVMIR] Add operand bundle support for llvm.intr.assume (#112143)

This patch adds operand bundle support for `llvm.intr.assume`.

This patch actually contains two parts:

- `llvm.intr.assume`

[mlir][LLVMIR] Add operand bundle support for llvm.intr.assume (#112143)

This patch adds operand bundle support for `llvm.intr.assume`.

This patch actually contains two parts:

- `llvm.intr.assume` now accepts operand bundle related attributes and
operands. `llvm.intr.assume` does not take constraint on the operand
bundles, but obviously only a few set of operand bundles are meaningful.
I plan to add some of those (e.g. `aligned` and `separate_storage` are
what interest me but other people may be interested in other operand
bundles as well) in future patches.

- The definitions of `llvm.call`, `llvm.invoke`, and
`llvm.call_intrinsic` actually define `op_bundle_tags` as an operation
property. It turns out this approach would introduce some unnecessary
burden if applied equally to the intrinsic operations because properties
are not available through `Operation *` but we have to operate on
`Operation *` during the import/export of intrinsics, so this PR changes
it from a property to an array attribute.

This patch relands commit d8fadad07c952c4aea967aefb0900e4e43ad0555.

show more ...


# 484c0278 16-Oct-2024 Sirui Mu <msrlancern@gmail.com>

Revert "[mlir][LLVMIR] Add operand bundle support for llvm.intr.assume (#112143)"

This reverts commit d8fadad07c952c4aea967aefb0900e4e43ad0555.

The commit breaks the following CI builds:
- ppc64le-

Revert "[mlir][LLVMIR] Add operand bundle support for llvm.intr.assume (#112143)"

This reverts commit d8fadad07c952c4aea967aefb0900e4e43ad0555.

The commit breaks the following CI builds:
- ppc64le-mlir-rhel-clang: https://lab.llvm.org/buildbot/#/builders/129/builds/7685
- ppc64le-flang-rhel-clang: https://lab.llvm.org/buildbot/#/builders/157/builds/10338

show more ...


# d8fadad0 16-Oct-2024 Sirui Mu <msrlancern@gmail.com>

[mlir][LLVMIR] Add operand bundle support for llvm.intr.assume (#112143)

This patch adds operand bundle support for `llvm.intr.assume`.

This patch actually contains two parts:

- `llvm.intr.ass

[mlir][LLVMIR] Add operand bundle support for llvm.intr.assume (#112143)

This patch adds operand bundle support for `llvm.intr.assume`.

This patch actually contains two parts:

- `llvm.intr.assume` now accepts operand bundle related attributes and
operands. `llvm.intr.assume` does not take constraint on the operand
bundles, but obviously only a few set of operand bundles are meaningful.
I plan to add some of those (e.g. `aligned` and `separate_storage` are
what interest me but other people may be interested in other operand
bundles as well) in future patches.

- The definitions of `llvm.call`, `llvm.invoke`, and
`llvm.call_intrinsic` actually define `op_bundle_tags` as an operation
property. It turns out this approach would introduce some unnecessary
burden if applied equally to the intrinsic operations because properties
are not available through `Operation *` but we have to operate on
`Operation *` during the import/export of intrinsics, so this PR changes
it from a property to an array attribute.

show more ...


Revision tags: llvmorg-19.1.2
# 839344f0 14-Oct-2024 Tarun Prabhu <tarun@lanl.gov>

[clang][flang][mlir] Reapply "Support -frecord-command-line option (#102975)"

The underlying issue was caused by a file included in two different
places which resulted in duplicate definition error

[clang][flang][mlir] Reapply "Support -frecord-command-line option (#102975)"

The underlying issue was caused by a file included in two different
places which resulted in duplicate definition errors when linking
individual shared libraries. This was fixed in c3201ddaeac02a2c86a38b
[#109874].

show more ...


# cd12ffb6 13-Oct-2024 Abid Qadeer <haqadeer@amd.com>

[mlir][debug] Allow multiple DIGlobalVariableExpression on globals. (#111981)

Currently, we allow only one DIGlobalVariableExpressionAttr per global.
It is especially evident in import where we pic

[mlir][debug] Allow multiple DIGlobalVariableExpression on globals. (#111981)

Currently, we allow only one DIGlobalVariableExpressionAttr per global.
It is especially evident in import where we pick the first from the list
and ignore the rest. In contrast, LLVM allows multiple
DIGlobalVariableExpression to be attached to the global. They are needed
for correct working of things like DICommonBlock. This PR removes this
restriction in mlir. Changes are mostly mechanical. One thing on which I
went a bit back and forth was the representation inside GlobalOp. I
would be happy to change if there are better ways to do this.

---------

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

show more ...


# 54d3cf14 10-Oct-2024 Christian Ulmann <christianulmann@gmail.com>

[MLIR][LLVM] Fix nameless global import to support use before def case (#111797)

This commit fixes a bug in the import of nameless globals. Before this
change, the fake symbol names were only gener

[MLIR][LLVM] Fix nameless global import to support use before def case (#111797)

This commit fixes a bug in the import of nameless globals. Before this
change, the fake symbol names were only generated during the
transformation of the definition. This caused issues when the symbol was
used before it was defined.

show more ...


# 1d3bfbb0 10-Oct-2024 Christian Ulmann <christianulmann@gmail.com>

[MLIR][LLVM] Fix import of globals with references to other globals (#111703)

This commit addresses an issue with importing globals that reference
other globals. This case did not properly work due

[MLIR][LLVM] Fix import of globals with references to other globals (#111703)

This commit addresses an issue with importing globals that reference
other globals. This case did not properly work due to not considering
that `llvm::GlobalVariables` are derived from `llvm::Constant`.

show more ...


Revision tags: llvmorg-19.1.1
# 737c414e 20-Sep-2024 David Spickett <david.spickett@linaro.org>

Revert "[clang][flang][mlir] Support -frecord-command-line option (#102975)"

This reverts commit b3533a156da92262eb19429d8c12f53e87f5ccec.

It caused test failures in shared library builds:
https://

Revert "[clang][flang][mlir] Support -frecord-command-line option (#102975)"

This reverts commit b3533a156da92262eb19429d8c12f53e87f5ccec.

It caused test failures in shared library builds:
https://lab.llvm.org/buildbot/#/builders/80/builds/3854

show more ...


# b3533a15 20-Sep-2024 Tarun Prabhu <tarun@lanl.gov>

[clang][flang][mlir] Support -frecord-command-line option (#102975)

Add support for the -frecord-command-line option that will produce the
llvm.commandline metadata which will eventually be saved i

[clang][flang][mlir] Support -frecord-command-line option (#102975)

Add support for the -frecord-command-line option that will produce the
llvm.commandline metadata which will eventually be saved in the object
file. This behavior is also supported in clang. Some refactoring of the
code in flang to handle these command line options was carried out. The
corresponding -grecord-command-line option which saves the command line
in the debug information has not yet been enabled for flang.

show more ...


Revision tags: llvmorg-19.1.0
# 095b41c6 16-Sep-2024 JOE1994 <joseph942010@gmail.com>

[mlir] Reland 5a6e52d6ef96d2bcab6dc50bdb369662ff17d2a0 with update (NFC)

Excluded updates to mlir/lib/AsmParser/Parser.cpp ,
which caused LIT failure "FAIL: MLIR::completion.test" on multiple buildb

[mlir] Reland 5a6e52d6ef96d2bcab6dc50bdb369662ff17d2a0 with update (NFC)

Excluded updates to mlir/lib/AsmParser/Parser.cpp ,
which caused LIT failure "FAIL: MLIR::completion.test" on multiple buildbots.

show more ...


# 61ff1cb4 16-Sep-2024 JOE1994 <joseph942010@gmail.com>

Revert "[mlir] Nits on uses of llvm::raw_string_ostream (NFC)"

This reverts commit 5a6e52d6ef96d2bcab6dc50bdb369662ff17d2a0.

"FAIL: MLIR::completion.test" on multiple buildbots.


123456