History log of /llvm-project/llvm/lib/Transforms/Scalar/LoopFlatten.cpp (Results 1 – 25 of 74)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3
# 85c17e40 17-Oct-2024 Jay Foad <jay.foad@amd.com>

[LLVM] Make more use of IRBuilder::CreateIntrinsic. NFC. (#112706)

Convert many instances of:
Fn = Intrinsic::getOrInsertDeclaration(...);
CreateCall(Fn, ...)
to the equivalent CreateIntrinsi

[LLVM] Make more use of IRBuilder::CreateIntrinsic. NFC. (#112706)

Convert many instances of:
Fn = Intrinsic::getOrInsertDeclaration(...);
CreateCall(Fn, ...)
to the equivalent CreateIntrinsic call.

show more ...


Revision tags: 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 ...


Revision tags: 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, llvmorg-20-init
# e0f4d27a 04-Jul-2024 Shan Huang <52285902006@stu.ecnu.edu.cn>

[DebugInfo][LoopFlatten] Fix missing debug location update for new br instruction (#97085)

Fix #97084 .


# 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
# 4d1ecf19 15-May-2024 AtariDreams <gfunni234@gmail.com>

[Transforms] Preserve inbounds attribute of transformed GEPs when flattening loops (#86961)

When flattening the loop, if the GEP was inbound, it should stay
inbound, because the only thing that cha

[Transforms] Preserve inbounds attribute of transformed GEPs when flattening loops (#86961)

When flattening the loop, if the GEP was inbound, it should stay
inbound, because the only thing that changed is how the pointers are
calculated, not the elements being accessed.

Proof: https://alive2.llvm.org/ce/z/dApMpQ

show more ...


# 28767afd 10-May-2024 Florian Hahn <flo@fhahn.com>

[LAA] Support backward dependences with non-constant distance. (#91525)

Following up to 933f49248, also update the code reasoning about
backwards dependences to support non-constant distances.

U

[LAA] Support backward dependences with non-constant distance. (#91525)

Following up to 933f49248, also update the code reasoning about
backwards dependences to support non-constant distances.

Update the code to use the signed minimum distance instead of a constant
distance

This means e checked the lower bound of the dependence distance and the
distance may be larger at runtime (and safe for vectorization). Whether
to classify it as Unknown or Backwards depends on the vector width and
LAA was updated to take TTI to get the maximum vector register width.

If the minimum dependence distance is larger than the max vector width,
we consider it as backwards-vectorizable. Otherwise we classify them as
Unknown, so we re-try with runtime checks.

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

show more ...


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, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1
# a04d4a03 25-Jan-2024 John Brawn <john.brawn@arm.com>

[LoopFlatten] Use loop versioning when overflow can't be disproven (#78576)

Implement the TODO in loop flattening to version the loop when we can't
prove that the trip count calculation won't overf

[LoopFlatten] Use loop versioning when overflow can't be disproven (#78576)

Implement the TODO in loop flattening to version the loop when we can't
prove that the trip count calculation won't overflow.

show more ...


Revision tags: llvmorg-19-init
# ae978baa 10-Jan-2024 John Brawn <john.brawn@arm.com>

[LoopFlatten] Recognise gep+gep (#72515)

Now that InstCombine canonicalises add+gep to gep+gep, LoopFlatten needs
to recognise (gep (gep ptr (i*M)), j) as being something it can
optimise.


# dea16ebd 18-Dec-2023 Paul Walker <paul.walker@arm.com>

[LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (#75217)

The specialisation will not be valid when ConstantInt gains native
support for vector types.

This is

[LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (#75217)

The specialisation will not be valid when ConstantInt gains native
support for vector types.

This is largely a mechanical change but with extra attention paid to constant
folding, InstCombineVectorOps.cpp, LoopFlatten.cpp and Verifier.cpp to
remove the need to call `getIntegerType()`.

Co-authored-by: Nikita Popov <github@npopov.com>

show more ...


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3
# 1b3cc4e7 05-Oct-2023 Nikita Popov <npopov@redhat.com>

[ValueTracking] Use SimplifyQuery for the overflow APIs (NFC)

Accept a SimplifyQuery instead of an unpacked list of arguments.


Revision tags: 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, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3
# 09d879d0 25-Apr-2023 Philip Reames <preames@rivosinc.com>

[SCEV] Common code for computing trip count in a fixed type [NFC-ish]

This is a follow on to D147117 and D147355. In both cases, we were adding special cases to compute zext(BTC+1) instead of zext(B

[SCEV] Common code for computing trip count in a fixed type [NFC-ish]

This is a follow on to D147117 and D147355. In both cases, we were adding special cases to compute zext(BTC+1) instead of zext(BTC)+1 when the BTC+1 computation was known not to overflow.

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

show more ...


Revision tags: llvmorg-16.0.2
# a20f7efb 15-Apr-2023 Bjorn Pettersson <bjorn.a.pettersson@ericsson.com>

Remove several no longer needed includes. NFCI

Mostly removing includes of InitializePasses.h and Pass.h in
passes that no longer has support for the legacy PM.


Revision tags: llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3
# e7d3f43e 15-Feb-2023 Fangrui Song <i@maskray.me>

[LoopFlatten] Inline an external linkage function not in llvm::. NFC


# 48bfed77 15-Feb-2023 Fangrui Song <i@maskray.me>

[LoopFlatten] Remove legacy pass (unused in the pipeline)

Following recent changes to remove non-core legacy passes.


Revision tags: llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7
# b2b4d958 05-Jan-2023 Joshua Cao <cao.joshua@yahoo.com>

[NFC][LoopFlatten][LoopInterchange] Do not explicitly forget subloops

We don't need to explicitly forget subloops because forgetting parent
loops will automatically forget their subloops

Differenti

[NFC][LoopFlatten][LoopInterchange] Do not explicitly forget subloops

We don't need to explicitly forget subloops because forgetting parent
loops will automatically forget their subloops

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

show more ...


# b6942a28 08-Jan-2023 Benjamin Kramer <benny.kra@googlemail.com>

[NFC] Hide implementation details in anonymous namespaces


# 161bfa5f 06-Jan-2023 David Green <david.green@arm.com>

[LoopFlattening] Check for extra uses on Mul

Similar to D138404, we were not guarding against extra uses of the Mul.
In most cases other checks would catch the issue due to unsupported
instructions

[LoopFlattening] Check for extra uses on Mul

Similar to D138404, we were not guarding against extra uses of the Mul.
In most cases other checks would catch the issue due to unsupported
instructions in the outer loop, but certain non-canonical loop forms
could still get through.

Fixes #59339

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

show more ...


# 218e0c69 05-Dec-2022 Sjoerd Meijer <smeijer@nvidia.com>

[LoopFlatten] Add some LLVM_DEBUG messages. NFC.


Revision tags: llvmorg-15.0.6
# bba55813 26-Nov-2022 Kazu Hirata <kazu@google.com>

[Scalar] Use std::optional in LoopFlatten.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getv

[Scalar] Use std::optional in LoopFlatten.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


# 8e9e22f0 22-Nov-2022 David Green <david.green@arm.com>

[LoopFlatten] Fix IV increment use count

The add from the IV in the inner loop was always checking for 2 uses,
the phi and the compare. The compare could be based on the phi though,
leaving one vali

[LoopFlatten] Fix IV increment use count

The add from the IV in the inner loop was always checking for 2 uses,
the phi and the compare. The compare could be based on the phi though,
leaving one valid use of the compare. In the testcase we could be left
with the phi and a lcssa phi as the two users, invalidly allowing
flattening where we shouldn't.

Fixes 58441

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

show more ...


# 1f914944 22-Nov-2022 Kazu Hirata <kazu@google.com>

Don't use Optional::getPointer (NFC)

Since std::optional does not offer getPointer(), this patch replaces
X.getPointer() with &*X to make the migration from llvm::Optional to
std::optional easier.

Don't use Optional::getPointer (NFC)

Since std::optional does not offer getPointer(), this patch replaces
X.getPointer() with &*X to make the migration from llvm::Optional to
std::optional easier.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

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

show more ...


Revision tags: llvmorg-15.0.5
# 98eb9179 11-Nov-2022 luxufan <luxufan@iscas.ac.cn>

[LoopFlatten] Forget all block and loop dispositions after flatten

Method forgetLoop only forgets expression of phi or its users. SCEV
expressions except the above mentioned may still has loop dispo

[LoopFlatten] Forget all block and loop dispositions after flatten

Method forgetLoop only forgets expression of phi or its users. SCEV
expressions except the above mentioned may still has loop dispositions
that point to the destroyed loop, which might cause a crash.

Fixes: https://github.com/llvm/llvm-project/issues/58865

Reviewed By: nikic, fhahn

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

show more ...


Revision tags: llvmorg-15.0.4
# f7c42a27 18-Oct-2022 Sjoerd Meijer <sjoerd.meijer@gmail.com>

Revert "Recommit "[LoopFlatten] Enable it by default""

This reverts commit 5b9597f59a445523bd59b5251ab1c2865e74919f.

A miscompilation was reported:
https://github.com/llvm/llvm-project/issues/58441

Revert "Recommit "[LoopFlatten] Enable it by default""

This reverts commit 5b9597f59a445523bd59b5251ab1c2865e74919f.

A miscompilation was reported:
https://github.com/llvm/llvm-project/issues/58441

Reverting this while I look at that.

show more ...


Revision tags: llvmorg-15.0.3
# 5b9597f5 17-Oct-2022 Sjoerd Meijer <sjoerd.meijer@gmail.com>

Recommit "[LoopFlatten] Enable it by default"

The sanitizer bots turned green again after another change went in, i.e.
revert 26dd64ba9cfabe5474bb207f3b7099965f81fed7, so I don't think this
patch wa

Recommit "[LoopFlatten] Enable it by default"

The sanitizer bots turned green again after another change went in, i.e.
revert 26dd64ba9cfabe5474bb207f3b7099965f81fed7, so I don't think this
patch was causing the problems.

show more ...


123