Revision tags: llvmorg-21-init, llvmorg-19.1.7 |
|
#
4eba40c6 |
| 20-Dec-2024 |
Yingwei Zheng <dtcxzyw2333@gmail.com> |
[ConstraintElim] Remove dead code. NFC. (#118983)
`R2` should be always greater than `R1` here because both `R1` and `R2` are not modified inside the loop.
|
Revision tags: 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 |
|
#
1462605a |
| 25-Jun-2024 |
Kazu Hirata <kazu@google.com> |
[Analysis] Use range-based for loops (NFC) (#96587)
|
Revision tags: 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 |
|
#
3ae3e407 |
| 03-Jan-2024 |
Florian Hahn <flo@fhahn.com> |
[ConstraintSystem] Drop left-over parentheses. (NFC)
Remove left over redundant parentheses after 9b6127d7 as pointed out by @nikic.
|
#
9b6127d7 |
| 28-Dec-2023 |
Florian Hahn <flo@fhahn.com> |
[ConstraintSystem] Remove GCD handling (NFCI).
As @dtcxzyw pointed out in https://github.com/llvm/llvm-project/pull/76299#pullrequestreview-1795471115 the current GCD handling is effectively a no-op
[ConstraintSystem] Remove GCD handling (NFCI).
As @dtcxzyw pointed out in https://github.com/llvm/llvm-project/pull/76299#pullrequestreview-1795471115 the current GCD handling is effectively a no-op, as NewGCD will always by 1, as it is initially initialized as 1.
This patch removes the uses of GCD and its computation. This slightly reduces compile-time [1], while not causing any binary changes (due to always dividing by 1) in the large test-set I checked.
Division by GCD could be added in the future again and it in theory should help reduce overflows by normalizing the coefficients (sketched in cadbfdf8605e743e092217c54e2b837245a0a330), but this also doesn't seem to have much (any) impact in practice.
[1] https://llvm-compile-time-tracker.com/compare.php?from=0de030e4dcb798228731ab25d4dd31df4dcaba2b&to=cadbfdf8605e743e092217c54e2b837245a0a330&stat=instructions:u
show more ...
|
Revision tags: 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 |
|
#
0a0181dc |
| 21-Apr-2023 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElim] Fix integer overflow in ConstraintSystem::negate.
This fixes another integer overflow that was exposed by a variant of the test case from #62226.
|
Revision tags: llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3 |
|
#
b32b7068 |
| 16-Feb-2023 |
Florian Hahn <flo@fhahn.com> |
[ConstraintSystem] Use sparse representation for constraints. (NFC)
Update ConstraintSystem to use a sparse representation for entries in a row. Most rows only contain a small number of variables, s
[ConstraintSystem] Use sparse representation for constraints. (NFC)
Update ConstraintSystem to use a sparse representation for entries in a row. Most rows only contain a small number of variables, so the sparse representation can result in significant speedups.
For a large test case from D135915, it halves the time spent in ConstraintElimination.
To ensure this returns the same results as the old implementation in all cases, I built a large set of projects with an extra assertion that it produces the same result as the old implementation.
show more ...
|
#
df2ea2fc |
| 15-Feb-2023 |
Zain Jaffal <z_jaffal@apple.com> |
[ConstriantElimination] Add NODEBUG condition around `dump`
|
#
07f93d8c |
| 15-Feb-2023 |
Zain Jaffal <z_jaffal@apple.com> |
Recommit "[ConstraintElimination] Change debug output to display variable names."
This reverts commit 02ae7e72b3f00969eeb579a2b4346082827f0b35.
include Value.h in ConstraintSystem.h
|
#
02ae7e72 |
| 15-Feb-2023 |
Nikita Popov <npopov@redhat.com> |
Revert "Recommit "[ConstraintElimination] Change debug output to display variable names.""
This reverts commit 2a2a6bfcfe8e62886542cb673ac8df349cf26499.
This causes build failures:
/home/npopo
Revert "Recommit "[ConstraintElimination] Change debug output to display variable names.""
This reverts commit 2a2a6bfcfe8e62886542cb673ac8df349cf26499.
This causes build failures:
/home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp: In member function ‘llvm::SmallVector<std::__cxx11::basic_string<char> > llvm::ConstraintSystem::getVarNamesList() const’: /home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp:118:10: error: invalid use of incomplete type ‘class llvm::Value’ 118 | if (V->getName().empty()) | ^~ In file included from /home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp:9: /home/npopov/repos/llvm-project/llvm/include/llvm/Analysis/ConstraintSystem.h:21:7: note: forward declaration of ‘class llvm::Value’ 21 | class Value; | ^~~~~ /home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp:119:22: error: invalid use of incomplete type ‘class llvm::Value’ 119 | OperandName = V->getNameOrAsOperand(); | ^~ /home/npopov/repos/llvm-project/llvm/include/llvm/Analysis/ConstraintSystem.h:21:7: note: forward declaration of ‘class llvm::Value’ 21 | class Value; | ^~~~~ /home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp:121:41: error: invalid use of incomplete type ‘class llvm::Value’ 121 | OperandName = std::string("%") + V->getName().str(); | ^~ /home/npopov/repos/llvm-project/llvm/include/llvm/Analysis/ConstraintSystem.h:21:7: note: forward declaration of ‘class llvm::Value’ 21 | class Value; | ^~~~~
show more ...
|
#
2a2a6bfc |
| 15-Feb-2023 |
Zain Jaffal <z_jaffal@apple.com> |
Recommit "[ConstraintElimination] Change debug output to display variable names."
This reverts commit 62d0e1a8541f93dfbf66d982f66da32676df2df7.
remove `dumpWithNames` function
|
#
62d0e1a8 |
| 15-Feb-2023 |
Zain Jaffal <z_jaffal@apple.com> |
Revert "[ConstraintElimination] Change debug output to display variable names."
This reverts commit 869c87ad10e87db7c032c3464338ab9d50916510.
`dumpWithNames` function should be removed
|
#
869c87ad |
| 15-Feb-2023 |
Zain Jaffal <z_jaffal@apple.com> |
[ConstraintElimination] Change debug output to display variable names.
Previously when constraint system outputs the rows in the system the variables used are x1,2...n making it hard to infer which
[ConstraintElimination] Change debug output to display variable names.
Previously when constraint system outputs the rows in the system the variables used are x1,2...n making it hard to infer which ones they relate to in the IR
Reviewed By: fhahn
Differential Revision: https://reviews.llvm.org/D142618
show more ...
|
Revision tags: llvmorg-16.0.0-rc2 |
|
#
8537a7c9 |
| 06-Feb-2023 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElim] Update existing constraint system in place (NFC).
This patch breaks up the solving step into 2 phases:
1. Collect all rows where the variable to eliminate is != 0 and remove it
[ConstraintElim] Update existing constraint system in place (NFC).
This patch breaks up the solving step into 2 phases:
1. Collect all rows where the variable to eliminate is != 0 and remove it from the original system. 2. Process all collect rows to build new set of constraints, add them to the original system.
This is much more efficient for excessive cases, as this avoids a large number of moves to the new system. This reduces the time spent in ConstraintElimination for the test case shared in D135915 from ~3s to 0.6s.
show more ...
|
#
d82811df |
| 05-Feb-2023 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElim] Move some array accesses to variables (NFC).
Move some accesses that are use multiple times to variables. This also will make updating them easier in the future.
|
#
1373f203 |
| 02-Feb-2023 |
Florian Hahn <flo@fhahn.com> |
[ConstraintSystem] Remove last variable, use move instead of copy. (NFC)
At the moment, a large amount of time is spent construction vectors by pushing back all elements except the first variable. F
[ConstraintSystem] Remove last variable, use move instead of copy. (NFC)
At the moment, a large amount of time is spent construction vectors by pushing back all elements except the first variable. For large inputs, such as discussed in https://reviews.llvm.org/D135915#4057050 this can result in excessive compile-time.
Instead, it is more efficient to remove the last variable. Then the original vector can be re-used by simply popping the last element and then moving the contents to the new system.
This improves time spent in ConstraintElimination for the linked reproducer from ~43s to ~3s.
show more ...
|
Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
38818b60 |
| 04-Jan-2023 |
serge-sans-paille <sguelton@mozilla.com> |
Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part
Use deduction guides instead of helper functions.
The only non-automatic changes have been:
1. ArrayRef(some_uint8_pointer, 0
Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part
Use deduction guides instead of helper functions.
The only non-automatic changes have been:
1. ArrayRef(some_uint8_pointer, 0) needs to be changed into ArrayRef(some_uint8_pointer, (size_t)0) to avoid an ambiguous call with ArrayRef((uint8_t*), (uint8_t*)) 2. CVSymbol sym(makeArrayRef(symStorage)); needed to be rewritten as CVSymbol sym{ArrayRef(symStorage)}; otherwise the compiler is confused and thinks we have a (bad) function prototype. There was a few similar situation across the codebase. 3. ADL doesn't seem to work the same for deduction-guides and functions, so at some point the llvm namespace must be explicitly stated. 4. The "reference mode" of makeArrayRef(ArrayRef<T> &) that acts as no-op is not supported (a constructor cannot achieve that).
Per reviewers' comment, some useless makeArrayRef have been removed in the process.
This is a follow-up to https://reviews.llvm.org/D140896 that introduced the deduction guides.
Differential Revision: https://reviews.llvm.org/D140955
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, 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 |
|
#
601b3a13 |
| 17-Jul-2022 |
Kazu Hirata <kazu@google.com> |
[Analysis] Qualify auto variables in for loops (NFC)
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, 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 |
|
#
71c3a551 |
| 28-Feb-2022 |
serge-sans-paille <sguelton@redhat.com> |
Cleanup includes: LLVMAnalysis
Number of lines output by preprocessor: before: 1065940348 after: 1065307662
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Diff
Cleanup includes: LLVMAnalysis
Number of lines output by preprocessor: before: 1065940348 after: 1065307662
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D120659
show more ...
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
#
1ca02bdd |
| 27-Jan-2022 |
Florian Hahn <flo@fhahn.com> |
[ConstraintSystem] Mark function as const (NFC).
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, 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, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2 |
|
#
12fc9ca3 |
| 13-Jan-2021 |
Kazu Hirata <kazu@google.com> |
[llvm] Remove redundant string initialization (NFC)
Identified with readability-redundant-string-init.
|
Revision tags: llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
f19876c5 |
| 06-Dec-2020 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Bail out if system gets too big.
For some inputs, the constraint system can grow quite large during solving, because it replaces complex constraints with one or more simpler
[ConstraintElimination] Bail out if system gets too big.
For some inputs, the constraint system can grow quite large during solving, because it replaces complex constraints with one or more simpler constraints. This adds a cut-off to avoid compile-time explosion on problematic inputs.
show more ...
|
#
4e5c0c2a |
| 05-Dec-2020 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Wrap dump() call in LLVM_DEBUG (NFC).
ConstraintSystem::dump only generates output with -debug, but there's no need to call it without -debug.
|
#
4ceecc82 |
| 05-Dec-2020 |
Florian Hahn <flo@fhahn.com> |
[ConstraintElimination] Handle constraints with all zero var coeffs.
Constraints where all variable coefficients are 0 do not add any useful information. When checking, we can check if they are alwa
[ConstraintElimination] Handle constraints with all zero var coeffs.
Constraints where all variable coefficients are 0 do not add any useful information. When checking, we can check if they are always true/false.
show more ...
|
Revision tags: llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
#
bb037c2a |
| 17-Sep-2020 |
Mikael Holmen <mikael.holmen@ericsson.com> |
[ConstraintSystem] Remove local variable that is set but not read [NFC]
gcc 7.4 warns about it.
|
#
db22e70d |
| 15-Sep-2020 |
Florian Hahn <flo@fhahn.com> |
[ConstraintSolver] Add isConditionImplied helper.
This patch adds a isConditionImplied function that takes a constraint and returns true if the constraint is implied by the current constraints in th
[ConstraintSolver] Add isConditionImplied helper.
This patch adds a isConditionImplied function that takes a constraint and returns true if the constraint is implied by the current constraints in the system.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D84545
show more ...
|