- Sep 14, 2020
-
-
Craig Topper authored
Previously, we formed ISD::PARITY by looking for (and (ctpop X), 1) but the AND might be separated from the ctpop. For example if the parity result is multiplied by 2, we'll pull the AND through the shift. So to handle more cases, move to SimplifyDemandedBits where we can handle more cases that result in only the LSB of the CTPOP being used.
-
Lang Hames authored
-
Fangrui Song authored
-
Fangrui Song authored
gcov 4.7 introduced the two options. https://sourceware.org/pipermail/gcc-patches/2011-November/328782.html -r only dumps files with relative paths or absolute paths with the prefix specified by -s. The two options are useful filtering out system header files.
-
Nikita Popov authored
As well as vector commuted operands.
-
David Blaikie authored
Reduces the chance of confusion when calling the function with autocomplete (will show the more accurate/informative variable name), etc.
-
David Blaikie authored
-
David Blaikie authored
Turns out this was use-after-move of function_ref, which is trivially copyable and movable, so the move did nothing and use after move was safe. But since this function_ref is being copied into a std::function, change the function_ref to be std::function to avoid extra layers of type erasure indirection - and then it's a real use after move, and fix that by referring to the moved-to member variable rather than the moved-from parameter.
-
Craig Topper authored
[SelectionDAG] Remove default for 'unsigned' Alignment for getLoad/getStore/getExtLoad/getTruncStore. Add default for MaybeAlign version. NFCI We want to remove the unsigned signatures eventually. This change migrates any that don't explicitly pass an alignment.
-
Raphael Isemann authored
Right now the ASTImporter assumes for most Expr nodes that they are always equal which leads to non-compatible declarations ending up being merged. This patch adds the basic framework for comparing Stmts (and with that also Exprs) and implements the custom checks for a few Stmt subclasses. I'll implement the remaining subclasses in follow up patches (mostly because there are a lot of subclasses and some of them require further changes like having GNU language in the testing framework) The motivation for this is that in LLDB we try to import libc++ source code and some of the types we are importing there contain expressions (e.g. because they use `enable_if<expr>`), so those declarations are currently merged even if they are completely different (e.g. `enable_if<value> ...` and `enable_if<!value> ...` are currently considered equal which is clearly not true). Reviewed By: martong, balazske Differential Revision: https://reviews.llvm.org/D87444
-
Qiu Chaofan authored
DAG combiner folds (fma a 1.0 b) into (fadd a b) but the flag isn't propagated into new fadd. This patch fixes that. Some code in visitFMA is redundant and such support for vector constants is missing. Need follow-up patch to clean. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D87037
-
- Sep 13, 2020
-
-
David Green authored
The recently added optimizePhiType algorithm had no checks to make sure it didn't continually iterate backward and forth between float and int types. This means that given an input like store(phi(bitcast(load))), we could convert that back and forth to store(bitcast(phi(load))). This particular case would usually have been simplified to a different load type (folding the bitcast into the load) before CGP, but other cases can occur. The one that came up was phi(bitcast(phi)), where the two phi's of different types were bitcast between. That was not helped by a dead bitcast being kept around which could make conversion look profitable. This adds an extra check of the bitcast Uses or Defs, to make sure that at least one is grounded and will not end up being converted back. It also makes sure that dead bitcasts are removed, and there is a minor change to include newly created Phi nodes in the Visited set so that they do not need to be revisited. Differential Revision: https://reviews.llvm.org/D82676
-
Nikita Popov authored
-
Simon Pilgrim authored
Demonstrates that redundant masked stores may be removed, as long as we're able to replace the AVX/AVX2 masked store with a generic masked store (constant mask or sign-extended bool vector mask).
-
Qiu Chaofan authored
Commit 3c0b3250 introduced store fusion for PowerPC target, but it brought failure under UB sanitizer and was reverted. This patch fixes them.
-
Fangrui Song authored
This is weird.
-
Fangrui Song authored
gcov is an "Edge Profiling with Edge Counters" application according to Optimally Profiling and Tracing Programs (1994). The minimum number of counters necessary is |E|-(|V|-1). The unmeasured edges form a spanning tree. Both GCC --coverage and clang -fprofile-generate leverage this optimization. This patch implements the optimization for clang --coverage. The produced .gcda files are much smaller now.
-
Fangrui Song authored
This makes the generated IR much more readable.
-
Fangrui Song authored
Also guard against infinite recursion if GCOV_ARC_ON_TREE edges contain a cycle.
-
Travis Finkenauer authored
Adds link/code sample to avoid rendering two dashes as non-ASCII "en dash". Also make wording a complete sentence. Reviewed By: nickdesaulniers, tmfink Differential Revision: https://reviews.llvm.org/D85596
-
Craig Topper authored
CTTZ, CTLZ, CTPOP, and FCANONICALIZE all have the same input and output types so the operand should have already been legalized when the result type was legalized.
-
Craig Topper authored
[X86] Use ISD::PARITY directly instead of emitting CTPOP and AND from combineHorizontalPredicateResult. We have a PARITY ISD node now so might as well use it. It will get re-expanded later.
-
Krzysztof Parzyszek authored
-
LLVM GN Syncbot authored
-
Sam Clegg authored
Differential Revision: https://reviews.llvm.org/D77187
-
Nikita Popov authored
-
Sam Clegg authored
Also add the +mutable-globals features in clang when building with `-fPIC` since the linker will generate mutable globals imports and exports in that case. Differential Revision: https://reviews.llvm.org/D87537
-
Fangrui Song authored
[gcov] Process .gcda immediately after the accompanying .gcno instead of doing all .gcda after all .gcno i.e. change the work flow from * .gcno for function A * .gcno for function B * .gcno for function C * .gcda for function A * .gcda for function B * .gcda for function C to * .gcno for function A * .gcda for function A * .gcno for function B * .gcda for function B * .gcno for function C * .gcda for function C Currently there is duplicate logic in .gcno & .gcda processing: how functions are filtered, which edges are instrumented, etc. This refactor enables simplification. Since we always process .gcno, in -fprofile-arcs -fno-test-coverage mode, __llvm_internal_gcov_emit_function_args.0 will have non-zero checksums.
-
Nikita Popov authored
-
Paul C. Anagnostopoulos authored
-
Paul C. Anagnostopoulos authored
-
Fangrui Song authored
Revert "[gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering" This reverts commit 412c9c0b.
-
Fangrui Song authored
[gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering
-
Fangrui Song authored
-
Nikita Popov authored
-
Mateusz Mikuła authored
It builds fine for MinGW on Windows. Differential Revision: https://reviews.llvm.org/D87539
-
Mateusz Mikuła authored
It builds without errors and makes possible to use CLANG_LINK_CLANG_DYLIB=1. Differential Revision: https://reviews.llvm.org/D87547
-
Mateusz Mikuła authored
In MinGW world, UNIX like lib prefix is preferred for the libraries. This patch adjusts CMake files to do that. Differential Revision: https://reviews.llvm.org/D87517
-
Craig Topper authored
[SelectionDAG][X86][ARM][AArch64] Add ISD opcode for __builtin_parity. Expand it to shifts and xors. Clang emits (and (ctpop X), 1) for __builtin_parity. If ctpop isn't natively supported by the target, this leads to poor codegen due to the expansion of ctpop being more complex than what is needed for parity. This adds a DAG combine to convert the pattern to ISD::PARITY before operation legalization. Type legalization is updated to handled Expanding and Promoting this operation. If after type legalization, CTPOP is supported for this type, LegalizeDAG will turn it back into CTPOP+AND. Otherwise LegalizeDAG will emit a series of shifts and xors followed by an AND with 1. I've avoided vectors in this patch to avoid more legalization complexity for this patch. X86 previously had a custom DAG combiner for this. This is now moved to Custom lowering for the new opcode. There is a minor regression in vector-reduce-xor-bool.ll, but a follow up patch can easily fix that. Fixes PR47433 Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D87209
-
Florian Hahn authored
-