- Oct 06, 2020
-
-
Richard Smith authored
Ensure that we evaluate assignment and compound-assignment right-to-left, and array subscripting left-to-right. Fixes PR47724.
-
Richard Smith authored
evaluation diagnostics.
-
Arthur Eubanks authored
This makes the NPM skip not required passes on functions marked optnone. If this causes a pass that should be required but has not been marked required to be skipped, add `static bool isRequired() { return true; }` to the pass class. AlwaysInlinerPass is an example. clang/test/CodeGen/O0-no-skipped-passes.c is useful for checking that no passes are skipped under -O0. The -enable-npm-optnone option will be removed once this has been stable for long enough without issues. Reviewed By: ychen, asbirlea Differential Revision: https://reviews.llvm.org/D87869 -
Mircea Trofin authored
Factored out the logging facility, to allow its reuse outside the inliner. Differential Revision: https://reviews.llvm.org/D88770
-
Carl Ritson authored
Refactor exit block creation to a single call ensureEarlyExitBlock. Add support for generating an early exit block which clears the exec mask, but only add this instruction when required. These changes are to facilitate adding more forms of early termination for PS shaders in the near future. Reviewed By: nhaehnle Differential Revision: https://reviews.llvm.org/D88775
-
Carl Ritson authored
When unbundling COPY bundles in VirtRegRewriter the start of the bundle is not correctly referenced in the unbundling loop. The effect of this is that unbundled instructions are sometimes inserted out-of-order, particular in cases where multiple reordering have been applied to avoid clobbering dependencies. The resulting instruction sequence clobbers dependencies. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D88821
-
Evandro Menezes authored
Fix test for the SiFive E76 core. This patch fixes the issue introduced by the commit 5d6d8a27.
-
Mircea Trofin authored
This separates the two concerns - encapsulation of traversal order; and iteration. Differential Revision: https://reviews.llvm.org/D88256
-
Louis Dionne authored
Instead of using ad-hoc mechanisms to disable the tests in C++ < 14, use UNSUPPORTED markup.
-
Jim Ingham authored
This was looking at the privateState, but it's possible that the actual process has started up and then stopped again by the time we get to the check, which would lead us to get out of running the stop hooks too early. Instead we need to track the intention of the stop hooks directly. Differential Revision: https://reviews.llvm.org/D88753
-
Greg Clayton authored
Register context information was already being passed into the DWARFDebugFrame code that dumps unwind information but it wasn't being used. This change adds the ability to dump registers names of a valid MC register context was passed in and if it knows about the register. Updated the tests to use the newly returned register names. Differential Revision: https://reviews.llvm.org/D88767
-
Joachim Protze authored
The test disables suppression and therefore sometimes triggers a know false positive in the openmp runtime. The test should only verify that the env var is handles as expected.
-
Alex Richardson authored
This is flagged by PyCharm and can cause subtle bugs. While changing this also re-sort the imports and add missing ones. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D88816
-
Craig Topper authored
This and its friend X86ISD::LCMPXCHG8_SAVE_RBX_DAG are used if we need to avoid clobbering the frame pointer in EBX/RBX. EBX/RBX are only used a frame pointer in 64-bit mode. In 64-bit mode we don't use CMPXCHG8B since we have a GR64 cmpxchg available. So we don't need special handling for LCMPXCHG8B. Split from D88808 Differential Revision: https://reviews.llvm.org/D88853
-
Craig Topper authored
getNode handling for ISD:SETCC calls FoldSETCC which can canonicalize FP constants to the RHS. When this happens we should create the node with the FMF that was requested. By using FlagInserter when can ensure any calls to getNode/getSetcc during canonicalization will also get the flags. Differential Revision: https://reviews.llvm.org/D88063
-
Fangrui Song authored
Patch by pi1024e (email unavailable) Differential Revision: https://reviews.llvm.org/D82593
-
Vedant Kumar authored
This reverts commit 20797989. This patch (https://reviews.llvm.org/D69257) cannot complete a stage2 build due to the change: ``` CI->getCalledFunction()->getName().contains("longjmp") ``` There are several concrete issues here: - The callee may not be a function, so `getCalledFunction` can assert. - The called value may not have a name, so `getName` can assert. - There's no distinction made between "my_longjmp_test_helper" and the actual longjmp libcall. At a higher level, there's a serious layering problem here. The splitting pass makes policy decisions in a general way (e.g. based on attributes or profile data). Special-casing certain names breaks the layering. It subverts the work of library maintainers (who may now need to opt-out of unexpected optimization behavior for any affected functions) and can lead to inconsistent optimization behavior (as not all llvm passes special-case ".*longjmp.*" in the same way). The patch may need significant revision to address these issues. But the immediate issue is that this crashes while compiling llvm's unit tests in a stage2 build (due to the `getName` problem).
-
Cameron McInally authored
-
ergawy authored
Adds support for SPIR-V composite speciailization constants to spv._reference_of. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D88732
-
Roman Lebedev authored
[InstCombine] Revert rL226781 "Teach InstCombine to canonicalize loads which are only ever stored to always use a legal integer type if one is available." (PR47592) (it was introduced in https://lists.llvm.org/pipermail/llvm-dev/2015-January/080956.html) This canonicalization seems dubious. Most importantly, while it does not create `inttoptr` casts by itself, it may cause them to appear later, see e.g. D88788. I think it's pretty obvious that it is an undesirable outcome, by now we've established that seemingly no-op `inttoptr`/`ptrtoint` casts are not no-op, and are no longer eager to look past them. Which e.g. means that given ``` %a = load i32 %b = inttoptr %a %c = inttoptr %a ``` we likely won't be able to tell that `%b` and `%c` is the same thing. As we can see in D88789 / D88788 / D88806 / D75505, we can't really teach SCEV about this (not without the https://bugs.llvm.org/show_bug.cgi?id=47592 at least) And we can't recover the situation post-inlining in instcombine. So it really does look like this fold is actively breaking otherwise-good IR, in a way that is not recoverable. And that means, this fold isn't helpful in exposing the passes that are otherwise unaware of these patterns it produces. Thusly, i propose to simply not perform such a canonicalization. The original motivational RFC does not state what larger problem that canonicalization was trying to solve, so i'm not sure how this plays out in the larger picture. On vanilla llvm test-suite + RawSpeed, this results in increase of asm instructions and final object size by ~+0.05% decreases final count of bitcasts by -4.79% (-28990), ptrtoint casts by -15.41% (-3423), and of inttoptr casts by -25.59% (-6919, *sic*). Overall, there's -0.04% less IR blocks, -0.39% instructions. See https://bugs.llvm.org/show_bug.cgi?id=47592 Differential Revision: https://reviews.llvm.org/D88789
-
peter klausler authored
The sign of the scaling factor was misinterpreted for output as meaning what it does for input. To be correct, they should cancel each other out. print '(1P,F4.3)', 1. ! printed 0.1 but should print 10.0 Differential revision: https://reviews.llvm.org/D88610
-
Evandro Menezes authored
Add the SiFive cores E76 and U74 using the SiFive 7 series microarchitecture. Differential Revision: https://reviews.llvm.org/D88759
-
Evandro Menezes authored
Fix a mistake in the ordering.
-
Louis Dionne authored
We might end up including more headers than strictly necessary this way, but it's much simpler and it makes it easier to port thread.cpp to systems not handled by the existing conditionals.
-
Louis Dionne authored
Some system headers define __constructor and __destructor macros (for Clang attributes constructor and destructor). While this is badly behaved, it is easy for libc++ to work around this issue.
-
Louis Dionne authored
-
Dávid Bolvanský authored
This reverts commit 3f1fd59d.
-
Dávid Bolvanský authored
As reported in PR46735: void* f(void *d, const void *s, size_t l) { return __builtin___mempcpy_chk(d, s, l, __builtin_object_size(d, 0)); } This can be optimized to `return mempcpy(d, s, l);`. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D86019 -
Louis Dionne authored
These tests were only being run when _LIBCPP_DEBUG was defined, which isn't the case by default when we run the test suite. In other words, all these debug mode tests were never being run. This commit makes sure they are run, and in some cases, extracts them into a file under test/libcxx to separate them from the Standard tests. Differential Revision: https://reviews.llvm.org/D88836
-
peter klausler authored
The binary values that produce the most significant decimal digits in an exact conversion are those with the least normal biased exponent (1) and all fractional bits set, not the least-valued subnormals. So the binary->decimal conversion buffer sizes were a little short, and could cause a overrun crash. Differential revision: https://reviews.llvm.org/D88688
-
Martin Storsjö authored
If a version is specified both with --{major,minor}-subsystem-version and with --subsystem <name>:<version>, the one specified last (that actually sets a version) takes precedance in GNU ld; thus doing the same here. Differential Revision: https://reviews.llvm.org/D88804 -
Martin Storsjö authored
As they can be set independently after D88802, we can get rid of a bit of extra code - simplifying the logic here before adding more complication to it later. Differential Revision: https://reviews.llvm.org/D88803
-
Martin Storsjö authored
The MinGW driver has separate options for OS and subsystem version. Having this available in lld-link allows the MinGW driver to both match GNU ld better and simplifies the code for merging two (potentially mismatching) arguments into one. Differential Revision: https://reviews.llvm.org/D88802
-
Martin Storsjö authored
Parse the components as decimal, instead of decuding the base from the string. This avoids ambiguity if the second number contains leading zeros, which previously were parsed as indicating an octal number. MS link.exe doesn't support hexadecimal numbers in the version numbers, neither in /version nor in /subsystem. Differential Revision: https://reviews.llvm.org/D88801
-
Fangrui Song authored
D17779: host-side shadow variables of external declarations of device-side global variables have internal linkage and are referenced by `__cuda_register_globals`. nvcc from CUDA 11 does not allow `__device__ inline` or `__device__ constexpr` (C++17 inline variables) but clang has incorrectly supported them for a while: ``` error: A __device__ variable cannot be marked constexpr error: An inline __device__/__constant__/__managed__ variable must have internal linkage when the program is compiled in whole program mode (-rdc=false) ``` If such a variable (which has a comdat group) is discarded (a copy from another translation unit is prevailing and selected), accessing the variable from outside the section group (`__cuda_register_globals`) is a violation of the ELF specification and will be rejected by linkers: > A symbol table entry with STB_LOCAL binding that is defined relative to one of a group's sections, and that is contained in a symbol table section that is not part of the group, must be discarded if the group members are discarded. References to this symbol table entry from outside the group are not allowed. As a workaround, don't register such inline variables for now. (If we register the variables in all TUs, we will keep multiple instances of the shadow and break the C++ semantics for inline variables). We should reject such variables in Sema but our internal users need some time to migrate. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D88786
-
Roman Lebedev authored
-
Jon Roelofs authored
-
Dave Lee authored
Add preconditions to `TestBase.expect()` that catch semantically invalid calls that happen to succeed anyway. This also fixes the broken callsites caught by these checks. This prevents the following incorrect calls: 1. `self.expect("lldb command", "some substr")` 2. `self.expect("lldb command", "assert message", "some substr")` Differential Revision: https://reviews.llvm.org/D88792 -
Fangrui Song authored
... by using MapVector. The issue was caused by 63182c2a. Also use stable_partition instead of partition to get stable results across different STL implementations.
-
Nikita Popov authored
When retrying the "simplify with operand replaced" select optimization without poison flags, also handle inbounds on GEPs. Of course, this particular example would also be safe to transform while keeping inbounds, but the underlying machinery does not know this (yet).
-