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 |
|
#
5d7f84ee |
| 04-Aug-2023 |
Matthias Braun <matze@braunis.de> |
LoopRotate: Add code to update branch weights
This adds code to the loop rotation transformation to ensure that the computed block execution counts for the loop bodies are the same before and after
LoopRotate: Add code to update branch weights
This adds code to the loop rotation transformation to ensure that the computed block execution counts for the loop bodies are the same before and after the transformation. This isn't always true in practice, but I believe this is because of numeric inaccuracies in the BlockFrequency computation.
The invariants this is modeled on and heuristic choice of 0-trip loop amount is explained in a lenghty comment in the new `updateBranchWeights()` function.
Differential Revision: https://reviews.llvm.org/D157462
show more ...
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
3e39cfe5 |
| 16-Jun-2023 |
Arthur Eubanks <aeubanks@google.com> |
Revert "Revert "InstSimplify: Require instruction be parented""
This reverts commit 0c03f48480f69b854f86d31235425b5cb71ac921.
Going to fix forward size regression instead due to more dependent patc
Revert "Revert "InstSimplify: Require instruction be parented""
This reverts commit 0c03f48480f69b854f86d31235425b5cb71ac921.
Going to fix forward size regression instead due to more dependent patches needing to be reverted otherwise.
show more ...
|
#
0c03f484 |
| 16-Jun-2023 |
Arthur Eubanks <aeubanks@google.com> |
Revert "InstSimplify: Require instruction be parented"
This reverts commit 1536e299e63d7788f38117b0212ca50eb76d7a3b.
Causes large binary size regressions, see comments on https://reviews.llvm.org/r
Revert "InstSimplify: Require instruction be parented"
This reverts commit 1536e299e63d7788f38117b0212ca50eb76d7a3b.
Causes large binary size regressions, see comments on https://reviews.llvm.org/rG1536e299e63d7788f38117b0212ca50eb76d7a3b.
show more ...
|
#
d6b4f678 |
| 16-Jun-2023 |
Alan Zhao <ayzhao@google.com> |
Revert "Revert "InstSimplify: Require instruction be parented""
This reverts commit 00264eac4d0938ae8a0826da38e4777be269124c.
Reason: caused a bunch of bots to break
|
#
00264eac |
| 16-Jun-2023 |
Alan Zhao <ayzhao@google.com> |
Revert "InstSimplify: Require instruction be parented"
This reverts commit 1536e299e63d7788f38117b0212ca50eb76d7a3b.
Reason: causes a regression in the inliner (see https://crbug.com/1454531 and ht
Revert "InstSimplify: Require instruction be parented"
This reverts commit 1536e299e63d7788f38117b0212ca50eb76d7a3b.
Reason: causes a regression in the inliner (see https://crbug.com/1454531 and https://reviews.llvm.org/rG1536e299e63d7788f38117b0212ca50eb76d7a3b#1217141)
show more ...
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5 |
|
#
1536e299 |
| 23-May-2023 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
InstSimplify: Require instruction be parented
Unlike every other analysis and transform, simplifyInstruction permitted operating on instructions which are not inserted into a function. This created
InstSimplify: Require instruction be parented
Unlike every other analysis and transform, simplifyInstruction permitted operating on instructions which are not inserted into a function. This created an edge case no other code needs to really worry about, and limited transforms in cases that can make use of the context function. Only the inliner and a handful of other utilities were making use of this, so just fix up these edge cases. Results in some IR ordering differences since cloned blocks are inserted eagerly now. Plus some additional simplifications trigger (e.g. some add 0s now folded out that previously didn't).
show more ...
|
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, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
d459be45 |
| 15-Dec-2022 |
Florian Hahn <flo@fhahn.com> |
[LoopRotate] Clear block and loop dispo cache when merging blocks.
Merging blocks in LoopRotate may remove blocks reference in the block disposition cache. Clear the cache.
Fixes #59534.
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3 |
|
#
be611ef7 |
| 11-Oct-2022 |
Florian Hahn <flo@fhahn.com> |
[LoopRotation] Also drop block dispositions.
LoopRotation may also fold basic blocks, so cached block dispositions also need to be dropped.
Fixes #58291.
|
Revision tags: working, llvmorg-15.0.2, llvmorg-15.0.1 |
|
#
92e9bddc |
| 19-Sep-2022 |
Max Kazantsev <mkazantsev@azul.com> |
[LoopRotate] Drop loop dispositions when rotating loops. PR56260
This is required because if there is a pure loop-invariant instruction, Loop Rotation may decide to not clone it and just hoist it in
[LoopRotate] Drop loop dispositions when rotating loops. PR56260
This is required because if there is a pure loop-invariant instruction, Loop Rotation may decide to not clone it and just hoist it instead. If SCEV has previously cached that it was loop-variant (not being smart enough to prove invariance), we may end up with inconsistent cache state (which may later trigger false-negative assertion failures checking that something was invariant).
This is a conservative fix that unconditionally drops the dispositions. We could only drop it if the hoisting has actually happened, but it should take some time understanding whether it's safe with all other things this function does.
Differential Revision: https://reviews.llvm.org/D134167 Reviewed By: fhahn
show more ...
|
Revision tags: llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
#
9c710ebb |
| 17-Aug-2022 |
Daniil Fukalov <1671137+dfukalov@users.noreply.github.com> |
[TTI] NFC: Reduce InstructionCost::getValue() usage...
in order to propagate `InstructionCost` value upper.
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D103406
|
Revision tags: llvmorg-15.0.0-rc2 |
|
#
de9d80c1 |
| 08-Aug-2022 |
Fangrui Song <i@maskray.me> |
[llvm] LLVM_FALLTHROUGH => [[fallthrough]]. NFC
With C++17 there is no Clang pedantic warning or MSVC C5051.
|
Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init |
|
#
11079e88 |
| 15-Jul-2022 |
Nikita Popov <npopov@redhat.com> |
[IR] Don't treat callbr as indirect terminator
Callbr is no longer an indirect terminator in the sense that is relevant here (that it's successors cannot be updated). The primary effect of this chan
[IR] Don't treat callbr as indirect terminator
Callbr is no longer an indirect terminator in the sense that is relevant here (that it's successors cannot be updated). The primary effect of this change is that callbr no longer prevents formation of loop simplify form.
I decided to drop the isIndirectTerminator() method entirely and replace it with isa<IndirectBrInst>() checks. I assume this method was added to abstract over indirectbr and callbr, but it never really caught on, and there is nothing left to abstract anymore at this point.
Differential Revision: https://reviews.llvm.org/D129849
show more ...
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5 |
|
#
f85c5079 |
| 09-Jun-2022 |
Philip Reames <preames@rivosinc.com> |
Pipe potentially invalid InstructionCost through CodeMetrics
Per the documentation in Support/InstructionCost.h, the purpose of an invalid cost is so that clients can change behavior on impossible t
Pipe potentially invalid InstructionCost through CodeMetrics
Per the documentation in Support/InstructionCost.h, the purpose of an invalid cost is so that clients can change behavior on impossible to cost inputs. CodeMetrics was instead asserting that invalid costs never occurred.
On a target with an incomplete cost model - e.g. RISCV - this means that transformations would crash on (falsely) invalid constructs - e.g. scalable vectors. While we certainly should improve the cost model - and I plan to do so in the near future - we also shouldn't be crashing. This violates the explicitly stated purpose of an invalid InstructionCost.
I updated all of the "easy" consumers where bailouts were locally obvious. I plan to follow up with loop unroll in a following change.
Differential Revision: https://reviews.llvm.org/D127131
show more ...
|
#
b8c2781f |
| 09-Jun-2022 |
Simon Moll <moll@cs.uni-saarland.de> |
[NFC] format InstructionSimplify & lowerCaseFunctionNames
Clang-format InstructionSimplify and convert all "FunctionName"s to "functionName". This patch does touch a lot of files but gets done with
[NFC] format InstructionSimplify & lowerCaseFunctionNames
Clang-format InstructionSimplify and convert all "FunctionName"s to "functionName". This patch does touch a lot of files but gets done with the cleanup of InstructionSimplify in one commit.
This is the alternative to the less invasive clang-format only patch: D126783
Reviewed By: spatel, rengolin
Differential Revision: https://reviews.llvm.org/D126889
show more ...
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
#
a494ae43 |
| 01-Mar-2022 |
serge-sans-paille <sguelton@redhat.com> |
Cleanup includes: TransformsUtils
Estimation on the impact on preprocessor output: before: 1065307662 after: 1064800684
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-
Cleanup includes: TransformsUtils
Estimation on the impact on preprocessor output: before: 1065307662 after: 1064800684
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120741
show more ...
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1 |
|
#
0d182d9d |
| 08-Nov-2021 |
Kazu Hirata <kazu@google.com> |
[Transforms] Use make_early_inc_range (NFC)
|
#
843d1eda |
| 07-Nov-2021 |
Kazu Hirata <kazu@google.com> |
[llvm] Use llvm::reverse (NFC)
|
#
7f93bb4a |
| 06-Oct-2021 |
Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> |
[LoopRotate] Forget SCEV values in RewriteUsesOfClonedInstructions
This patch fixes problems reported in PR51981.
When rotating a loop it isn't enough to just forget SCEV for that loop nest. When r
[LoopRotate] Forget SCEV values in RewriteUsesOfClonedInstructions
This patch fixes problems reported in PR51981.
When rotating a loop it isn't enough to just forget SCEV for that loop nest. When rotating we might clone some instructions from the old header into the preheader, and insert new PHI nodes to merge values together. There could be users of the original value that are updated to use the PHI result. And those users were not necessarily depending on a PHI node earlier, so they weren't cleaned up when just forgetting all SCEV:s for the loop nest. So we need to explicitly forget those values to avoid invalid cached SCEV expressions.
Reviewed By: fhahn, mkazantsev
Differential Revision: https://reviews.llvm.org/D110813
show more ...
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
#
5648f717 |
| 07-Sep-2021 |
Kazu Hirata <kazu@google.com> |
[Analysis, Target, Transforms] Construct SmallVector with iterator ranges (NFC)
|
Revision tags: llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
#
06e7de79 |
| 05-Jun-2021 |
Fangrui Song <i@maskray.me> |
Fix some -Wunused-but-set-variable in -DLLVM_ENABLE_ASSERTIONS=off build
|
Revision tags: llvmorg-12.0.1-rc1 |
|
#
0ebf9a8e |
| 19-Apr-2021 |
OCHyams <orlando.hyams@sony.com> |
[DebugInfo] Move the findDbg* functions into DebugInfo.cpp
Move the findDbg* functions into lib/IR/DebugInfo.cpp from lib/Transforms/Utils/Local.cpp.
D99169 adds a call to a function (findDbgUsers)
[DebugInfo] Move the findDbg* functions into DebugInfo.cpp
Move the findDbg* functions into lib/IR/DebugInfo.cpp from lib/Transforms/Utils/Local.cpp.
D99169 adds a call to a function (findDbgUsers) that lives in lib/Transforms/Utils/Local.cpp (LLVMTransformUtils) from lib/IR/Value.cpp (LLVMCore). The Core lib doesn't include TransformUtils. The builtbots caught this here: https://lab.llvm.org/buildbot/#/builders/109/builds/12664. This patch moves the function, and the 3 similar ones for consistency, into DebugInfo.cpp which is part of LLVMCore.
Reviewed By: dblaikie, rnk
Differential Revision: https://reviews.llvm.org/D100632
show more ...
|
#
a6d2a8d6 |
| 06-Apr-2021 |
Philip Reames <listmail@philipreames.com> |
Add a subclass of IntrinsicInst for llvm.assume [nfc]
Add the subclass, update a few places which check for the intrinsic to use idiomatic dyn_cast, and update the public interface of AssumptionCach
Add a subclass of IntrinsicInst for llvm.assume [nfc]
Add the subclass, update a few places which check for the intrinsic to use idiomatic dyn_cast, and update the public interface of AssumptionCache to use the new class. A follow up change will do the same for the newer assumption query/bundle mechanisms.
show more ...
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5 |
|
#
43ded900 |
| 31-Mar-2021 |
Roman Lebedev <lebedev.ri@gmail.com> |
[NFC][LoopRotation] Count the number of instructions hoisted/cloned into preheader
|
Revision tags: llvmorg-12.0.0-rc4 |
|
#
3bfddc25 |
| 17-Mar-2021 |
Stephen Tozer <Stephen.Tozer@Sony.com> |
Reapply "[DebugInfo] Handle multiple variable location operands in IR"
Fixed section of code that iterated through a SmallDenseMap and added instructions in each iteration, causing non-deterministic
Reapply "[DebugInfo] Handle multiple variable location operands in IR"
Fixed section of code that iterated through a SmallDenseMap and added instructions in each iteration, causing non-deterministic code; replaced SmallDenseMap with MapVector to prevent non-determinism.
This reverts commit 01ac6d1587e8613ba4278786e8341f8b492ac941.
show more ...
|
#
01ac6d15 |
| 17-Mar-2021 |
Hans Wennborg <hans@chromium.org> |
Revert "[DebugInfo] Handle multiple variable location operands in IR"
This caused non-deterministic compiler output; see comment on the code review.
> This patch updates the various IR passes to co
Revert "[DebugInfo] Handle multiple variable location operands in IR"
This caused non-deterministic compiler output; see comment on the code review.
> This patch updates the various IR passes to correctly handle dbg.values with a > DIArgList location. This patch does not actually allow DIArgLists to be produced > by salvageDebugInfo, and it does not affect any pass after codegen-prepare. > Other than that, it should cover every IR pass. > > Most of the changes simply extend code that operated on a single debug value to > operate on the list of debug values in the style of any_of, all_of, for_each, > etc. Instances of setOperand(0, ...) have been replaced with with > replaceVariableLocationOp, which takes the value that is being replaced as an > additional argument. In places where this value isn't readily available, we have > to track the old value through to the point where it gets replaced. > > Differential Revision: https://reviews.llvm.org/D88232
This reverts commit df69c69427dea7f5b3b3a4d4564bc77b0926ec88.
show more ...
|