History log of /llvm-project/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp (Results 1 – 25 of 96)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 8e702735 24-Jan-2025 Jeremy Morse <jeremy.morse@sony.com>

[NFC][DebugInfo] Use iterator moveBefore at many call-sites (#123583)

As part of the "RemoveDIs" project, BasicBlock::iterator now carries a
debug-info bit that's needed when getFirstNonPHI and sim

[NFC][DebugInfo] Use iterator moveBefore at many call-sites (#123583)

As part of the "RemoveDIs" project, BasicBlock::iterator now carries a
debug-info bit that's needed when getFirstNonPHI and similar feed into
instruction insertion positions. Call-sites where that's necessary were
updated a year ago; but to ensure some type safety however, we'd like to
have all calls to moveBefore use iterators.

This patch adds a (guaranteed dereferenceable) iterator-taking
moveBefore, and changes a bunch of call-sites where it's obviously safe
to change to use it by just calling getIterator() on an instruction
pointer. A follow-up patch will contain less-obviously-safe changes.

We'll eventually deprecate and remove the instruction-pointer
insertBefore, but not before adding concise documentation of what
considerations are needed (very few).

show more ...


Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# 94f9cbbe 02-Nov-2024 Kazu Hirata <kazu@google.com>

[Scalar] Remove unused includes (NFC) (#114645)

Identified with misc-include-cleaner.


Revision tags: llvmorg-19.1.3, llvmorg-19.1.2
# fa789dff 11-Oct-2024 Rahul Joshi <rjoshi@nvidia.com>

[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)

Rename the function to reflect its correct behavior and to be consistent
with `Module::getOrInsertFunction`. This is a

[NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (#111752)

Rename the function to reflect its correct behavior and to be consistent
with `Module::getOrInsertFunction`. This is also in preparation of
adding a new `Intrinsic::getDeclaration` that will have behavior similar
to `Module::getFunction` (i.e, just lookup, no creation).

show more ...


# fbd2a918 09-Oct-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Handle llvm.fake.use (#109567)


Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4
# 90a8e5a7 20-Aug-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Factor replacement loop into function [NFC] (#104430)


Revision tags: llvmorg-19.1.0-rc3
# 2ccbf92f 15-Aug-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Restore non-instruction user check

Fixes regression after 79658d65c3c7a075382b74d81e74714e2ea9bd2d.
We were missing test coverage for the nested constant expression
case.


# 79658d65 15-Aug-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Make getPredicatedAddrSpace less confusing (#104052)

This takes a pointer value and the user instruction. Name them as
such, and remove the null check which should be dead.


# 7a51dde4 08-Aug-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Improve handling of instructions with multiple pointer uses (#101922)

The use list iteration worked correctly for the load and store case. The atomic
instructions happen to have

InferAddressSpaces: Improve handling of instructions with multiple pointer uses (#101922)

The use list iteration worked correctly for the load and store case. The atomic
instructions happen to have the pointer value as the last visited operand, but we
rejected the instruction as simple after the first encountered use.

Ignore the use list for the recognized load/store/atomic instructions, and just
try to directly replace the known pointer use.

show more ...


# 2ef553c0 05-Aug-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Handle llvm.is.constant (#102010)


# 47fc4c37 05-Aug-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Handle masked load and store intrinsics (#102007)


# f01a6f5e 05-Aug-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Handle prefetch intrinsic (#101982)


Revision tags: llvmorg-19.1.0-rc2
# 35b4f837 04-Aug-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Simplify check of volatile allowed

Avoid redundant dyn_cast to instruction before chain of dyn_cast
to specific instructions.


# 3c483b88 04-Aug-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InferAddressSpaces: Fix mishandling stores of pointers to themselves (#101877)


Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init
# a355c2d0 03-Jul-2024 Shan Huang <52285902006@stu.ecnu.edu.cn>

[DebugInfo][InferAddressSpaces] Fix the missing debug location update for the new addrspacecast (#97038)

Fix #97006 .


# 9df71d76 28-Jun-2024 Nikita Popov <npopov@redhat.com>

[IR] Add getDataLayout() helpers to Function and GlobalValue (#96919)

Similar to https://github.com/llvm/llvm-project/pull/96902, this adds
`getDataLayout()` helpers to Function and GlobalValue, re

[IR] Add getDataLayout() helpers to Function and GlobalValue (#96919)

Similar to https://github.com/llvm/llvm-project/pull/96902, this adds
`getDataLayout()` helpers to Function and GlobalValue, replacing the
current `getParent()->getDataLayout()` pattern.

show more ...


Revision tags: llvmorg-18.1.8, 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
# 2fe81ede 04-Mar-2024 Jeremy Morse <jeremy.morse@sony.com>

[NFC][RemoveDIs] Insert instruction using iterators in Transforms/

As part of the RemoveDIs project we need LLVM to insert instructions using
iterators wherever possible, so that the iterators can c

[NFC][RemoveDIs] Insert instruction using iterators in Transforms/

As part of the RemoveDIs project we need LLVM to insert instructions using
iterators wherever possible, so that the iterators can carry a bit of
debug-info. This commit implements some of that by updating the contents of
llvm/lib/Transforms/Utils to always use iterator-versions of instruction
constructors.

There are two general flavours of update:
* Almost all call-sites just call getIterator on an instruction
* Several make use of an existing iterator (scenarios where the code is
actually significant for debug-info)
The underlying logic is that any call to getFirstInsertionPt or similar
APIs that identify the start of a block need to have that iterator passed
directly to the insertion function, without being converted to a bare
Instruction pointer along the way.

Noteworthy changes:
* FindInsertedValue now takes an optional iterator rather than an
instruction pointer, as we need to always insert with iterators,
* I've added a few iterator-taking versions of some value-tracking and
DomTree methods -- they just unwrap the iterator. These are purely
convenience methods to avoid extra syntax in some passes.
* A few calls to getNextNode become std::next instead (to keep in the
theme of using iterators for positions),
* SeparateConstOffsetFromGEP has it's insertion-position field changed.
Noteworthy because it's not a purely localised spelling change.

All this should be NFC.

show more ...


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4
# c831d83b 22-Feb-2024 Pierre van Houtryve <pierre.vanhoutryve@amd.com>

[InferAddrSpaces] Correctly replace identical operands of insts (#82610)

It's important for PHI nodes because if a PHI node has multiple edges
coming from the same block, we can have the same incom

[InferAddrSpaces] Correctly replace identical operands of insts (#82610)

It's important for PHI nodes because if a PHI node has multiple edges
coming from the same block, we can have the same incoming value multiple
times in the list of incoming values. All of those need to be consistent
(exact same Value*) otherwise verifier complains.

Fixes SWDEV-445797

show more ...


Revision tags: 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
# fe146e9b 13-Nov-2023 Wenju He <wenju.he@intel.com>

[InferAddressSpaces] Fix constant replace to avoid modifying other functions (#70611)

A constant value is unique in llvm context. InferAddressSpaces was
replacing its users in other functions as we

[InferAddressSpaces] Fix constant replace to avoid modifying other functions (#70611)

A constant value is unique in llvm context. InferAddressSpaces was
replacing its users in other functions as well. This leads to unexpected
behavior in our downstream use case after the pass.

InferAddressSpaces is a function passe, so it shall not modify functions
other than currently processed one.

Co-authored-by: Abhinav Gaba <abhinav.gaba@intel.com>

---------

Co-authored-by: Abhinav Gaba <abhinav.gaba@intel.com>

show more ...


# d199ff17 01-Nov-2023 Wenju He <wenju.he@intel.com>

[InferAddressSpaces] collect flat address expression from return value (#70610)

If function return value's type is pointer, we can try to collect flat
address expression from it.
This PR also fixe

[InferAddressSpaces] collect flat address expression from return value (#70610)

If function return value's type is pointer, we can try to collect flat
address expression from it.
This PR also fixes noop_ptrint_pair_ce2 in noop-ptrint-pair.ll in #70611

show more ...


Revision tags: llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0
# 04224d1a 07-Sep-2023 Harald van Dijk <harald@gigawatt.nl>

[InferAddressSpaces] Register pass. (#65639)

InferAddressSpaces failed to call its initialization function. It was
still called through initializeScalarOpts in llc and opt, but it was
skipped enti

[InferAddressSpaces] Register pass. (#65639)

InferAddressSpaces failed to call its initialization function. It was
still called through initializeScalarOpts in llc and opt, but it was
skipped entirely in clang. When the initialization function is not
called, this results in confusing behavior where the pass appears to
run, but not entirely as it should, e.g. the pass is excluded from
-print-before-all and -print-after-all.

show more ...


Revision tags: llvmorg-17.0.0-rc4
# e0c60bff 31-Aug-2023 Fraser Cormack <fraser@codeplay.com>

[InferAddressSpaces][NFC] Fix code formatting


Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# 89552f3a 16-Jul-2023 Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt>

[InferAddressSpaces] Use poison instead of undef as placeholder [NFC]
This placeholder is only used during the execution of the algorithm, and it's patched with a
concrete value at the end


# 06807957 14-Jul-2023 Nikita Popov <npopov@redhat.com>

[llvm] Remove uses of hasSameElemenTypeAs() (NFC)

Always returns true with opaque pointers.


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5
# 44096e69 17-May-2023 CaprYang <capryang@gmail.com>

[InferAddressSpaces] Handle vector of pointers type & Support intrinsic masked gather/scatter


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
# bbfb13a5 06-Mar-2023 Nikita Popov <npopov@redhat.com>

[ConstExpr] Remove select constant expression

This removes the select constant expression, as part of
https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
Uses of this expression

[ConstExpr] Remove select constant expression

This removes the select constant expression, as part of
https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
Uses of this expressions have already been removed in advance,
so this just removes related infrastructure and updates tests.

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

show more ...


1234