- Jul 06, 2022
-
-
Alex Bradbury authored
Previously WebAssemblyCFGStackify, WebAssemblyInstrInfo, and WebAssemblyPeephole all had equivalent logic for this. Move it into a common helper in WebAssemblyUtilities.
-
Nikita Popov authored
This addresses the assertion failure reported in https://reviews.llvm.org/D124159#3631240. I believe that this limitation in SplitBlockPredecessors is not actually necessary (because unlike with indirectbr, callbr is restricted in a way that does allow updating successors), but for now fix the assertion failure the same way we do everywhere else, by also skipping callbr.
-
Sam McCall authored
-
Alexey Bader authored
-
Sam McCall authored
Differential Revision: https://reviews.llvm.org/D129158
-
Sam McCall authored
Building preambles is the most resource-intensive thing clangd does, driving peak RAM and sustained CPU usage. In a hosted environment where multiple clangd instances are packed into the same container, it's useful to be able to limit the *aggregate* resource peaks. Differential Revision: https://reviews.llvm.org/D129100
-
Alex Bradbury authored
There's no need for WebAssemblyMCInstLower to carry its own functionally equivalent implementation.
-
Bruno De Fraine authored
This is a fix for the miscompilation reported in https://github.com/llvm/llvm-project/issues/55384 Not adding a new test case since existing test cases already cover base classes (including new-struct-path tbaa). Reviewed By: jeroen.dobbelaere Differential Revision: https://reviews.llvm.org/D126956
-
Dominik Adamski authored
This patch adds if clause to OpenMP TableGen for simd construct. Reviewed By: peixin Differential Revision: https://reviews.llvm.org/D128940 Signed-off-by:
Dominik Adamski <dominik.adamski@amd.com>
-
David Spickett authored
The "+all" feature name was added in https://reviews.llvm.org/D128029. This feature means we don't have to generate a list of features or use a base architecture feature. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D129177
-
Nikolas Klauser authored
This way we ensure that we don't use-after-move the iterators. Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D129044
-
Nikolas Klauser authored
Both clang and GCC support using `__has_builtin` for detecting compiler-provided type_traits. Use it instead of `__has_keyword` or `__has_feature` to remove special-casing for GCC-provided builtins Reviewed By: ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D129056
-
Sunho Kim authored
Implements TLS descriptor relocations in JITLink ELF/AARCH64 backend and support the relevant runtime functions in ELFNixPlatform. Unlike traditional TLS model, TLS descriptor model requires linker to return the "offset" from thread pointer via relocaiton not the actual pointer to thread local variable. There is no public libc api for adding new allocations to TLS block dynamically which thread pointer points to. So, we support this by taking delta from thread base pointer to the actual thread local variable in our allocated section. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D128601
-
Dimitrije Milosevic authored
Building the compiler-rt's AddressSanitizer for the n32 MIPS ABI currently fails, due to a few reasons: - defined(__mips64), which is set solely based on the architecture type (32-bit/64-bit), was still used in some places. Therefore, defined(__mips64) is swapped with SANITIZER_MIPS64, which takes the ABI into account as well - defined(__mips64) && _MIPS_SIM == ABI64. - The n32 ABI still uses 64-bit *Linux* system calls, even though the word size is 32 bits. - After the transition to canonical system calls (D124212), the n32 ABI still didn't use them, even though they are supported. Differential Revision: https://reviews.llvm.org/D127098 -
Dimitrije Milosevic authored
Currently, LLVM doesn't have the correct shadow offset mapping for the n32 ABI. This patch introduces the correct shadow offset value for the n32 ABI - 1ULL << 29. Differential Revision: https://reviews.llvm.org/D127096
-
Markus Böck authored
Prior to this patch, using any kind of interface (op interface, attr interface, type interface) as the key of a llvm::DenseSet, llvm::DenseMap or other related containers, leads to invalid pointer dereferences, despite compiling. The gist of the problem is that a llvm::DenseMapInfo specialization for the base type (aka one of Operation*, Type or Attribute) are selected when using an interface as a key, which uses getFromOpaquePointer with invalid pointer addresses to construct instances for the empty key and tombstone key values. The interface is then constructed with this invalid base type and an attempt is made to lookup the implementation in the interface map, which then dereferences the invalid pointer address. (For more details and the exact call chain involved see the GitHub issue below) The current workaround is to use the more generic base type (eg. instead of DenseSet<FunctionOpInterface>, DenseSet<Operation*>), but this is strictly worse from a code perspective (doesn't enforce the invariant, code is less self documenting, having to insert casts etc). This patch fixes that issue by defining a DenseMapInfo specialization of Interface subclasses which uses a new constructor to construct an instance without querying a concept. That allows getEmptyKey and getTombstoneKey to construct an interface with invalid pointer values. Fixes https://github.com/llvm/llvm-project/issues/54908 Differential Revision: https://reviews.llvm.org/D129038
-
Jay Foad authored
This test previously had some -global-isel RUN lines, but others were in a separate test file in GlobalISel/.
-
Weining Lu authored
These operations include sdiv/udiv/srem/urem. As the ISA [https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_div_wudu_mod_wudu] described, when the divisor is 0, the result can be any value, but no exception will be triggered. Unlike gcc, which by default emit code that checks divide-by-zero after the division or modulus instruction, we only emit this check when the `-loongarch-check-zero-division` option is passed. Differential Revision: https://reviews.llvm.org/D128572
-
Jay Foad authored
-
wanglei authored
Add LoongArch assembly scrubbing and triple support to update_llc_test_checks. Depends on D128432 Reviewed By: MaskRay, xen0n Differential Revision: https://reviews.llvm.org/D128433
-
Martin Storsjö authored
When an object file returns multiple architectures, it is treated as a fat binary - which really isn't the case of i386 vs i686 where the object file actually has one architecture. This allows getting rid of hardcoded architecture triples in PlatformWindows. The parallel i386 and i686 architecture strings stem from 5e6f4520 / D7120 and ad587ae4 / D4658. Differential Revision: https://reviews.llvm.org/D128617
-
Nikita Popov authored
As constant expressions can no longer trap, it only makes sense to call isSafeToSpeculativelyExecute on Instructions, so limit the API to accept only them, rather than general Operators or Values.
-
Lucas Prates authored
This adds a release note entry for the new -mframe-chain option introduced on D125094. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D129085
-
Chenbing Zheng authored
extractelement (bitcast (insertelement (Vec, b)), a) -> extractelement (bitcast (Vec), a) Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D128890
-
Thomas Symalla authored
This patch removes a bit of code duplication and moves the v_cmpx optimization out of the runOnMachineFunction pass. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D129086
-
Nikita Popov authored
-
Nikita Popov authored
-
David Spickett authored
For example the predres extension adds one instruction that is a sys alias. Previously this wasn't disassembled properly with "+all". This was because a check for "+all" was added to haveFeatures in AArch64SysReg but not in SysAlias. Reviewed By: MaskRay, lenary Differential Revision: https://reviews.llvm.org/D129147
-
Nikita Popov authored
As integer div/rem constant expressions are no longer supported, constants can no longer trap and are always safe to speculate. Remove the Constant::canTrap() method and its usages.
-
Nikita Popov authored
D128820 stopped creating div/rem constant expressions by default; this patch removes support for them entirely. The getUDiv(), getExactUDiv(), getSDiv(), getExactSDiv(), getURem() and getSRem() on ConstantExpr are removed, and ConstantExpr::get() now only accepts binary operators for which ConstantExpr::isSupportedBinOp() returns true. Uses of these methods may be replaced either by corresponding IRBuilder methods, or ConstantFoldBinaryOpOperands (if a constant result is required). On the C API side, LLVMConstUDiv, LLVMConstExactUDiv, LLVMConstSDiv, LLVMConstExactSDiv, LLVMConstURem and LLVMConstSRem are removed and corresponding LLVMBuild methods should be used. Importantly, this also means that constant expressions can no longer trap! This patch still keeps the canTrap() method to minimize diff -- I plan to drop it in a separate NFC patch. Differential Revision: https://reviews.llvm.org/D129148
-
Nikita Popov authored
The div/rem constant expressions are going away in D129148. Convert some tests to use InstSimplify instead, to show that the constant folding still happens.
-
wanglei authored
Differential Revision: https://reviews.llvm.org/D128432
-
Nikita Popov authored
There was a lot of unnecessary code here. Add the -O0 flag to avoid using constant expressions, otherwise it may get folded away during EarlyCSE. Verified that this test fails prior to the fixing commit.
-
wanglei authored
Ensure callee-saved registers are accessed relative to the stackpointer. Differential Revision: https://reviews.llvm.org/D128430
-
Adrian Kuegel authored
-
Fangrui Song authored
In the majority of cases (e.g. orphan sections), an OutputSection has at most one InputSectionDescription (isd). By changing the return type to ArrayRef<InputSection *> we can just reference the isd->sections. For OutputSections with more than one InputSectionDescription we use a caller provided SmallVector to copy the elements as before. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D129111
-
Carl Ritson authored
Merge tests and fixes from D128110 and D128315 on top of already committed D128800. Original author: arsenm Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D128882
-
Elvina Yakubova authored
Changed acquire implemetaion to __atomic_test_and_set() and release to __atomic_clear() so it eliminates inline asm usage and is arch independent. Elvina Yakubova, Advanced Software Technology Lab, Huawei Reviewers: yota9, maksfb, rafauler Differential Revision: https://reviews.llvm.org/D129162
-
Alex Bradbury authored
Use the isExternRefType and isFuncRefType helpers rather than reimplementing that logic in this function (which acts as a blocker to work to prototype alternative IR-level representations of reference types). This relands 8ccc7e0a (which had compilation errors).
-
Alex Bradbury authored
This reverts commit 8ccc7e0a. Wrong version of the patch was pushed.
-