- May 06, 2021
-
-
Vitaly Buka authored
Operator new must align allocations for types with large alignment. Before c++17 behavior was implementation defined and both clang and gc++ before 11 ignored alignment. Miss-aligned objects mysteriously crashed tests on Ubuntu 14. Alternatives are compile with -std=c++17 or -faligned-new, but they were discarded as less portable. Reviewed By: hctim Differential Revision: https://reviews.llvm.org/D101874
-
Arthur O'Dwyer authored
This simply applies Howard's commit 4c80bfbd consistently across all the associative and unordered container tests. "unord.set/insert_hint_const_lvalue.pass.cpp" failed with `-D_LIBCPP_DEBUG=1` before this patch; it was the only one that incorrectly reused invalid iterator `e`. The others already used valid iterators (generally `c.end()`); I'm just making them all match the same pattern of usage: "e, then r, then c.end() for the rest." Differential Revision: https://reviews.llvm.org/D101679
-
Arthur O'Dwyer authored
Convert to a primitive type first; then use primitive `>=` on that value. Differential Revision: https://reviews.llvm.org/D101678
-
Arthur O'Dwyer authored
`__debug_less` ends up running the comparator up-to-twice per comparison, because whenever `(x < y)` it goes on to verify that `!(y < x)`. This breaks the strict "Complexity" guarantees of algorithms like `inplace_merge`, which we test in the test suite. So, just skip the complexity assertions in debug mode. Differential Revision: https://reviews.llvm.org/D101677
-
Arthur O'Dwyer authored
The range of char pointers [data, data+size] is a valid closed range, but the range [begin, end) is valid only half-open. Differential Revision: https://reviews.llvm.org/D101676
-
Arthur O'Dwyer authored
This appears to be a bug in our string::assign: when assigning into a longer string, from a shorter snippet of itself, we invalidate iterators before doing the copy. We should invalidate them afterward. Also drive-by improve the formatting of a function header. Differential Revision: https://reviews.llvm.org/D101675
-
Arthur O'Dwyer authored
This allocator is not intended for libc++'s users to use; it's strictly an implementation detail of `src/locale.cpp`. So, move it to the `src/include/` directory. Drive-by const-qualify its comparison operators. For consistency with `__hidden_allocator` (defined in `src/thread.cpp`), do *not* remove it from "libcxx/lib/libc++unexp.exp", "libcxx/utils/symcheck-blacklists/linux_blacklist.txt", etc. Differential Revision: https://reviews.llvm.org/D101293
-
Thomas Lively authored
Update the SIMD builtin load functions to take pointers to const data and update the intrinsics themselves to not cast away constness. Differential Revision: https://reviews.llvm.org/D101884
-
Thomas Lively authored
Make the inputs to all narrowing builtins signed, which is how they are interpreted by the underlying instructions (only the result changes sign between instructions). Differential Revision: https://reviews.llvm.org/D101883
-
Tomasz Miąsko authored
Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D101823
-
Jez Ng authored
Looks like the PointerUnion casting cares about const-ness...
-
Martin Storsjö authored
On Windows, static vs DLL linking affects details in quite a few cases, so it's good to have coverage for both cases. Testing with static linking also increases coverage for a number of cases and individual checks that have had to be waived for the DLL case, and allows testing libc++experimental, increasing the number of test cases actually executed by 180 (176 new tests from libc++experimental and 4 ones that are XFAIL windows-dll). Also drop the "generic-" prefix from these configuration names, as they're perhaps not what the "generic" prefix intended originally in the other generic-posix configurations. Differential Revision: https://reviews.llvm.org/D101565
-
Louis Dionne authored
-
Thomas Lively authored
The WebAssembly SIMD intrinsics in wasm_simd128.h generally try not to require any particular alignment for memory operations to be maximally flexible. For builtin memory access functions and their corresponding LLVM IR intrinsics, there's no way to set the expected alignment, so the best we can do is set the alignment to 1 in the backend. This change means that the alignment hints in the emitted code will no longer be incorrect when users use the intrinsics to access unaligned data. Differential Revision: https://reviews.llvm.org/D101850
-
Jon Chesterfield authored
[libomptarget] Initial documentation on amdgpu offload Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D101927
-
Evgenii Stepanov authored
The problem was introduced in D100348. It's really hard to trigger the bug in a stress test - the race is just too narrow - but the new checks in Thread::Init should at least provide usable diagnostic if the problem ever returns. Differential Revision: https://reviews.llvm.org/D101881
-
Jez Ng authored
ARM_RELOC_BR24 is used for BL/BLX instructions from within ARM (i.e. not Thumb) code. This diff just handles the basic case: branches from ARM to ARM, or from ARM to Thumb where no shimming is required. (See comments in ARM.cpp for why shims are required.) Note: I will likely be deprioritizing ARM work for the near future to focus on other parts of LLD. Apologies for the half-done state of this; I'm just trying to wrap up what I've already worked on. Reviewed By: #lld-macho, alexshap Differential Revision: https://reviews.llvm.org/D101814
-
Jez Ng authored
We need to account for path rerooting when generating the response file. We could either reroot the paths before generating the file, or pass through the original filenames and change just the syslibroot. I've opted for the latter, in order that the reproduction run more closely mirrors the original. We must also be careful *not* to make an absolute path relative if it is shadowed by a rerooted path. See repro6.tar in reroot-path.s for details. I've moved the call to `createResponseFile()` after the initialization of `config->systemLibraryRoots`, since it now needs to know what those roots are. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D101224
-
Harald van Dijk authored
The current code accounts for two possible layouts, but there is at least a third supported layout: clang-tools-extra may also be checked out as clang/tools/extra with the releases, which was not yet handled. Rather than treating that as a special case, use the location of CompletionModel.cmake to handle all three cases. This should address the problems that prompted D96787 and the problems that prompted the proposed revert D100625. Reviewed By: usaxena95 Differential Revision: https://reviews.llvm.org/D101851
-
Nick Desaulniers authored
This hinders translations, as per: https://clang.llvm.org/docs/InternalsManual.html#the-format-string Reviewed By: MaskRay, xbolva00 Differential Revision: https://reviews.llvm.org/D101387
-
Roman Lebedev authored
-
Fangrui Song authored
PR50160: we currently ignore non-PT_PHDR segments with no sections, not accounting for its p_offset and p_filesz: this can cause an out-of-bounds write in `writeSegmentData` if the p_offset+p_filesz is larger than the total file size. This can be fixed by setting p_offset=p_filesz=0. The logic nicely unifies with the logic added in D90897. Reviewed By: jhenderson, rupprecht Differential Revision: https://reviews.llvm.org/D101560
-
Saleem Abdulrasool authored
This corrects a few issues identified by `clang-format`. This is meant to be preparation for a subsequent change.
-
Roman Lebedev authored
-
Philipp Krones authored
This untangles the MCContext and the MCObjectFileInfo. There is a circular dependency between MCContext and MCObjectFileInfo. Currently this dependency also exists during construction: You can't contruct a MOFI without a MCContext without constructing the MCContext with a dummy version of that MOFI first. This removes this dependency during construction. In a perfect world, MCObjectFileInfo wouldn't depend on MCContext at all, but only be stored in the MCContext, like other MC information. This is future work. This also shifts/adds more information to the MCContext making it more available to the different targets. Namely: - TargetTriple - ObjectFileType - SubtargetInfo Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D101462
-
Philip Reames authored
LoopVectorize has a fairly deeply baked in design problem where it will try to query analysis (primarily SCEV, but also ValueTracking) in the midst of mutating IR. In particular, the intermediate IR state does not represent the semantics of the original (or final) program. Fixing this for real is hard, but all of the cases seen so far share a common symptom. In cases seen to date, the analysis being queried is the computation of the original loop's trip count. We can fix this particular instance of the issue by simply computing the trip count early, and caching it. I want to be really clear that this is nothing but a workaround. It does nothing to fix the root issue, and at best, delays the time until we have to fix this for real. Florian and I have discussed an eventual solution in the review comments for https://reviews.llvm.org/D100663, but it's a lot of work. Test taken from https://reviews.llvm.org/D100663. Differential Revision: https://reviews.llvm.org/D101487
-
Javier Setoain authored
These instructions map to SVE-specific instrinsics that accept a predicate operand to support control flow in vector code. Differential Revision: https://reviews.llvm.org/D100982
-
Nico Weber authored
This cleaned up an oversight over a year ago. Should no longer be needed.
-
Stanislav Mekhanoshin authored
-
Sergei Grechanik authored
This patch adds support for vectorizing loops with 'iter_args' implementing known reductions along the vector dimension. Comparing to the non-vector-dimension case, two additional things are done during vectorization of such loops: - The resulting vector returned from the loop is reduced to a scalar using `vector.reduce`. - In some cases a mask is applied to the vector yielded at the end of the loop to prevent garbage values from being written to the accumulator. Vectorization of reduction loops is disabled by default. To enable it, a map from loops to array of reduction descriptors should be explicitly passed to `vectorizeAffineLoops`, or `vectorize-reductions=true` should be passed to the SuperVectorize pass. Current limitations: - Loops with a non-unit step size are not supported. - n-D vectorization with n > 1 is not supported. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D100694
-
Jinsong Ji authored
CGProfilePass is not always on, it will be disabled when using non-intergrated assemblers. // Only enable CGProfilePass when using integrated assembler, since // non-integrated assemblers don't recognize .cgprofile section. PMBuilder.CallGraphProfile = !CodeGenOpts.DisableIntegratedAS; Add -fintegrate-as to make sure the output don't rely on the platform default. Reviewed By: evgeny777 Differential Revision: https://reviews.llvm.org/D101918
-
Sushma Unnibhavi authored
Reviewed By: xgupta, amccarth Differential Revision: https://reviews.llvm.org/D101433
-
Pooja Yadav authored
Added details about the llvm/example section. Reviewed By: xgupta Differential Revision: https://reviews.llvm.org/D101284
-
Jessica Clarke authored
Revert "[SelectionDAG][Mips][PowerPC][RISCV][WebAssembly] Teach computeKnownBits/ComputeNumSignBits about atomics" This seems to have broken sanitizers, giving lots of Assertion `NumBits <= MAX_INT_BITS && "bitwidth too large"' failed. failures across multiple targets (currently X86 and PowerPC). Reverting until I have a chance to reproduce and debug. This reverts commit 6e876f9d.
-
- May 05, 2021
-
-
Guillaume Chatelet authored
Current implementation defines LIBC_TARGET_MACHINE with the use of CMAKE_SYSTEM_PROCESSOR. Unfortunately CMAKE_SYSTEM_PROCESSOR is OS dependent and can produce different results. An evidence of this is the various matchers used to detect whether the architecture is x86. This patch normalizes LIBC_TARGET_MACHINE and renames it LIBC_TARGET_ARCHITECTURE. I've added many architectures but we may want to limit ourselves to x86 and ARM. Differential Revision: https://reviews.llvm.org/D101524
-
Fraser Cormack authored
-
Jessica Clarke authored
[SelectionDAG][Mips][PowerPC][RISCV][WebAssembly] Teach computeKnownBits/ComputeNumSignBits about atomics Unlike normal loads these don't have an extension field, but we know from TargetLowering whether these are sign-extending or zero-extending, and so can optimise away unnecessary extensions. This was noticed on RISC-V, where sign extensions in the calling convention would result in unnecessary explicit extension instructions, but this also fixes some Mips inefficiencies. PowerPC sees churn in the tests as all the zero extensions are only for promoting 32-bit to 64-bit, but these zero extensions are still not optimised away as they should be, likely due to i32 being a legal type. This also simplifies the WebAssembly code somewhat, which currently works around the lack of target-independent combines with some ugly patterns that break once they're optimised away. Reviewed By: RKSimon, atanasyan Differential Revision: https://reviews.llvm.org/D101342
-
Vang Thao authored
Fix a bug where buildZExtInReg will create and use a new register instead of using the register from parameter DstOp Res. Reviewed By: arsenm, foad Differential Revision: https://reviews.llvm.org/D101871
-
Sanjay Patel authored
-
Simon Pilgrim authored
Simplifies an upcoming patch diff
-