- Oct 06, 2020
-
-
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).
-
Nikita Popov authored
-
Sam McCall authored
Differential Revision: https://reviews.llvm.org/D88822
-
Mircea Trofin authored
Continuing from D88499, we can now model the normalization function as a virtual member of VirtRegAuxInfo. Note that the default (normalizeSpillWeight) is also used stand-alone in RAGreedy. Differential Revision: https://reviews.llvm.org/D88713
-
Saleem Abdulrasool authored
API Notes are a feature which allows annotation of headers by an auxiliary file that contains metadata for declarations pertaining to the associated module. This enables adding attributes to declarations without requiring modification of the headers, enabling finer grained control for library headers for consumers without having to modify external headers. Differential Revision: https://reviews.llvm.org/D88446 Reviewed By: Richard Smith, Marcel Hlopko
-
David Sherwood authored
I have fixed up a number of warnings resulting from TypeSize -> uint64_t casts and calling getVectorNumElements() on scalable vector types. I think most of the changes are fairly trivial except for those in DAGTypeLegalizer::SplitVecRes_MSTORE I've tried to ensure we create the MachineMemoryOperands in a sensible way for scalable vectors. I have added a CHECK line to the following test: CodeGen/AArch64/sve-split-store.ll that ensures no new warnings are added. Differential Revision: https://reviews.llvm.org/D86928
-
Alexander Shaposhnikov authored
This change fixes the build issue introduced by 32c8435e (detected by the buildbot fuchsia-x86_64-linux). Test plan: make check-all
-
Amara Emerson authored
If a CSEMIRBuilder query hits the instruction at the current insert point, move insert point ahead one so that subsequent uses of the builder don't end up with uses before defs. This fix also shows that AMDGPU was also affected by this bug often, but got away with it because it was using a G_IMPLICIT_DEF before the use. Differential Revision: https://reviews.llvm.org/D88605
-
Simon Pilgrim authored
Use m_Specific instead of m_Value followed by an equality check - we already do this for the similar folds above, it looks like an oversight in rG2b459fe7 where the original pattern match code looked a little different.
-
Amara Emerson authored
This reverts commit 2573cf3c. These seem to break some lit tests.
-
Alexander Shaposhnikov authored
This diff adds support for universal binaries to llvm-objcopy. Test plan: make check-all Differential revision: https://reviews.llvm.org/D88400
-
Qiu Chaofan authored
This reverts partial of a2fb5446 (actually, 2508ef01) about removing negated FP constant immediately if it has no uses. However, as discussed in bug 47517, there're cases when NegX is folded into constant from other places while NegY is removed by that line of code and NegX is equal to NegY. In these cases, NegX is deleted before used and crash happens. So revert the code and add necessary test case.
-
Simon Pilgrim authored
This was already #if'd out when it was added back in 2010 at rG18d7fc8f and has never been touched since.
-