- Dec 31, 2021
-
-
Alexey Bataev authored
Need to clear CurrentOrder order mask if it is determined that extractelements form identity order and need to use a vector-like construct when iterating over ordered entries in the reorderTopToBottom function.
-
Krzysztof Parzyszek authored
Co-authored-by:
Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com> Co-authored-by:
Sumanth Gundapaneni <sgundapa@quicinc.com> Co-authored-by:
Joshua Herrera <joshherr@quicinc.com>
-
Louis Dionne authored
-
Mogball authored
-
Krzysztof Parzyszek authored
Co-authored-by:Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
-
Fangrui Song authored
Similar to D62188: a BitcodeFile's symbol table may be iterated twice, once in --start-lib (lazy) state, and once in the non-lazy state. This patch makes `parseLazy` save `symbols[i]` so that the non-lazy state does not need to re-insert to the global symbol table. Avoiding a redundant `saver.save` may save memory. `Maximum resident set size (kbytes)` for a large --thinlto-index-only link: * without the patch: 10164000 * with the patch: 10095716 (0.6% decrease) Note: we can remove `saver.save` if `BitcodeCompiler::add` does not transfer the ownership of `f.obj` in `checkError(ltoObj->add(std::move(f.obj), resols));`. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D116390
-
Craig Topper authored
This patch adds isel support for STRICT_LRINT/LLRINT/LROUND/LLROUND. It also adds test cases for f32 and f64 constrained intrinsics that correspond to the intrinsics in float-intrinsics.ll and double-intrinsics.ll. Support for promoting the integer argument of STRICT_FPOWI was added. I've skipped adding tests for f16 intrinsics, since we don't have libcalls for them and we have inconsistent support for promoting them in LegalizeDAG. This will need to be examined more closely. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D116323
-
Fangrui Song authored
-
long.chen authored
[MLIR] Add explicit `using` to disambiguate between multiple implementations from base classes (NFC) Both of DenseElementsAttr and ElementsAttrTrait define the method of getElementType, this commit makes it available on DenseIntOrFPElementsAttr and DenseStringElementsAttr. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D116389
-
Benjamin Kramer authored
This moves the only string function out of the big list of math funcs. And let's us CSE strnlen calls.
-
Fangrui Song authored
@tejohnson noticed that freeing MemoryBuffer instances right before `lto->compile` can save RSS, likely because the memory can be reused by LTO indexing (e.g. ThinLTO import/export lists).). For ELFFileBase instances, symbol and section names are backed by MemoryBuffer, so destroying MemoryBuffer would make some infrequent passes (parseSymbolVersion, reportBackrefs) crash and make debugging difficult. For a BitcodeFile, its content is completely unused, but destroying its MemoryBuffer makes the buffer identifier inaccessible and may introduce constraints for future changes. This patch leverages madvise(MADV_DONTNEED) which achieves the major gain without the latent issues. `Maximum resident set size (kbytes): ` for a large --thinlto-index-only link: * current behavior: 10146104KiB * destroy MemoryBuffer instances: 8555240KiB * madvise(MADV_DONTNEED) just bitcodeFiles and lazyBitcodeFiles: 8737372KiB * madvise(MADV_DONTNEED) all MemoryBuffers: 8739796KiB (16% decrease) Depends on D116366 Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D116367
-
William S. Moses authored
Per the discussion in https://reviews.llvm.org/D116345 it makes sense to move AtomicRMWOp out of the standard dialect. This was accentuated by the need to add a fold op with a memref::cast. The only dialect that would permit this is the memref dialect (keeping it in the standard dialect or moving it to the arithmetic dialect would require those dialects to have a dependency on the memref dialect, which breaks linking). As the AtomicRMWKind enum is used throughout, this has been moved to Arith. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D116392
-
Jack Andersen authored
Extends response file expansion to recognize `<CFGDIR>` and expand to the current file's directory. This makes it much easier to author clang config files rooted in portable, potentially not-installed SDK directories. A typical use case may be something like the following: ``` # sample_sdk.cfg --target=sample -isystem <CFGDIR>/include -L <CFGDIR>/lib -T <CFGDIR>/ldscripts/link.ld ``` Reviewed By: sepavloff Differential Revision: https://reviews.llvm.org/D115604
-
Fangrui Song authored
On *NIX systems, this API calls madvise(MADV_DONTNEED) on read-only file mappings. It should not be used on a writable buffer. The API is used to implement ld.lld LTO memory saving trick (D116367). Note: on read-only file mappings, Linux's MADV_DONTNEED semantics match POSIX POSIX_MADV_DONTNEED and BSD systems' MADV_DONTNEED. On Windows, VirtualAllocEx MEM_COMMIT/MEM_RESET have similar semantics but are unfortunately not drop-in replacements. dontNeedIfMmap is currently a no-op. Reviewed By: aganea Differential Revision: https://reviews.llvm.org/D116366
-
Fangrui Song authored
To match the `--help` message and most other utilities. While here, change `option:: -output=output` to `option:: --output=<output>` and omit the value name for the short options (convention of other utilities). Reviewed By: snehasish Differential Revision: https://reviews.llvm.org/D116353
-
Krzysztof Parzyszek authored
-
Krzysztof Parzyszek authored
Co-authored-by:
Rahul Utkoor <quic_rutkoor@quicinc.com> Co-authored-by:
Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
-
Luís Ferreira authored
This reverts commit e60d6dfd. clang-ppc64le-rhel buildbot failed (https://lab.llvm.org/buildbot#builders/57/builds/13424): tools/lld/MachO/CMakeFiles/lldMachO.dir/Symbols.cpp.o: In function `lld::demangle(llvm::StringRef, bool)': Symbols.cpp:(.text._ZN3lld8demangleEN4llvm9StringRefEb[_ZN3lld8demangleEN4llvm9StringRefEb]+0x90): undefined reference to `llvm::demangle(std::string const&)'
-
Krzysztof Parzyszek authored
Co-authored-by:Sumanth Gundapaneni <sgundapa@quicinc.com>
-
Luís Ferreira authored
LLVM core library supports demangling other mangled symbols other than itanium, such as D and Rust. LLD should use those demanglers in order to output pretty demangled symbols on error messages. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D116279
-
Sanjay Patel authored
((X << C) + Y) >>u C --> (X + (Y >>u C)) & (-1 >>u C) https://alive2.llvm.org/ce/z/DY9DPg This replaces a shift with an 'and', and in the case where the add has a constant operand, it eliminates both shifts. As noted in the TODO comment, we already have this fold when the shifts are in the opposite order (and that code handles bitwise logic ops too). Fixes #52851
-
Sanjay Patel authored
This reverts commit 2e3e0a5c. Some unintended diffs snuck into this patch.
-
Sanjay Patel authored
((X << C) + Y) >>u C --> (X + (Y >>u C)) & (-1 >>u C) https://alive2.llvm.org/ce/z/DY9DPg This replaces a shift with an 'and', and in the case where the add has a constant operand, it eliminates both shifts. As noted in the TODO comment, we already have this fold when the shifts are in the opposite order (and that code handles bitwise logic ops too). Fixes #52851
-
Krzysztof Parzyszek authored
Co-authored-by:Anirudh Sundar Subramaniam <quic_sanirudh@quicinc.com>
-
- Dec 30, 2021
-
-
Krzysztof Parzyszek authored
This reverts commit ba07f300. A build-vector sequence is made of pairs: rotate+insert. When constructing a single vector, this results in a chain of 2*N instructions. The rotate operation is a permute operation, but the insert uses a multiplication resource: insert and rotate can execute in the same cycle, but obviously they cannot operate on the same vector. The original halving idea is still beneficial since it does allow for insert/rotate overlap, and for hiding insert's latency.
-
Nuno Lopes authored
-
Nicolas Vasilache authored
vector.transfer operations do not have rank-reducing semantics. Bail on illegal rank-reduction: we need to check that the rank-reduced dims are exactly the leading dims. I.e. the following is illegal: ``` %0 = vector.transfer_write %v, %t[0,0], %cst : vector<2x4xf32>, tensor<2x4xf32> %1 = tensor.insert_slice %0 into %tt[0,0,0][2,1,4][1,1,1] : tensor<2x4xf32> into tensor<2x1x4xf32> ``` Cannot fold into: ``` %0 = vector.transfer_write %v, %t[0,0,0], %cst : vector<2x4xf32>, tensor<2x1x4xf32> ``` For this, check the trailing `vectorRank` dims of the insert_slice result tensor match the trailing dims of the inferred result tensor. Differential Revision: https://reviews.llvm.org/D116409 -
Nuno Lopes authored
This matches NewGVN's behavior.
-
Pavel Labath authored
This small patch adds two useful improvements: - allows one to specify the emulator path as a bare filename, and have it be looked up in the PATH - allows one to leave the path empty and have the filename be derived from the architecture.
-
Nuno Lopes authored
-
Sjoerd Meijer authored
In D109958 it was noticed that we could optimise the pipeline and avoid rerunning LoopSimplify/LCSSA for LoopFlatten by moving it to a LoopPassManager. Differential Revision: https://reviews.llvm.org/D110057
-
Nuno Lopes authored
-
Nuno Lopes authored
-
Pavel Labath authored
It was being used only in some very old tests (which pass even without it) and its implementation is highly questionable. These days we have different mechanisms for requesting a build with a particular kind of c++ library (USE_LIB(STD)CPP in the makefile).
-
Roman Lebedev authored
The bitcode reader expected that the pointers are typed, so that it can extract the function type for the assembly so `bitc::CST_CODE_INLINEASM` did not explicitly store said function type. I'm not really sure how the upgrade path will look for existing bitcode, but i think we can easily support opaque pointers going forward, by simply storing the function type. Reviewed By: #opaque-pointers, nikic Differential Revision: https://reviews.llvm.org/D116341
-
Roman Lebedev authored
-
jacquesguan authored
Differential Revision: https://reviews.llvm.org/D116307
-
Sjoerd Meijer authored
This reverts commit ada028c3. A performance regression was reported that we need to investigate: https://github.com/llvm/llvm-project/issues/52919
-
Fangrui Song authored
-