|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, 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, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, 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, 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, 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, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
53dc0f10 |
| 03-Jul-2022 |
Nuno Lopes <[email protected]> |
[NFC] Switch a few uses of undef to poison as placeholders for unreachble code
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5 |
|
| #
f85c5079 |
| 09-Jun-2022 |
Philip Reames <[email protected]> |
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 ...
|
| #
f83a88a1 |
| 05-Jun-2022 |
Kazu Hirata <[email protected]> |
[Transforms] Use llvm::is_contained (NFC)
|
| #
8b0d7634 |
| 25-May-2022 |
Alex Zhikhartsev <[email protected]> |
[DFAJumpThreading] Relax analysis to handle unpredictable initial values
Responding to a feature request from the Rust community:
https://github.com/rust-lang/rust/issues/80630
void foo(X) {
[DFAJumpThreading] Relax analysis to handle unpredictable initial values
Responding to a feature request from the Rust community:
https://github.com/rust-lang/rust/issues/80630
void foo(X) { for (...) switch (X) case A X = B case B X = C }
Even though the initial switch value is non-constant, the switch statement can still be threaded: the initial value will hit the switch statement but the rest of the state changes will proceed by jumping unconditionally.
The early predictability check is relaxed to allow unpredictable values anywhere, but later, after the paths through the switch statement have been enumerated, no non-constant state values are allowed along the paths. Any state value not along a path will be an initial switch value, which can be safely ignored.
Differential Revision: https://reviews.llvm.org/D124394
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 |
|
| #
f90a66a5 |
| 03-Mar-2022 |
serge-sans-paille <[email protected]> |
Add missing include under -DEXPENSIVE_CHECKS
This is a follow-up to 59630917d6cc7c4a273f617f92bf6190ee2992e1
|
| #
59630917 |
| 02-Mar-2022 |
serge-sans-paille <[email protected]> |
Cleanup includes: Transform/Scalar
Estimated impact on preprocessor output line: before: 1062981579 after: 1062494547
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cl
Cleanup includes: Transform/Scalar
Estimated impact on preprocessor output line: before: 1062981579 after: 1062494547
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120817
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc2 |
|
| #
a494ae43 |
| 01-Mar-2022 |
serge-sans-paille <[email protected]> |
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 |
|
| #
9d555b4a |
| 01-Feb-2022 |
Olle Fredriksson <[email protected]> |
[DFAJumpThreading] make update order deterministic
We tracked down some non-determinism in compilation output to the DFAJumpThreading pass. These changes fixed our issue:
* Make the DefMap type a M
[DFAJumpThreading] make update order deterministic
We tracked down some non-determinism in compilation output to the DFAJumpThreading pass. These changes fixed our issue:
* Make the DefMap type a MapVector to make its iteration order depend on insertion order. * Sort the values to be inserted into NewDefs by instruction order to make the insertion order deterministic. Since these values come from iterating over a ValueMap, which doesn't have deterministic iteration order, I couldn't fix this at its source.
Reviewed By: alexey.zhikhar
Differential Revision: https://reviews.llvm.org/D118590
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
d5dc3964 |
| 15-Dec-2021 |
Alexey Zhikhartsev <[email protected]> |
[DFAJumpThreading] Determinator BB should precede switch-defining BB
Otherwise, it is possible that the state defined in the determinator block defines the state for the next iteration of the loop,
[DFAJumpThreading] Determinator BB should precede switch-defining BB
Otherwise, it is possible that the state defined in the determinator block defines the state for the next iteration of the loop, rather than for the current one.
Fixes llvm-test-suite's SingleSource/Regression/C/gcc-c-torture/execute/pr80421.c
Differential Revision: https://reviews.llvm.org/D115832
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
972d4133 |
| 30-Oct-2021 |
Kazu Hirata <[email protected]> |
Use {DenseSet,SmallPtrSet}::contains (NFC)
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4 |
|
| #
84b07c9b |
| 19-Sep-2021 |
Kazu Hirata <[email protected]> |
[llvm] Use pop_back_val (NFC)
|
|
Revision tags: llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
c1f3bab2 |
| 20-Aug-2021 |
Simon Pilgrim <[email protected]> |
MainSwitch::isValidSelectInst - don't dereference dyn_cast<> results.
We've already checked that the pointer isa<PHINode>, so we can use cast<Instruction> safely.
Fixes static analyser warning.
|
| #
c874dd53 |
| 05-Aug-2021 |
Christopher Di Bella <[email protected]> |
[llvm][clang][NFC] updates inline licence info
Some files still contained the old University of Illinois Open Source Licence header. This patch replaces that with the Apache 2 with LLVM Exception li
[llvm][clang][NFC] updates inline licence info
Some files still contained the old University of Illinois Open Source Licence header. This patch replaces that with the Apache 2 with LLVM Exception licence.
Differential Revision: https://reviews.llvm.org/D107528
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1 |
|
| #
380b8a60 |
| 02-Aug-2021 |
Nikita Popov <[email protected]> |
[DFAJumpThreading] Use SmallPtrSet for Visited (NFC)
This set is only used for contains checks, so there is no need to use std::set.
|
| #
3f7aea1a |
| 02-Aug-2021 |
Nikita Popov <[email protected]> |
[DFAJumpThreading] Use insert return value (NFC)
Rather than find + insert. Also use range based for loop.
|
| #
84602f98 |
| 02-Aug-2021 |
Nikita Popov <[email protected]> |
[DFAJumpThreading] Remove unnecessary includes (NFC)
This file uses neither unordered_map nor unordered_set.
|
| #
e97524cb |
| 02-Aug-2021 |
Nikita Popov <[email protected]> |
[DFAJumpThreading] Mark DT as preserved in LegacyPM
It is marked as preserved in NewPM, but not LegacyPM.
|
|
Revision tags: llvmorg-14-init |
|
| #
05815c9f |
| 27-Jul-2021 |
Benjamin Kramer <[email protected]> |
Remove unused include that's also a layering violation. NFC.
|
| #
02077da7 |
| 27-Jul-2021 |
Alexey Zhikhartsev <[email protected]> |
Add jump-threading optimization for deterministic finite automata
The current JumpThreading pass does not jump thread loops since it can result in irreducible control flow that harms other optimizat
Add jump-threading optimization for deterministic finite automata
The current JumpThreading pass does not jump thread loops since it can result in irreducible control flow that harms other optimizations. This prevents switch statements inside a loop from being optimized to use unconditional branches.
This code pattern occurs in the core_state_transition function of Coremark. The state machine can be implemented manually with goto statements resulting in a large runtime improvement, and this transform makes the switch implementation match the goto version in performance.
This patch specifically targets switch statements inside a loop that have the opportunity to be threaded. Once it identifies an opportunity, it creates new paths that branch directly to the correct code block. For example, the left CFG could be transformed to the right CFG:
``` sw.bb sw.bb / | \ / | \ case1 case2 case3 case1 case2 case3 \ | / / | \ latch.bb latch.2 latch.3 latch.1 br sw.bb / | \ sw.bb.2 sw.bb.3 sw.bb.1 br case2 br case3 br case1 ```
Co-author: Justin Kreiner @jkreiner Co-author: Ehsan Amiri @amehsan
Reviewed By: SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D99205
show more ...
|