- May 06, 2021
-
-
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
-
Simon Pilgrim authored
Simplifies an upcoming patch diff
-
Simon Pilgrim authored
Simplifies an upcoming patch diff
-
Baptiste Saleil authored
-
Tobias Gysi authored
The old index op handling let the new index operations point back to the producer block. As a result, after fusion some index operations in the fused block had back references to the old producer block resulting in illegal IR. The patch now relies on a block and value mapping to avoid such back references. Differential Revision: https://reviews.llvm.org/D101887
-
Pushpinder Singh authored
The offload action is used in four different ways as explained in Driver.cpp:4495. When -c is present, the final phase will be assemble (linker when -c is not present). However, this phase is skipped according to D96769 for amdgcn. So, offload action arrives into following situation, compile (device) ---> offload ---> offload without -c the chain looks like, compile (device) ---> offload ---> linker (device) ---> offload The former situation creates an unhandled case which causes problem. The solution presented in this patch delays the D96769 logic until job creation time. This keeps the offload action in the 1 of the 4 specified situations. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D101901
-
Anirudh Prasad authored
- As per the HLASM support we are providing, i.e. support only for the first parameter of the inline asm block, only pertaining to Z machine instructions defined in LLVM, character literals and string literals are not supported (see Figure 4 - https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc264940/$file/asmr1023.pdf for more information) - This patch explicitly rejects the usage of char literals and string literals (for example "abc 'a'") when the relevant field is set - This is achieved by introducing a field called `LexHLASMStrings` in MCAsmLexer similar to `LexMasmStrings` Reviewed By: abhina.sreeskantharajan, Kai Differential Revision: https://reviews.llvm.org/D101660
-
Stelios Ioannou authored
This patch fixes an issue where a pre-indexed store e.g., STR x1, [x0, #24]! with a store like STR x0, [x0, #8] are merged into a single store: STP x1, x0, [x0, #24]! . They shouldn’t be merged because the second store uses x0 as both the stored value and the address and so it needs to be using the updated x0. Therefore, it should not be folded into a STP <>pre. Additionally a new test case is added to verify this fix. Differential Revision: https://reviews.llvm.org/D101888 Change-Id: I26f1985ac84e970961e2cdca23c590fa6773851a
-
Anastasia Stulova authored
Added __cl_clang_non_portable_kernel_param_types extension that allows using non-portable types as kernel parameters. This allows bypassing the portability guarantees from the restrictions specified in C++ for OpenCL v1.0 s2.4. Currently this only disables the restrictions related to the data layout. The programmer should ensure the compiler generates the same layout for host and device or otherwise the argument should only be accessed on the device side. This extension could be extended to other case (e.g. permitting size_t) if desired in the future. Patch by olestrohm (Ole Strohm)! https://reviews.llvm.org/D101168
-
Jinsong Ji authored
Mips tests are using -march in RUN lines, this will fail on AIX OS , when we get the mips-ibm-aix triple. This is caused/exposed recently due to https://reviews.llvm.org/D101194 changed the default getMultiarchTriple in toolchain. Update the tests to use -mtriple instead to avoid unintended failures. Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D101863
-
Abhina Sreeskantharajan authored
My previous patch https://reviews.llvm.org/rG1527a5e4b4834e65678f9c30f786a2f4c17932bf incorrectly set int return values instead of std::error_code. This patch correctly returns and std::error_code value. Reviewed By: fanbo-meng, Jonathan.Crowther Differential Revision: https://reviews.llvm.org/D101904
-
Andrew Savonichev authored
This issue was reported in PR50057: Cannot select: t10: i64 = AArch64ISD::VSHL t2, Constant:i32<2> Shift intrinsics (llvm.aarch64.neon.ushl.i64 and sshl) with a constant shift operand are lowered into AArch64ISD::VSHL in tryCombineShiftImm. VSHL has i64 and v1i64 patterns for a right shift, but only v1i64 for a left shift. This patch adds the missing i64 pattern for AArch64ISD::VSHL, and LIT tests to cover scalar variants (i64 and v1i64) of all shift intrinsics (only ushl and sshl cases fail without the patch, others were just not covered). Differential Revision: https://reviews.llvm.org/D101580
-