History log of /llvm-project/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp (Results 1 – 25 of 361)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 81d18ad8 27-Jan-2025 Jeremy Morse <jeremy.morse@sony.com>

[NFC][DebugInfo] Make some block-start-position methods return iterators (#124287)

As part of the "RemoveDIs" work to eliminate debug intrinsics, we're
replacing methods that use Instruction*'s as

[NFC][DebugInfo] Make some block-start-position methods return iterators (#124287)

As part of the "RemoveDIs" work to eliminate debug intrinsics, we're
replacing methods that use Instruction*'s as positions with iterators. A
number of these (such as getFirstNonPHIOrDbg) are sufficiently
infrequently used that we can just replace the pointer-returning version
with an iterator-returning version, hopefully without much/any
disruption.

Thus this patch has getFirstNonPHIOrDbg and
getFirstNonPHIOrDbgOrLifetime return an iterator, and updates all
call-sites. There are no concerns about the iterators returned being
converted to Instruction*'s and losing the debug-info bit: because the
methods skip debug intrinsics, the iterator head bit is always false
anyway.

show more ...


# bec4c7f5 23-Jan-2025 David Green <david.green@arm.com>

[InstCombine] Unpack scalable struct loads/stores. (#123986)

This teaches unpackLoadToAggregate and unpackStoreToAggregate to unpack
scalable structs to individual loads/stores with insertvalues /

[InstCombine] Unpack scalable struct loads/stores. (#123986)

This teaches unpackLoadToAggregate and unpackStoreToAggregate to unpack
scalable structs to individual loads/stores with insertvalues /
extractvalues. The gep used for the offsets uses an i8 ptradd as opposed
to a struct gep, as the geps for scalable structs are not supported and
we canonicalize to i8.

show more ...


# edd13602 16-Jan-2025 Florian Hahn <flo@fhahn.com>

[InstCombine] Preserve metadata from orig load in select fold. (#115605)

When replacing load with a select on the address with a select and 2
loads of the values, copy poison-generating metadata fr

[InstCombine] Preserve metadata from orig load in select fold. (#115605)

When replacing load with a select on the address with a select and 2
loads of the values, copy poison-generating metadata from the original
load to the newly created loads, which are placed at the same place as
the original loads. We cannot copy metadata that may trigger UB.

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

show more ...


# 1a56360c 15-Jan-2025 Alex MacLean <amaclean@nvidia.com>

[IR] Treat calls with byval ptrs as read-only (#122961)


Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2
# e34d614e 10-Oct-2024 Arthur Eubanks <aeubanks@google.com>

[Passes] Remove -enable-infer-alignment-pass flag (#111873)

This flag has been on for a while without any complaints.


Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3
# 4ac42afb 11-Aug-2024 Kazu Hirata <kazu@google.com>

[InstCombine] Use llvm::set_is_subset (NFC) (#102778)


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# f38baad3 16-Jul-2024 Shilei Tian <i@tianshilei.me>

[InstCombine] Fix a crash in `PointerReplacer` (#98987)

A crash could happen in `PointerReplacer::replace` when constructing a
new
select instruction and there is no replacement for one of its ope

[InstCombine] Fix a crash in `PointerReplacer` (#98987)

A crash could happen in `PointerReplacer::replace` when constructing a
new
select instruction and there is no replacement for one of its operand.
This can
happen when the operand is a load instruction that has been replaced
earlier
such that the operand itself is already the new value. In this case, it
is not
in the replacement map and `getReplacement` simply returns nullptr.

Fix SWDEV-472192.

show more ...


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7
# 434a8a08 04-Jun-2024 Nikita Popov <npopov@redhat.com>

[InstCombine] Preserve all gep nowrap flags in PointerReplacer


# 8cb19ebd 21-May-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InstCombine: Stop handling bitcast in PointerReplacer (#92937)

These should be irrelevant since opaque pointers.


Revision tags: llvmorg-18.1.6
# 847c83f7 15-May-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InstCombine: Process addrspacecast uses in PointerReplacer (#91953)

This was looking through an addrspacecast, and not finding a later
unfoldable cast to another address space. Fixes improperly del

InstCombine: Process addrspacecast uses in PointerReplacer (#91953)

This was looking through an addrspacecast, and not finding a later
unfoldable cast to another address space. Fixes improperly deleting
a required alloca + memcpy and introducing an illegal addrspacecast.

This also required fixing some worklist management issues with
addrspacecast, and assuming that only memcpy sources could need
replacement.

Regresses one test function, but this looks like it optimized
before by accident. It never saw the pointer use by the call
to readonly_callee, which should require insertion of a new cast.

Fixes #68120

show more ...


# 8823abea 10-May-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InstCombine: Simplify vector initialization


# c5b0da9d 13-May-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

InstCombine: Preserve inbounds in PointerReplacer (#91735)

This avoids spurious test changes in a future commit.


Revision tags: 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
# 28fb2b33 21-Feb-2024 Paul Walker <paul.walker@arm.com>

[LLVM][SelectionDAG] Reduce number of ComputeValueVTs variants. (#75614)

This is another step in the direction of fixing the `Fixed(0) !=
Scalable(0)` bugbear, although whilst weird I don't believe

[LLVM][SelectionDAG] Reduce number of ComputeValueVTs variants. (#75614)

This is another step in the direction of fixing the `Fixed(0) !=
Scalable(0)` bugbear, although whilst weird I don't believe it's causing
us any real issues.

show more ...


Revision tags: llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1
# 89dae798 24-Jan-2024 Nikita Popov <npopov@redhat.com>

[Loads] Use BatchAAResults for available value APIs (NFCI)

This allows caching AA queries both within and across the calls,
and enables us to use a custom AAQI configuration.


Revision tags: llvmorg-19-init
# 97efd8aa 11-Dec-2023 Nikita Popov <npopov@redhat.com>

[InstCombine] Preserve inalloca tag when transforming alloca

This is not meaningful in any practical sense, and just makes sure
we don't cause verifier failures.


# ae7bffd7 11-Dec-2023 Nikita Popov <npopov@redhat.com>

[InstCombine] Don't create unnecessary zero-index GEP (NFCI)

Note needed with opaque pointers.


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4
# 6e3e21d2 24-Oct-2023 Nikita Popov <npopov@redhat.com>

[InstCombine] Remove unnecessary removeBitcastsFromLoadStoreOnMinMax() fold (NFCI)

This optimizes a very specific pointer bitcast pattern, and as
such is no longer relevant with opaque pointers.


Revision tags: llvmorg-17.0.3
# 2d854dd3 11-Oct-2023 Fangrui Song <i@maskray.me>

Move global namespace cl::opt inside llvm:: or internalize them


Revision tags: llvmorg-17.0.2
# 515a8263 20-Sep-2023 Dhruv Chawla <44582521+dc03@users.noreply.github.com>

[NFC][InferAlignment] Swap extern declaration and definition of EnableInferAlignmentPass

This prevents a linker issue when only InstCombine is linked without
PassBuilder, like in the case of bugpoin

[NFC][InferAlignment] Swap extern declaration and definition of EnableInferAlignmentPass

This prevents a linker issue when only InstCombine is linked without
PassBuilder, like in the case of bugpoint.

show more ...


Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4
# 0104f37f 23-Aug-2023 Dhruv Chawla <44582521+dc03@users.noreply.github.com>

[InstCombine] Use a cl::opt to control calls to getOrEnforceKnownAlignment in LoadInst and StoreInst

This is in preparation for the InferAlignment pass which handles
inferring alignment for instruct

[InstCombine] Use a cl::opt to control calls to getOrEnforceKnownAlignment in LoadInst and StoreInst

This is in preparation for the InferAlignment pass which handles
inferring alignment for instructions separately. It is better to handle
this as a separate pass as inferring alignment is quite costly, and
InstCombine running multiple times in the pass pipeline makes it even
more so.

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

show more ...


Revision tags: llvmorg-17.0.0-rc3
# c7d65e44 11-Aug-2023 Paul Walker <paul.walker@arm.com>

[IR] Enable load/store/alloca for arrays of scalable vectors.

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


# d529943a 11-Sep-2023 Jeremy Morse <jeremy.morse@sony.com>

[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine

As per my proposal for how to eliminate debug intrinsics [0], for various
places in InstCombine prefer to insert using an instruct

[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine

As per my proposal for how to eliminate debug intrinsics [0], for various
places in InstCombine prefer to insert using an instruction iterator rather
than an instruction pointer. This is so that we can eventually pass more
information in the iterator class. These call-sites where I've changed the
spelling are those that necessary to build a stage2clang to produce an
identical binary in the coming no-debug-intrinsics mode.

[0] https://discourse.llvm.org/t/rfc-instruction-api-changes-needed-to-eliminate-debug-intrinsics-from-ir/68939

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

show more ...


# b5c2a19f 09-Aug-2023 Nikita Popov <npopov@redhat.com>

[InstCombine] Remove some typed pointer handling (NFC)

This bitcast is no longer needed.


Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1
# 30fff948 29-Jul-2023 Matt Arsenault <Matthew.Arsenault@amd.com>

InstCombine: Don't bother skipping over pointer bitcasts

These don't really happen with opaque pointers.


12345678910>>...15