- Jan 30, 2020
-
-
Matt Arsenault authored
Irritatingly the failure output is different in release vs. debug because of the legality check is removed without asserts, so a register ends up constrained only in release builds.
-
Sean Silva authored
Summary: This will help catch improper use of the MLIR API's. In particular, this catches an error that was manifesting as nondeterministic assertion failures (the nondeterminism was due to the failure happening only when the StorageUniquer's DenseMap's probing happened to compare two specific keys). No test. The fact that all the existing tests pass with this additional invariant gives confidence that it is correct/useful. Differential Revision: https://reviews.llvm.org/D73645
-
Sterling Augustine authored
Summary: gnu addr2line prints DWARF line table discriminators like so: <file>:<line> (discriminator <Number>) This matches that behavior. Document how and when --output-style=GNU prints discriminators Add test for new GNU-style discriminator printing. Reviewers: rupprecht, labath, jhenderson Subscribers: aprantl, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73318
-
Shoaib Meenai authored
I missed the NOT in the condition; this part is actually responsible for passing LLVM_ENABLE_RUNTIMES to the per-target runtime configures, which in turn makes them actually build. I'll put up a more general solution for review, but restore this in the meantime to fix the runtimes build.
-
Nikita Popov authored
For the icmp eq (add X, C1), C2 => icmp eq X, C2-C1 icmp eq (sub C1, X), C2 => icmp eq X, C1-C2 folds, this allows C1 to be non-splat and contain undefs. C2 is still splat, due to the structure of the code. This is to address the remaining part of the regression in D73411, where demanded element analysis replaces some elements with undef. Differential Revision: https://reviews.llvm.org/D73647 -
Nikita Popov authored
-
Amara Emerson authored
[GlobalISel][IRTranslator] Follow convention and put constant offset of getelementptr arithmetic on RHS. We were needlessly putting known constant values on the LHS of a G_MUL, which is suboptimal. Differential Revision: https://reviews.llvm.org/D73650
-
Nico Weber authored
-
Nico Weber authored
-
Huihui Zhang authored
Buildbot failure, revert first while looking at the issue. This reverts commit a5a4a47d.
-
Huihui Zhang authored
There looks to be buildbot failure related. This reverts commit 8bb6c8a2.
-
Huihui Zhang authored
There looks to be buildbot failure related. This reverts commit 91618d94.
-
Fangrui Song authored
For `MC_GlobalAddress` operands referencing **certain** GlobalObjects, we can lower them to STB_LOCAL aliases to avoid costs brought by assembler/linker's conservative decisions about symbol interposition: * An assembler conservatively assumes a global default visibility symbol interposable (ELF semantics). So relocations in object files are needed even if the code generator assumed the definition exact and non-interposable. * The relocations can cause the creation of PLT entries on some targets for -shared links. A linker conservatively assumes a global default visibility symbol interposable (if not otherwise constrained by -Bsymbolic/--dynamic-list/VER_NDX_LOCAL/etc). "certain" refers to GlobalObjects in the intersection of `hasExactDefinition() and !isInterposable()`: `external`, `appending`, `internal`, `private`. Local linkages (`internal` and `private`) cannot be interposed. `appending` is for very few objects LLVM interpret specially. So the set just includes `external`. This patch emits STB_LOCAL aliases (.Lfoo$local) for such GlobalObjects, so that targets can lower MC_GlobalAddress operands to STB_LOCAL aliases if applicable. We may extend the scope and include GlobalAlias in the future. LLVM's existing -fno-semantic-interposition behaviors give us license to do such optimizations: * Various optimizations (ipconstprop, inliner, sccp, sroa, etc) treat normal ExternalLinkage GlobalObjects as non-interposable. * Before D72197, MC resolved a PC-relative VK_None fixup to a non-local symbol at assembly time (no outstanding relocation), if the target is defined in the same section. Put it simply, even if IR optimizations failed to optimize and allowed interposition for the function call in `void foo() {} void bar() { foo(); }`, the assembler would disallow it. This patch sets up AsmPrinter infrastructure to make -fno-semantic-interposition more so. With and without the patch, the object file output should be identical: `.Lfoo$local` does not take a symbol table entry. Reviewed By: sfertile Differential Revision: https://reviews.llvm.org/D73228 -
Sterling Augustine authored
Summary: Add test case for the same. This test case will also serve as a starting point for later symbolizer tests. Reviewers: dblaikie, jdoerfert Subscribers: hiraditya, llvm-commits, jhenderson Tags: #llvm Differential Revision: https://reviews.llvm.org/D73583
-
Simon Pilgrim authored
This handles all the constant splat / opaque testing for us.
-
Huihui Zhang authored
Summary: Scalable vector should not be evaluated element by element. Add support to handle scalable vector UndefValue. Reviewers: sdesmalen, huntergr, spatel, lebedev.ri, apazos, efriedma, willlovett Reviewed By: efriedma Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71445
-
Sam McCall authored
Summary: Previously we mmapped on unix and not on windows: on windows mmap takes an exclusive lock on the file and prevents the user saving changes! The failure mode on linux is a bit more subtle: if the file is changed on disk but the SourceManager sticks around, then subsequent operations on the SourceManager will fail as invariants are violated (e.g. null-termination). This commonly manifests as crashes after switching git branches with many files open in clangd. Nominally mmap is for performance here, and we should be willing to give some up to stop crashing. Measurements on my system (linux+desktop+SSD) at least show no measurable regression on an a fairly IO-heavy workload: drop disk caches, open SemaOverload.cpp, wait for first diagnostics. for i in `seq 100`; do for variant in mmap volatile; do echo 3 | sudo tee /proc/sys/vm/drop_caches /usr/bin/time --append --quiet -o ~/timings -f "%C %E" \ bin/clangd.$variant -sync -background-index=0 < /tmp/mirror > /dev/null done done bin/clangd.mmap -sync -background-index=0 0:07.60 bin/clangd.volatile -sync -background-index=0 0:07.89 bin/clangd.mmap -sync -background-index=0 0:07.44 bin/clangd.volatile -sync -background-index=0 0:07.89 bin/clangd.mmap -sync -background-index=0 0:07.42 bin/clangd.volatile -sync -background-index=0 0:07.50 bin/clangd.mmap -sync -background-index=0 0:07.90 bin/clangd.volatile -sync -background-index=0 0:07.53 bin/clangd.mmap -sync -background-index=0 0:07.64 bin/clangd.volatile -sync -background-index=0 0:07.55 bin/clangd.mmap -sync -background-index=0 0:07.75 bin/clangd.volatile -sync -background-index=0 0:07.47 bin/clangd.mmap -sync -background-index=0 0:07.90 bin/clangd.volatile -sync -background-index=0 0:07.50 bin/clangd.mmap -sync -background-index=0 0:07.81 bin/clangd.volatile -sync -background-index=0 0:07.95 bin/clangd.mmap -sync -background-index=0 0:07.55 bin/clangd.volatile -sync -background-index=0 0:07.65 bin/clangd.mmap -sync -background-index=0 0:08.15 bin/clangd.volatile -sync -background-index=0 0:07.54 bin/clangd.mmap -sync -background-index=0 0:07.78 bin/clangd.volatile -sync -background-index=0 0:07.61 bin/clangd.mmap -sync -background-index=0 0:07.78 bin/clangd.volatile -sync -background-index=0 0:07.55 bin/clangd.mmap -sync -background-index=0 0:07.41 bin/clangd.volatile -sync -background-index=0 0:07.40 bin/clangd.mmap -sync -background-index=0 0:07.54 bin/clangd.volatile -sync -background-index=0 0:07.42 bin/clangd.mmap -sync -background-index=0 0:07.45 bin/clangd.volatile -sync -background-index=0 0:07.49 bin/clangd.mmap -sync -background-index=0 0:07.95 bin/clangd.volatile -sync -background-index=0 0:07.66 bin/clangd.mmap -sync -background-index=0 0:08.04 Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73617 -
Austin Kerbow authored
Reviewers: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73585
-
Jonas Devlieghere authored
lldb\source\Host\windows\Host.cpp(228): error C2440: 'initializing': cannot convert from 'llvm::StringRef' to 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
-
Adrian Prantl authored
-
Adrian Prantl authored
-
Jonas Devlieghere authored
With the conversion between StringRef and std::string now being explicit, converting SmallStrings becomes more tedious. This patch adds an explicit operator so you can write std::string(Str) instead of Str.str().str(). Differential revision: https://reviews.llvm.org/D73640
-
Huihui Zhang authored
Summary: The initialization of RegisterBank needs to be done only once. The logic of AlreadyInit has data race, use llvm::call_once instead. This is continuing work of D73587. Reviewers: arsenm, rovka, dsanders, t.p.northover, efriedma, apazos Reviewed By: arsenm Subscribers: wdng, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73605
-
Huihui Zhang authored
Summary: The initialization of RegisterBank needs to be done only once. The logic of AlreadyInit has data race, use llvm::call_once instead. This is continuing work of D73587. Reviewers: arsenm, tstellar, ronlieb, efriedma, apazos, nhaehnle Reviewed By: nhaehnle Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73604
-
Huihui Zhang authored
Summary: The initialization of RegisterBank needs to be done only once. The logic of AlreadyInit has a data race, use llvm::call_once instead. This issue was identified through thread sanitizer. Reviewers: efriedma, apazos, qcolombet, dsanders Reviewed By: efriedma Subscribers: arsenm, kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73587
-
Eric Fiselier authored
This adds a std::string_view pretty printer for libcxx and updates the gdb pretty printer test. Patch by Ali Tamur (tamur@google.com) Reviewed as https://reviews.llvm.org/D73514
-
Adrian Prantl authored
Differential Revision: https://reviews.llvm.org/D73598
-
Fangrui Song authored
For an out-of-range relocation referencing a non-local symbol, report the symbol name and the object file that defines the symbol. As an example: ``` t.o:(function func: .text.func+0x3): relocation R_X86_64_32S out of range: -281474974609120 is not in [-2147483648, 2147483647] ``` => ``` t.o:(function func: .text.func+0x3): relocation R_X86_64_32S out of range: -281474974609120 is not in [-2147483648, 2147483647]; references func >>> defined in t1.o ``` Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D73518
-
Simon Pilgrim authored
This handles all the constant splat / opaque testing for us.
-
Simon Pilgrim authored
-
Nikita Popov authored
-
Bjorn Pettersson authored
Summary: Since commit c299d198 scudo standalone can't be built without including sys/auxv.h. I do not have that file on my system, and my builds have failed when trying to simply build "all" runtimes. Assuming that "all" means "all possible given the current environment" we need to guard the setting of COMPILER_RT_HAS_SCUDO_STANDALONE=TRUE by first checking if sys/auxv.h can be found. Reviewers: pcc, cryptoad Reviewed By: pcc Subscribers: mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D73631
-
Jonas Devlieghere authored
Only the templated function had logging for deserialization. The string deserializer is implemented as a specialization and now prints to the log as well.
-
Craig Topper authored
ISD::FROUND is defined to round to nearest with ties rounding away from 0. This mode isn't supported in hardware on X86. But as long as we aren't compiling with trapping math, we can emulate this with floor(X + copysign(nextafter(0.5, 0.0), X)). We have to use nextafter to avoid some corner cases that adding 0.5 would have. For example, if X is nextafter(0.5, 0.0) it should round to 0.0, but adding 0.5 would need one extra bit of mantissa than can be stored so it rounds to 1.0. Adding nextafter(0.5, 0.0) instead will just increase the exponent by 1 and leave the mantissa as all 1s. This would be nextafter(1.0, 0.0) which will floor to 0.0. Techically this requires -fno-trapping-math which isn't our default. But if we care about exceptions we should be using constrained intrinsics. Constrained intrinsics would use STRICT_FROUND which won't go through this code. Fixes PR42195. Differential Revision: https://reviews.llvm.org/D73607
-
Francesco Petrogalli authored
Reviewers: jdoerfert, andwar, simoll, rengolin, hfinkel, xtian Reviewed By: jdoerfert Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72798
-
Jay Foad authored
Reviewers: rampitec, arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D73634
-
Sergey Dmitriev authored
Summary: This flag tells link editor to exclude section from linker inputs when linking executable or shared library. Reviewers: ABataev, alexshap, jdoerfert Reviewed By: ABataev Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73408
-
Simon Pilgrim authored
This handles all the constant splat / opaque testing for us.
-
Simon Pilgrim authored
This handles all the constant splat / opaque testing for us instead of the ConstantSDNode variant where we have to do it ourselves.
-
Craig Topper authored
This code needs to map from the FPCW 2-bit encoding for rounding mode to the 2-bit encoding defined for FLT_ROUNDS. The previous implementation did some clever swapping of bits and adding 1 modulo 4 to do the mapping. This patch instead uses an 8-bit immediate as a lookup table of four 2-bit values. Then we use the 2-bit FPCW encoding to index the lookup table by using a right shift and an AND. This requires extracting the 2-bit value from FPCW and multipying it by 2 to make it usable as a shift amount. But still results in less code. Differential Revision: https://reviews.llvm.org/D73599
-