Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
40a647fc |
| 15-Nov-2024 |
Yingwei Zheng <dtcxzyw2333@gmail.com> |
[IndVarSimplify] Drop samesign flags after narrowing compares (#116263)
Samesign flag cannot be preserved after narrowing the compare since the
position of the sign bit is changed.
Closes https:
[IndVarSimplify] Drop samesign flags after narrowing compares (#116263)
Samesign flag cannot be preserved after narrowing the compare since the
position of the sign bit is changed.
Closes https://github.com/llvm/llvm-project/issues/116249.
show more ...
|
#
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 |
|
#
6924fc03 |
| 16-Oct-2024 |
Rahul Joshi <rjoshi@nvidia.com> |
[LLVM] Add `Intrinsic::getDeclarationIfExists` (#112428)
Add `Intrinsic::getDeclarationIfExists` to lookup an existing
declaration of an intrinsic in a `Module`.
|
Revision tags: llvmorg-19.1.2 |
|
#
6c7a3f80 |
| 02-Oct-2024 |
Mehdi Amini <joker.eph@gmail.com> |
Fix LLVM_ENABLE_ABI_BREAKING_CHECKS macro check: use #if instead of #ifdef (#110938)
This macros is always defined: either 0 or 1. The correct pattern is to
use #if.
Re-apply #110185 with more f
Fix LLVM_ENABLE_ABI_BREAKING_CHECKS macro check: use #if instead of #ifdef (#110938)
This macros is always defined: either 0 or 1. The correct pattern is to
use #if.
Re-apply #110185 with more fixes for debug build with the ABI breaking
checks disabled.
show more ...
|
Revision tags: llvmorg-19.1.1 |
|
#
34e16b6b |
| 17-Sep-2024 |
Nikita Popov <npopov@redhat.com> |
[IndVars] Fix strict weak ordering violation (#108947)
The sort used the block name as a tie-breaker, which will not work for
unnamed blocks and can result in a strict weak ordering violation.
F
[IndVars] Fix strict weak ordering violation (#108947)
The sort used the block name as a tie-breaker, which will not work for
unnamed blocks and can result in a strict weak ordering violation.
Fix this by checking that all exiting blocks dominate the latch first,
which means that we have a total dominance order. This makes the code
structure here align with what optimizeLoopExits() does.
Fixes https://github.com/llvm/llvm-project/issues/108618.
show more ...
|
Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3 |
|
#
7990a7e5 |
| 13-Aug-2024 |
Nikita Popov <npopov@redhat.com> |
[IndVars] Use getSigned() in FP transform
This transform is working on signed integer, so this is the logically correct API.
Split off from https://github.com/llvm/llvm-project/pull/80309.
|
Revision tags: llvmorg-19.1.0-rc2 |
|
#
edf46f36 |
| 03-Aug-2024 |
Florian Hahn <flo@fhahn.com> |
[SCEV] Use const SCEV * explicitly in more places.
Use const SCEV * explicitly in more places to prepare for https://github.com/llvm/llvm-project/pull/91961. Split off as suggested.
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
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 ...
|
#
2d209d96 |
| 27-Jun-2024 |
Nikita Popov <npopov@redhat.com> |
[IR] Add getDataLayout() helpers to BasicBlock and Instruction (#96902)
This is a helper to avoid writing `getModule()->getDataLayout()`. I
regularly try to use this method only to remember it does
[IR] Add getDataLayout() helpers to BasicBlock and Instruction (#96902)
This is a helper to avoid writing `getModule()->getDataLayout()`. I
regularly try to use this method only to remember it doesn't exist...
`getModule()->getDataLayout()` is also a common (the most common?)
reason why code has to include the Module.h header.
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6 |
|
#
b452b349 |
| 09-May-2024 |
Shan Huang <52285902006@stu.ecnu.edu.cn> |
[DebugInfo][IndVarSimplify] Fix missing debug location updates (#91443)
Adds debug location updates for the newly created `phi`, `add`, `icmp` and `sitofp` instructions in `IndVarSimplify`.
Fixes
[DebugInfo][IndVarSimplify] Fix missing debug location updates (#91443)
Adds debug location updates for the newly created `phi`, `add`, `icmp` and `sitofp` instructions in `IndVarSimplify`.
Fixes #91436
show more ...
|
Revision tags: llvmorg-18.1.5, llvmorg-18.1.4 |
|
#
0f824693 |
| 12-Apr-2024 |
Florian Hahn <flo@fhahn.com> |
[Passes] Run SimpleLoopUnswitch after introducing invariant branches. (#81271)
IndVars may be able to replace a loop dependent condition with a loop
invariant one, but loop-unswitch runs before Ind
[Passes] Run SimpleLoopUnswitch after introducing invariant branches. (#81271)
IndVars may be able to replace a loop dependent condition with a loop
invariant one, but loop-unswitch runs before IndVars, so the invariant
check remains in the loop.
For an example, consider a read-only loop with a bounds check:
https://godbolt.org/z/8cdj4qhbG
This patch uses a approach similar to the way extra cleanup passes are
run on demand after vectorization (added in acea6e9cfa4c4a0e8678c7).
It introduces a new ShouldRunExtraSimpleLoopUnswitch analysis marker,
which IndVars can use to indicate that extra unswitching is beneficial.
ExtraSimpleLoopUnswitchPassManager uses this analysis to determine
whether to run its passes on a loop.
Compile-time impact (geomean) ranges from +0.0% to 0.02%
https://llvm-compile-time-tracker.com/compare.php?from=138c0beb109ffe47f75a0fe8c4dc2cdabe8a6532&to=19e6e99eeb280d426907ea73a21b139ba7225627&stat=instructions%3Au
Compile-time impact (geomean) of unconditionally running
SimpleLoopUnswitch ranges from +0.05% - +0.16%
https://llvm-compile-time-tracker.com/compare.php?from=138c0beb109ffe47f75a0fe8c4dc2cdabe8a6532&to=2930dfd5accdce2e6f8d5146ae4d626add2065a2&stat=instructions:u
Unconditionally running SimpleLoopUnswitch seems to indicate that there
are multiple other scenarios where we fail to run unswitching when
opportunities remain.
Fixes https://github.com/llvm/llvm-project/issues/85551.
PR: https://github.com/llvm/llvm-project/pull/81271
show more ...
|
Revision tags: 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, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2 |
|
#
7078993f |
| 21-Sep-2023 |
Nikita Popov <npopov@redhat.com> |
[IndVars] Check expansion safety during LFTR
Check isSafeToExpand() before expanding the exit count. Otherwise we may incorrectly speculate a udiv.
Fixes https://github.com/llvm/llvm-project/issues
[IndVars] Check expansion safety during LFTR
Check isSafeToExpand() before expanding the exit count. Otherwise we may incorrectly speculate a udiv.
Fixes https://github.com/llvm/llvm-project/issues/66986.
show more ...
|
Revision tags: 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, 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.
|
#
7b014a07 |
| 16-Apr-2023 |
Kazu Hirata <kazu@google.com> |
[Scalar] Use range-based for loops (NFC)
|
Revision tags: llvmorg-16.0.1 |
|
#
0766c1bd |
| 22-Mar-2023 |
Philip Reames <preames@rivosinc.com> |
[LFTR] Simplify integer case for genLoopLimit [nfc-ish]
The integer case in genLoopLimit reduces down to a special case for narrowing the bitwidth of the limit, and then performing the same expansio
[LFTR] Simplify integer case for genLoopLimit [nfc-ish]
The integer case in genLoopLimit reduces down to a special case for narrowing the bitwidth of the limit, and then performing the same expansion we would for a pointer IV.
Differential Revision: https://reviews.llvm.org/D146638
show more ...
|
#
06006f43 |
| 22-Mar-2023 |
Philip Reames <preames@rivosinc.com> |
[LFTR] Minor style cleanup [nfc]
|
#
206dc545 |
| 22-Mar-2023 |
Philip Reames <preames@rivosinc.com> |
[LFTR] Use evaluateAtIteration in genLoopLimit [nfc]
Note that the comments being removed appear to be very out of sync with the actual code in question.
Differential Revision: https://reviews.llvm
[LFTR] Use evaluateAtIteration in genLoopLimit [nfc]
Note that the comments being removed appear to be very out of sync with the actual code in question.
Differential Revision: https://reviews.llvm.org/D146468
show more ...
|
#
a124b4c7 |
| 22-Mar-2023 |
Philip Reames <preames@rivosinc.com> |
[LFTR] Simplify another case under assumption exit counts are integers [nfc]
This invariant was introduced in 8f3d16905d75b07a933d01dc29677fe5867c1b3e.
|
#
24caf019 |
| 21-Mar-2023 |
Craig Topper <craig.topper@sifive.com> |
[IndVarSimplify] Remove duplicate call to getSCEV. NFC
We already did this same call on the line before.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D146444
|
#
042783f5 |
| 21-Mar-2023 |
Philip Reames <preames@rivosinc.com> |
[LFTR] Assert and simplify under assumption exit counts are integers [nfc]
This invariant was introduced in 8f3d16905d75b07a933d01dc29677fe5867c1b3e.
Differential Revision: https://reviews.llvm.org
[LFTR] Assert and simplify under assumption exit counts are integers [nfc]
This invariant was introduced in 8f3d16905d75b07a933d01dc29677fe5867c1b3e.
Differential Revision: https://reviews.llvm.org/D146470
show more ...
|
#
54539fa8 |
| 20-Mar-2023 |
Philip Reames <preames@rivosinc.com> |
[LSR/LFTR] Move two utilities to common code for reuse [nfc]
We're working on a transform in LSR which is essentiall an inverse of LFTR (in certain sub-cases). Move utilties so that they can be reu
[LSR/LFTR] Move two utilities to common code for reuse [nfc]
We're working on a transform in LSR which is essentiall an inverse of LFTR (in certain sub-cases). Move utilties so that they can be reused.
show more ...
|
Revision tags: llvmorg-16.0.0 |
|
#
c113d0b7 |
| 14-Mar-2023 |
Max Kazantsev <mkazantsev@azul.com> |
[NFC] Drop NDEBUG around MSSA verification
Proposed on review of https://reviews.llvm.org/D145894.
|
#
47021bda |
| 14-Mar-2023 |
Max Kazantsev <mkazantsev@azul.com> |
[IndVars] Option verify-indvars is broken (and always has been), delete it
This option is switched off by default, and it seems that it has never worked correctly. What it basically does is: it reme
[IndVars] Option verify-indvars is broken (and always has been), delete it
This option is switched off by default, and it seems that it has never worked correctly. What it basically does is: it remembers current BECount SCEV, and after all transforms tries to validate some facts for it. However, between these two points this SCEV may become invalid (e.g. because some SCEVUnknown it references may be deleted as dead code). So basically it may work with broken pointers.
Besides, its implementation does strange things (e.g. forgetLoop) which are invasive and may affect behavior in other parts of the system (specifically verification), concealing some other problems. Another issue is that it may use SCEVCouldNotCompute object without checking this.
The option is not used in any unit tests, and if switched on by default, the following tests fail: ``` ******************** Failed Tests (14): LLVM :: Transforms/IndVarSimplify/2005-06-15-InstMoveCrash.ll LLVM :: Transforms/IndVarSimplify/2007-06-06-DeleteDanglesPtr.ll LLVM :: Transforms/IndVarSimplify/2008-10-03-CouldNotCompute.ll LLVM :: Transforms/IndVarSimplify/2009-05-24-useafterfree.ll LLVM :: Transforms/IndVarSimplify/2011-10-27-lftrnull.ll LLVM :: Transforms/IndVarSimplify/ARM/code-size.ll LLVM :: Transforms/IndVarSimplify/X86/deterministic-scev-verify.ll LLVM :: Transforms/IndVarSimplify/X86/pr57187.ll LLVM :: Transforms/IndVarSimplify/X86/verify-scev.ll LLVM :: Transforms/IndVarSimplify/bbi-63564.ll LLVM :: Transforms/IndVarSimplify/invalidate-modified-lcssa-phi.ll LLVM :: Transforms/IndVarSimplify/loop-predication.ll LLVM :: Transforms/IndVarSimplify/post-inc-range.ll LLVM :: Transforms/IndVarSimplify/turn-to-invariant.ll
******************** Unexpectedly Passed Tests (1): LLVM :: Transforms/IndVarSimplify/pr55689.ll ```
None of these looks like real problems found by verification, these are bugs in the verifying code itself (such as use of deleted SCEVs and SCEVCouldNotCompute's).
I think it all gives enough justification for its removal.
https://github.com/llvm/llvm-project/issues/61302
Differential Revision: https://reviews.llvm.org/D145894 Reviewed By: nikic
show more ...
|
Revision tags: llvmorg-16.0.0-rc4 |
|
#
7c3c9814 |
| 08-Mar-2023 |
Arthur Eubanks <aeubanks@google.com> |
[Passes] Remove some legacy passes
DFAJumpThreading JumpThreading LibCallsShrink LoopVectorize SLPVectorizer DeadStoreElimination AggressiveDCE CorrelatedValuePropagation IndVarSimplify
These are p
[Passes] Remove some legacy passes
DFAJumpThreading JumpThreading LibCallsShrink LoopVectorize SLPVectorizer DeadStoreElimination AggressiveDCE CorrelatedValuePropagation IndVarSimplify
These are part of the optimization pipeline, of which the legacy version is deprecated and being removed.
show more ...
|