- Jan 28, 2021
-
-
Stanislav Mekhanoshin authored
We cannot call LRM::unassign() if LRM::assign() was never called before, these are symmetrical calls. There are two ways of assigning a physical register to virtual, via LRM::assign() and via VRM::assignVirt2Phys(). LRM::assign() will call the VRM to assign the register and then update LiveIntervalUnion. Inline spiller calls VRM directly and thus LiveIntervalUnion never gets updated. A call to LRM::unassign() then asserts about inconsistent liveness. We have to note that not all callers of the InlineSpiller even have LRM to pass, RegAllocPBQP does not have it, so we cannot always pass LRM into the spiller. The only way to get into that spiller LRE_DidCloneVirtReg() call is from LiveRangeEdit::eliminateDeadDefs if we split an LI. This patch refuses to reassign a LiveInterval created by a split to workaround the problem. In fact we cannot reassign a spill anyway as all registers of the needed class are occupied and we are spilling. Fixes: SWDEV-267996 Differential Revision: https://reviews.llvm.org/D95489
-
Fangrui Song authored
[llvm-c] Move LLVMX86_AMXTypeKind & LLVMPoisonValueValueKind to the bottom to avoid value changes compared with LLVM<=11 Fixes PR48905
-
Richard Smith authored
the changes were reverted.
-
Teresa Johnson authored
Identify dynamically exported symbols (--export-dynamic[-symbol=], --dynamic-list=, or definitions needed to preempt shared objects) and prevent their LTO visibility from being upgraded. This helps avoid use of whole program devirtualization when there may be overrides in dynamic libraries. Differential Revision: https://reviews.llvm.org/D91583
-
peter klausler authored
Make the #include "file" preprocessing directive begin its search in the same directory as the file containing the directive, as other preprocessors and our Fortran INCLUDE statement do. Avoid current working directory for all source files except the original. Resolve tests. Differential Revision: https://reviews.llvm.org/D95481
-
Nico Weber authored
Follow-up to D17444. Fixes PR48904. See bug for details. Differential Revision: https://reviews.llvm.org/D95559
-
Roman Lebedev authored
This fully de-pessimizes the common case of no indirectbr's, (where we don't actually need to do anything to preserve domtree) and avoids domtree recomputation in the case there were indirectbr's. Note that two indirectbr's could have a common successor, and not all successors of an indirectbr's are meant to survive the expansion. Though, the code assumes that an indirectbr's doesn't have duplicate successors, those *should* have been deduplicated by simplifycfg or something already.
-
Jessica Paquette authored
We are allowed to store 128-bit-wide values using the q registers on AArch64. GlobalISel was clamping the number of elements in vector stores into 64 bits instead. This results in some poor codegen like below: https://godbolt.org/z/E56dq8 ``` ; SDAG uses a stp + q registers in both cases here. define void @float(<16 x float> %val, <16 x float>* %ptr) { store <16 x float> %val, <16 x float>* %ptr ret void } define void @double(<8 x double> %val, <8 x double>* %ptr) { store <8 x double> %val, <8 x double>* %ptr ret void } ``` This adds similar legalization for vector stores with s8 and s16 elements. Differential Revision: https://reviews.llvm.org/D95107
-
Shilei Tian authored
D95466 dropped CUDA to build NVPTX deviceRTL and enabled it by default. However, the building requires some libraries that are not available on non-CUDA system by default, which could break the compilation. This patch disabled the build by default. It can be enabled with `LIBOMPTARGET_BUILD_NVPTX_BCLIB=ON`. Reviewed By: kparzysz Differential Revision: https://reviews.llvm.org/D95556
-
David Blaikie authored
Experimental, using non-existent DWARF support to use an expr for the location involving an addr_index (to compute address + offset so addresses can be reused in more places). The global variable debug info had to be deferred until the end of the module (so bss variables would all be emitted first - so their labels would have the relevant section). Non-bss variables seemed to not have their label assigned to a section even at the end of the module, so I didn't know what to do there. Also, the hashing code is broken - doesn't know how to hash these expressions (& isn't hashing anything inside subprograms, which seems problematic), so for test purposes this change just skips the hash computation. (GCC's actually overly sensitive in its hash function, it seems - I'm forgetting the specific case right now - anyway, we might want to just use the frontend-known file hash and give up on optimistic .dwo/.dwp reuse)
-
James Y Knight authored
The Clang enable_if extension is mangled as an <extended-qualifier>, which is supposed to contain <template-args>. However, we were unconditionally emitting X/E around its arguments, neglecting the fact that <expr-primary> should be emitted directly without the surrounding X/E. Differential Revision: https://reviews.llvm.org/D95488
-
James Y Knight authored
Previously, we were emitting an extraneous X .. E in <template-arg> around an <expr-primary> if the template argument was constructed from an expression (rather than an already-evaluated literal value). In such a case, we would then e.g. emit 'XLi0EE' instead of 'Li0E'. We had one special-case for DeclRefExpr expressions, in particular, to omit them the mangled-name without the surrounding X/E. However, unfortunately, that special case also triggered for ParmVarDecl (a subtype of VarDecl), and _incorrectly_ emitted 'L_Z .. E' instead of the proper 'Xfp_E'. This change causes mangleExpression itself to be responsible for emitting X/E around non-primary expressions, which removes the special-case, and corrects both these problems. Differential Revision: https://reviews.llvm.org/D95487
-
James Y Knight authored
The two operations have acted differently since Clang 8, but were unfortunately mangled the same. The new mangling uses new "vendor extended expression" syntax proposed in https://github.com/itanium-cxx-abi/cxx-abi/issues/112 GCC had the same mangling problem, https://gcc.gnu.org/PR88115, and will hopefully be switching to the same mangling as implemented here. Additionally, fix the mangling of `__uuidof` to use the new extension syntax, instead of its previous nonstandard special-case. Adjusts the demangler accordingly. Differential Revision: https://reviews.llvm.org/D93922
-
Craig Topper authored
RISCVBaseInfo.h belongs to the MC layer, but the Pseudo instructions are only used by the CodeGen layer. So it makes sense to keep this table in the CodeGen layer.
-
Richard Smith authored
More study has discovered this to not actually be useful: because current C++20 implementations reject `#ifdef __VA_OPT__`, this can't really be used as a feature-test mechanism. And it's not too hard to detect __VA_OPT__ without this, for example: #define THIRD_ARG(a, b, c, ...) c #define HAS_VA_OPT(...) THIRD_ARG(__VA_OPT__(,), 1, 0, ) #if HAS_VA_OPT(?) Partially reverts 0436ec21.
-
Varun Gandhi authored
Previously, Clang was able to mangle the Swift calling convention but 'MicrosoftDemangle.cpp' was not able to demangle it. Reviewed By: compnerd, rnk Differential Revision: https://reviews.llvm.org/D95053
-
Vyacheslav Chigrin authored
Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D95431
-
Evgenii Stepanov authored
Wrong author name, will recommit shortly. This reverts commit 262c5085.
-
David Green authored
-
Walter Erquinigo authored
stella.stemenova mentioned in https://reviews.llvm.org/D93951 failures on Windows for this test. I'm fixing the macro definitions and disabling the tests for python versions lower than 3.7. I'll figure out that actual issue with python3.6 after the buildbots are fine again.
-
Evgenii Stepanov authored
Patch by Vyacheslav Chigrin. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D95431
-
Aaron Ballman authored
We're testing the parsing behavior, not the actual attributes used, and the attribute name cannot be elided for __declspec attributes.
-
Siva Chandra authored
-
Aaron Ballman authored
-
Kostya Kortchinsky authored
With D92696, the Scudo Standalone GWP-ASan flag parsing was changed to the new GWP-ASan optional one. We do not necessarily want this, as this duplicates flag parsing code in Scudo Standalone when using the GWP-ASan integration. This CL reverts the changes within Scudo Standalone, and increases `MaxFlags` to 20 as an addionnal option got us to the current max. Differential Revision: https://reviews.llvm.org/D95542
-
Richard Smith authored
These changes are intended to give code a path to move away from the GNU ,##__VA_ARGS__ extension, which is non-conforming in some situations and which we'd like to disable in our conforming mode in those cases.
-
Aaron Ballman authored
In Clang today, we parse the different attribute syntaxes (__attribute__, __declspec, and [[]]) in a fairly rigid order. This leads to confusion for users when they guess the order incorrectly, and leads to bug reports like PR24559 or necessitates changes like D94788. This patch adds a helper function to allow us to more easily parse attributes in arbitrary order, and then updates all of the places where we would parse two or more different syntaxes in a rigid order to use the helper method. The patch does not attempt to handle Microsoft attributes ([]) because those are ambiguous with other code constructs and we don't have any attributes that use the syntax.
-
Peyton, Jonathan L authored
When OMP_PLACES contains an invalid value, the warning informs the user that the fallback is OMP_PLACES=threads, but the actual internal setting is OMP_PLACES=cores and is detected as such with KMP_SETTINGS=1. This patch informs the user that OMP_PLACES=cores is being used instead of OMP_PLACES=threads. Differential Revision: https://reviews.llvm.org/D95170
-
Peyton, Jonathan L authored
This patch adds the new algorithm for topology discovery using cpuid leaf 1f. Only the new die level is detected and integrated into the current affinity mechanisms including KMP_AFFINITY (granularity level and compact/scatter algorithm), OMP_PLACES=dies, and KMP_HW_SUBSET. Differential Revision: https://reviews.llvm.org/D95157
-
Peyton, Jonathan L authored
HWLOC 2.0 has numa nodes as separate children and are not in the main parent/child topology tree anymore. This change takes this into account. The main topology detection loop in the create_hwloc_map() routine starts at a hardware thread within the initial affinity mask and goes up the topology tree setting the socket/core/thread labels correctly. This change also introduces some of the more generic changes that the future kmp_topology_t structure will take advantage of including a generic ratio & count array (finding all ratios of topology layers like threads/core cores/socket and finding all counts of each topology layer), generic radix1 reduction step, generic uniformity check, and generic printing of topology (en_US.txt) Differential Revision: https://reviews.llvm.org/D95156
-
Craig Topper authored
-
Siva Chandra authored
-
Craig Topper authored
-Remove the ISD opcode for READ_VL. Just emit the MachineSDNode directly. -Move segmented fault first only load intrinsic handling completely to RISCVISelDAGToDAG.cpp and emit the ReadVL MachineSDNode there instead of lowering to ISD opcodes first.
-
Jessica Clarke authored
Strangely int_lib.h only includes stdint.h and not stddef.h, so we need to include the latter to be able to use size_t here.
-
Jessica Clarke authored
This fixes the implementation for architectures like CHERI with strong pointer provenance (pointers, and thus uintptr_t, are represented as hardware capabilities). Specifically, adding two uintptr_t's together (as is done for `start + length` and `funcStart + landingPad`) has ambiguous provenance, whereas using a plain integer (such as size_t) for the offset operand does not. Also, readULEB128 is creating a plain integer, not a pointer. On all currently-supported architectures this should be an NFC, as size_t and uintptr_t end up being the same underlying plain integer type. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D95537
-
Sanjay Patel authored
I am trying to untangle the fast-math-flags propagation logic in the vectorizers (see a6f02212 for SLP). The loop vectorizer has a mix of checking FP function attributes, IR-level FMF, and just wrong assumptions. I am trying to avoid regressions while fixing this, and I think the IR-level logic is good enough for that, but it's hard to say for sure. This would be the 1st step in the clean-up. The existing test that I changed to include 'fast' actually shows a miscompile: the function only had the equivalent of nnan, but we created new instructions that had fast (all FMF set). This is similar to the example in https://llvm.org/PR35538 Differential Revision: https://reviews.llvm.org/D95452
-
Siva Chandra authored
-
Marco Vanotti authored
The `zx_vmar_op_range` allows us to decommit memory pages without needing a handle to the underlying vmo, as long as we have a handle to a vmar that contains this mapping. This allows us to implement the `ReleaseMemoryPagesToOS` function by decommitting the memory using a handle to the root vmar. Reviewed By: mcgrathr Differential Revision: https://reviews.llvm.org/D95384
-
Julian Lettner authored
Use an enum to more explicitly represent the test execution order.
-
Reid Kleckner authored
This reverts commit f4537935. This reverts commit b43c26d0. This GNU and MSVC extension turns out to be very popular. Most projects are not using C++20, so cannot use the new __VA_OPT__ feature to be standards conformant. The other workaround, using -std=gnu*, enables too many language extensions and isn't viable. Until there is a way for users to get the behavior provided by the `, ## __VA_ARGS__` extension in the -std=c++17 and earlier language modes, we need to revert this.
-