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 |
|
#
f1632d25 |
| 13-Jan-2025 |
Ramkumar Ramachandra <ramkumar.ramachandra@codasip.com> |
IR: introduce ICmpInst::isImpliedByMatchingCmp (#122597)
Create an abstraction over isImplied{True,False}ByMatchingCmp to
faithfully communicate the result of both functions, cleaning up code in
c
IR: introduce ICmpInst::isImpliedByMatchingCmp (#122597)
Create an abstraction over isImplied{True,False}ByMatchingCmp to
faithfully communicate the result of both functions, cleaning up code in
callsites. While at it, fix a bug in the implied-false version of the
function, which was inadvertedenly dropping samesign information.
show more ...
|
#
f38c40bf |
| 11-Jan-2025 |
Ramkumar Ramachandra <ramkumar.ramachandra@codasip.com> |
VT: teach isImpliedCondMatchingOperands about samesign (#122474)
Move isImplied{True,False}ByMatchingCmp from CmpInst to ICmpInst, so
that it can operate on CmpPredicate instead of CmpInst::Predica
VT: teach isImpliedCondMatchingOperands about samesign (#122474)
Move isImplied{True,False}ByMatchingCmp from CmpInst to ICmpInst, so
that it can operate on CmpPredicate instead of CmpInst::Predicate, and
teach it about samesign. There are two callers of this function, and we
choose to migrate the one in ValueTracking, namely
isImpliedCondMatchingOperands to CmpPredicate, hence teaching it about
samesign, with visible test impact.
show more ...
|
Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
984bca9d |
| 08-Nov-2024 |
Yingwei Zheng <dtcxzyw2333@gmail.com> |
[GVN][NewGVN] Take call attributes into account in expressions (#114545)
Drop `canBeReplacedBy` and take call attributes into account in
expressions.
Address comment
https://github.com/llvm/llvm-
[GVN][NewGVN] Take call attributes into account in expressions (#114545)
Drop `canBeReplacedBy` and take call attributes into account in
expressions.
Address comment
https://github.com/llvm/llvm-project/pull/114011#pullrequestreview-2409772313.
show more ...
|
#
f16bff12 |
| 01-Nov-2024 |
Yingwei Zheng <dtcxzyw2333@gmail.com> |
[GVN][NewGVN][Local] Handle attributes for function calls after CSE (#114011)
This patch intersects attributes of two calls to avoid introducing UB.
It also skips incompatible call pairs in GVN/New
[GVN][NewGVN][Local] Handle attributes for function calls after CSE (#114011)
This patch intersects attributes of two calls to avoid introducing UB.
It also skips incompatible call pairs in GVN/NewGVN. However, I cannot
provide negative tests for these changes.
Fixes https://github.com/llvm/llvm-project/issues/113997.
show more ...
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3 |
|
#
829992cf |
| 14-Aug-2024 |
ManuelJBrito <59119670+ManuelJBrito@users.noreply.github.com> |
[NewGVN] Prevent cyclic dependencies by ensuring Leader has min RPO number (#82110)
Cyclic dependencies in NewGVN can result in miscompilation and
termination issues.
This patch ensures that the
[NewGVN] Prevent cyclic dependencies by ensuring Leader has min RPO number (#82110)
Cyclic dependencies in NewGVN can result in miscompilation and
termination issues.
This patch ensures that the Class Leader is always the member with the
lowest RPO number. This ensures that the Class Leader is processed
before all other members, making the cyclic dependence impossible.
This fixes #35683.
Regressions:
- 'simp-to-self.ll' regresses due to a known limitation in the way
NewGVN and InstSimplify interact. With the new leader, InstSimplify does
not know that %conv is 1 and fails to simplify.
show more ...
|
Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
5b0dba13 |
| 12-Jul-2024 |
ManuelJBrito <59119670+ManuelJBrito@users.noreply.github.com> |
[NewGVN] Fix caching for OpIsSafeForPhiOfOps (#98340)
The caching mechanism for 'OpIsSafeForPhiOfOps' is unsound. An operand
is deemed unsafe for PhiOfOps if it depends on a phi that resides in the
[NewGVN] Fix caching for OpIsSafeForPhiOfOps (#98340)
The caching mechanism for 'OpIsSafeForPhiOfOps' is unsound. An operand
is deemed unsafe for PhiOfOps if it depends on a phi that resides in the
same block as the Phi block, i.e., where we are performing the PhiOfOps.
This is to avoid having to materialize the translated subexpressions. To
avoid redundant code walking, a cache is used to store these results.
Note, however, that since the safety is specific to the Phi block, we
cannot, in general, use the cached results for other blocks.
This patch addresses this by having a cache per block instead of a
single one for the entire function. closes #63335
show more ...
|
#
37d3f44a |
| 12-Jul-2024 |
Kazu Hirata <kazu@google.com> |
[Transforms] Use range-based for loops (NFC) (#98465)
|
#
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 |
|
#
f98be870 |
| 04-Jun-2024 |
Nikita Popov <npopov@redhat.com> |
[InstSimplify] Accept GEPNoWrapFlags instead of only InBounds flag
This preserves the flags if a constexpr GEP is created (at least as long as they don't get dropped later -- the test cases uses a c
[InstSimplify] Accept GEPNoWrapFlags instead of only InBounds flag
This preserves the flags if a constexpr GEP is created (at least as long as they don't get dropped later -- the test cases uses a constexpr index to avoid that).
show more ...
|
#
d46e3734 |
| 28-May-2024 |
Ralender <Tyker1@outlook.com> |
[DebugCounter] Add support for non-continous ranges. (#89470)
|
Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4 |
|
#
cf7d36fe |
| 08-Apr-2024 |
Zentrik <Zentrik@users.noreply.github.com> |
[NFC] Fix misspellings of effects (#87795)
|
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 |
|
#
8e353fb6 |
| 26-Sep-2023 |
Nikita Popov <npopov@redhat.com> |
[NewGVN] Patch replacement instruction even for removed instructions
When removing an instruction, we still need to merge its IR flags into the leader, because there may have been a transitive use.
[NewGVN] Patch replacement instruction even for removed instructions
When removing an instruction, we still need to merge its IR flags into the leader, because there may have been a transitive use.
Fixes https://github.com/llvm/llvm-project/issues/53218.
show more ...
|
Revision tags: llvmorg-17.0.1 |
|
#
135e5216 |
| 18-Sep-2023 |
Konstantina Mitropoulou <44334539+kmitropoulou@users.noreply.github.com> |
[NewGVN] Set parent to the temporal instructions that are generated during phi-of-ops optimization (#66314)
- Test for future commit in NewGVN
- [NewGVN] Set parent to the temporal instructions tha
[NewGVN] Set parent to the temporal instructions that are generated during phi-of-ops optimization (#66314)
- Test for future commit in NewGVN
- [NewGVN] Set parent to the temporal instructions that are generated
during phi-of-ops optimization
show more ...
|
Revision tags: llvmorg-17.0.0 |
|
#
798f2465 |
| 11-Sep-2023 |
Konstantina Mitropoulou <Konstantina.Mitropoulou@amd.com> |
[NewGVN] Decrement UseCount only if SSA copy has one use
Committing on behalf of @vladimirradosavljevic (Vladimir Radosavljevic)
Differential Revision : https: // reviews.llvm.org/D157267
|
Revision tags: llvmorg-17.0.0-rc4 |
|
#
111fcb0d |
| 02-Sep-2023 |
Fangrui Song <i@maskray.me> |
[llvm] Fix duplicate word typos. NFC
Those fixes were taken from https://reviews.llvm.org/D137338
|
#
a1f5ea5b |
| 28-Aug-2023 |
ManuelJBrito <manuel.brito@tecnico.ulisboa.pt> |
Revert "[NewGVN][PHIOFOPS] Relax conditions when checking safety of memory accesses"
NewGVN isn't enabled by default so some test failures were being missed. Reverting to do more testing offline.
T
Revert "[NewGVN][PHIOFOPS] Relax conditions when checking safety of memory accesses"
NewGVN isn't enabled by default so some test failures were being missed. Reverting to do more testing offline.
This reverts commit c59bc230e738036050f4c9b1ebde88699eec74bf.
show more ...
|
Revision tags: llvmorg-17.0.0-rc3 |
|
#
d85993d2 |
| 19-Aug-2023 |
Kazu Hirata <kazu@google.com> |
[llvm] Remove redundant control flow statements (NFC)
|
Revision tags: llvmorg-17.0.0-rc2 |
|
#
b80ff2fe |
| 04-Aug-2023 |
ManuelJBrito <manuel.brito@tecnico.ulisboa.pt> |
[NewGVN] Only perform symbolic evaluation on instructions (NFC)
This patch restricts the argument of performSymbolicEvaluation to an Instruction and simplifies the code accordingly.
Differential Re
[NewGVN] Only perform symbolic evaluation on instructions (NFC)
This patch restricts the argument of performSymbolicEvaluation to an Instruction and simplifies the code accordingly.
Differential Revision: https://reviews.llvm.org/D156994
show more ...
|
#
c59bc230 |
| 01-Aug-2023 |
ManuelJBrito <manuel.brito@tecnico.ulisboa.pt> |
[NewGVN][PHIOFOPS] Relax conditions when checking safety of memory accesses
Currently, we consider any instruction that might read from memory to be unsafe for phi-of-ops. This patch refines that by
[NewGVN][PHIOFOPS] Relax conditions when checking safety of memory accesses
Currently, we consider any instruction that might read from memory to be unsafe for phi-of-ops. This patch refines that by walking the clobbering memDefs until we either hit a block that strictly dominates the phi block (safe) or we hit a clobbering memPhi (unsafe).
Differential Revision: https://reviews.llvm.org/D156055
show more ...
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
29b5666f |
| 17-Jul-2023 |
ManuelJBrito <manuel.brito@tecnico.ulisboa.pt> |
[NewGVN] Abort PHIOfOps if singleton PHI is found
Currently we just bypass singleton phis, however we know that in order to create the phi of ops all phis must be in the same block. Therefore if one
[NewGVN] Abort PHIOfOps if singleton PHI is found
Currently we just bypass singleton phis, however we know that in order to create the phi of ops all phis must be in the same block. Therefore if one phi is a singleton then the rest are as well.
Differential Revision: https://reviews.llvm.org/D155478
show more ...
|
#
ace9b6bb |
| 14-Jul-2023 |
ManuelJBrito <manuel.brito@tecnico.ulisboa.pt> |
[NewGVN] Canonicalize expressions for commutative intrinsics
Ensure that commutative intrinsics that only differ by a permutation of their operands get the same value number by sorting the operand v
[NewGVN] Canonicalize expressions for commutative intrinsics
Ensure that commutative intrinsics that only differ by a permutation of their operands get the same value number by sorting the operand value numbers.
Fixes https://github.com/llvm/llvm-project/issues/46753
Differential Revision: https://reviews.llvm.org/D155309
show more ...
|
#
d22a236a |
| 24-Jun-2023 |
Youngsuk Kim <youngsuk.kim@hpe.com> |
[llvm] Replace use of Type::getPointerTo() (NFC)
Partial progress towards replacing in-tree uses of `Type::getPointerTo()`.
If `getPointerTo()` is used solely to support an unnecessary bitcast, rem
[llvm] Replace use of Type::getPointerTo() (NFC)
Partial progress towards replacing in-tree uses of `Type::getPointerTo()`.
If `getPointerTo()` is used solely to support an unnecessary bitcast, remove the bitcast.
Reviewed By: barannikov88, nikic
Differential Revision: https://reviews.llvm.org/D153307
show more ...
|
Revision tags: llvmorg-16.0.6 |
|
#
c0ad1b45 |
| 09-Jun-2023 |
Jay Foad <jay.foad@amd.com> |
[NewGVN] Fold equivalent freeze instructions
Differential Revision: https://reviews.llvm.org/D152529
|