summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Evaluator] Walk initial elements when handling load through bitcastRobert Lougher2019-04-253-38/+158
| | | | | | | | | | | | | | | | | | | | | | When evaluating a store through a bitcast, the evaluator tries to move the bitcast from the pointer onto the stored value. If the cast is invalid, it tries to "introspect" the type to get a valid cast by obtaining a pointer to the initial element (if the type is nested, this may require walking several initial elements). In some situations it is possible to get a bitcast on a load (e.g. with unions, where the bitcast may not be the same type as the store). However, equivalent logic to the store to introspect the type is missing. This patch add this logic. Note, when developing the patch I was unhappy with adding similar logic directly to the load case as it could get out of step. Instead, I have abstracted the "introspection" into a helper function, with the specifics being handled by a passed-in lambda function. Differential Revision: https://reviews.llvm.org/D60793 llvm-svn: 359205
* [GlobalISel][AArch64] Legalize G_FNEARBYINTJessica Paquette2019-04-258-2/+589
| | | | | | | | | Add legalizer support for G_FNEARBYINT. It's the same as G_FCEIL etc. Since the importer allows us to automatically select this after legalization, also add tests for selection etc. Also update arm64-vfloatintrinsics.ll. llvm-svn: 359204
* [GlobalISel] Add IRTranslator support for G_FNEARBYINTJessica Paquette2019-04-252-0/+10
| | | | | | | | | Translate llvm.nearbyint into G_FNEARBYINT as a simple intrinsic. Update arm64-irtranslator.ll. Differential Revision: https://reviews.llvm.org/D60922 llvm-svn: 359203
* [clangd] Use JSON streaming API for Trace rather than pasting strings. NFCSam McCall2019-04-252-30/+35
| | | | llvm-svn: 359202
* [GlobalISel] Add a G_FNEARBYINT opcodeJessica Paquette2019-04-254-0/+14
| | | | | | | | | | | For eventually selecting llvm.nearbyint. Equivalent to the SelectionDAG nearbyint node. Update legalizer-info-validation.mir. Differential Revision: https://reviews.llvm.org/D60921 llvm-svn: 359201
* [OPENMP] Improved check for the linear dependency in the non-rectangularAlexey Bataev2019-04-253-6/+46
| | | | | | | | | loop nests. Added a checks that the initializer/condition expressions depend only only of the single previous loop iteration variable. llvm-svn: 359200
* [scudo][standalone] Introduce the SizeClassMapKostya Kortchinsky2019-04-255-1/+190
| | | | | | | | | | | | | | | | | | | | | | Summary: As with the sanitizer_common allocator, the SCM allows for efficient mapping between sizes and size-classes, table-free. It doesn't depart significantly from the original, except that we allow the use of size-class 0 for other purposes (as opposed to chunks of size 0). The Primary will use it to hold TransferBatches. Reviewers: vitalybuka, eugenis, hctim, morehouse Reviewed By: vitalybuka Subscribers: srhines, mgorny, delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D61088 llvm-svn: 359199
* Revert "[JITLink] Make the JITLink MachO/x86-64 eh-frame test work on Windows."Lang Hames2019-04-251-1/+6
| | | | | | This reverts r359169, as it broke one of the windows bots. llvm-svn: 359198
* [LLD][ELF] - Convert symbol-index.s testcase to a YAML test case. NFCI.George Rimar2019-04-253-10/+25
| | | | | | | | | | | | | | | This removes one more binary object from the inputs and fixes the test case description. Previously it said that: "symbol-index.elf has incorrect type of .symtab section. There is no symbol bodies because of that and any symbol index becomes incorrect." But the real reason of the failture was not the incorrect type of a symbol table, but invalid index of the symbol used in a relocation, what happened because previous test tried to read .symtab as a SHT_RELA section. llvm-svn: 359197
* gn build: Document llvm_enable_dia_sdk variable betterNico Weber2019-04-251-0/+2
| | | | llvm-svn: 359196
* gn build: Make setting llvm_enable_dia_sdk=true workNico Weber2019-04-252-2/+8
| | | | | | | | If this is set, %INCLUDE% must contain ".../DIA SDK/include" and %LIB% must contain ".../DIA SKD/lib/amd64" (assuming you're doing a 64-bit build). llvm-svn: 359195
* [LLD][ELF] - Move the test to a correct folder, remove excessive input. NFCI.George Rimar2019-04-253-50/+51
| | | | | | | | | This test should live in `invalid` folder. Also it was possible to avoid adding input with use of `-docnum=x` yaml2obj argument. llvm-svn: 359194
* [OPENMP][AARCH64]Fix the test for declare simd, NFC.Alexey Bataev2019-04-251-4/+4
| | | | | | | Renamed function a01 in the test to fix possible problems with the git hash match during testing. llvm-svn: 359193
* lld-link: Implement /swaprun: flagNico Weber2019-04-257-2/+78
| | | | | | | | | | | | | | | | r191276 added this to old LLD, but it never made it to new LLD -- except that the flag was in Options.td, so it was silently ignored. I figured it should be easy to implement, so I did that instead of removing the flags from Options.td. I then discovered that link.exe also supports comma-separated lists of 'cd' and 'net', which made the parsing code a bit annoying. The Alias technique in Options.td is to get nice help output. Differential Revision: https://reviews.llvm.org/D61067 llvm-svn: 359192
* [InstCombine][X86] Tweak generic expansion of PACKSS/PACKUS to shuffle then ↵Simon Pilgrim2019-04-251-7/+4
| | | | | | | | truncate. NFCI. This has no effect on constant folding but will be useful when we expand non-saturating PACKSS/PACKUS intrinsics. llvm-svn: 359191
* [Support] json::OStream::flush(), which passes through to the underlying streamSam McCall2019-04-251-1/+3
| | | | llvm-svn: 359190
* gn build: Merge r359179Nico Weber2019-04-252-0/+2
| | | | llvm-svn: 359189
* gn build: Merge r359174Nico Weber2019-04-251-0/+1
| | | | llvm-svn: 359188
* gn build: Merge r359142Nico Weber2019-04-251-0/+1
| | | | llvm-svn: 359187
* [Support] Add JSON streaming output API, faster where the heavy value types ↵Sam McCall2019-04-254-138/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aren't needed. Summary: There's still a little bit of constant factor that could be trimmed (e.g. more overloads to avoid round-tripping primitives through json::Value). But this solves the memory scaling problem, and greatly improves the performance constant factor, and the API should leave room for optimization if needed. Adapt TimeProfiler to use it, eliminating almost all the performance regression from r358476. Performance test on my machine: perf stat -r 5 ~/llvmbuild-opt/bin/clang++ -w -S -ftime-trace -mllvm -time-trace-granularity=0 spirit.cpp Handcrafted JSON (HEAD=r358532 with r358476 reverted): 2480ms json::Value (HEAD): 2757ms (+11%) After this patch: 2520 ms (+1.6%) Reviewers: anton-afanasyev, lebedev.ri Subscribers: kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60804 llvm-svn: 359186
* [InstCombine][X86] Add PACKSS/PACKUS tests for truncation where saturation ↵Simon Pilgrim2019-04-251-0/+160
| | | | | | won't occur llvm-svn: 359185
* Implement midpoint for floating point types. Reviewed as ↵Marshall Clow2019-04-258-1/+228
| | | | | | https://reviews.llvm.org/D61014. llvm-svn: 359184
* [Support] Try to unbreak windows buildbotIlya Biryukov2019-04-251-1/+1
| | | | | | After r359179. llvm-svn: 359183
* Parallel: only allow the first TaskGroup to run tasks parallellyFangrui Song2019-04-252-6/+29
| | | | | | | | | | | | | | | | | | | Summary: Concurrent (e.g. nested) llvm::parallel::for_each() may lead to dead locks. See PR35788 (fixed by rLLD322041) and PR41508 (fixed by D60757). When parallel_for_each() is about to return, in ~Latch() called by ~TaskGroup(), a thread (in the default executor) may block in Latch::sync() waiting for Count to become zero. If all threads in the default executor are blocked, it is a dead lock. To fix this, force serial execution if the current TaskGroup is not the first one. For a nested llvm::parallel::for_each(), this parallelizes the outermost loop and serializes inner loops. Differential Revision: https://reviews.llvm.org/D61115 llvm-svn: 359182
* [llvm-objdump] Prep for adding newlines before and after "Disassembly of ↵Fangrui Song2019-04-254-30/+17
| | | | | | section ...:" llvm-svn: 359181
* [ConstantRange] [a, b) udiv a full range is [0, umax(b)).Florian Hahn2019-04-252-2/+10
| | | | | | | | | | Reviewers: nikic, spatel, efriedma Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D60536 llvm-svn: 359180
* [Testing] Move clangd::Annotations to llvm testing supportIlya Biryukov2019-04-259-132/+345
| | | | | | | | | | | | | | | | | | | | | | | Summary: Annotations allow writing nice-looking unit test code when one needs access to locations from the source code, e.g. running code completion at particular offsets in a file. See comments in Annotations.cpp for more details on the API. Also got rid of a duplicate annotations parsing code in clang's code complete tests. Reviewers: gribozavr, sammccall Reviewed By: gribozavr Subscribers: mgorny, hiraditya, ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D59814 llvm-svn: 359179
* [yaml2obj] - Don't crash on invalid inputs.George Rimar2019-04-254-13/+15
| | | | | | | | | | | | | | yaml2obj might crash on invalid input when unable to parse the YAML. Recently a crash with a very similar nature was fixed for an empty files. This patch revisits the fix and does it in yaml::Input instead. It seems to be more correct way to handle such situation. With that crash for invalid inputs is also fixed now. Differential revision: https://reviews.llvm.org/D61059 llvm-svn: 359178
* Fix include order. NFCI.Simon Pilgrim2019-04-251-1/+1
| | | | llvm-svn: 359177
* [X86][SSE] combineBitcastvxi1 - add support for bitcasting to non-scalar ↵Simon Pilgrim2019-04-252-1724/+183
| | | | | | | | | | integers Truncate the movmsk scalar integer result to the equivalent scalar integer width as before but then bitcast to the requested type. We still have the issue identified in PR41594 but D61114 should handle this. llvm-svn: 359176
* Fix compilation error with -DLIBCXXABI_ENABLE_THREADS=OFFMichael Platings2019-04-251-0/+3
| | | | | | | | | | | | The error is: libcxxabi/src/cxa_guard_impl.h: In instantiation of ‘__cxxabiv1::{anonymous}::LibcppMutex __cxxabiv1::{anonymous}::GlobalStatic<__cxxabiv1::{anonymous}::LibcppMutex>::instance’: libcxxabi/src/cxa_guard_impl.h:529:62: required from here libcxxabi/src/cxa_guard_impl.h:510:23: error: ‘__cxxabiv1::{anonymous}::LibcppMutex __cxxabiv1::{anonymous}::GlobalStatic<__cxxabiv1::{anonymous}::LibcppMutex>::instance’ has incomplete type _LIBCPP_SAFE_STATIC T GlobalStatic<T>::instance = {}; ^ llvm-svn: 359175
* [Support] Add a GTest matcher for Optional<T>Ilya Biryukov2019-04-253-1/+74
| | | | | | | | | | | | | | Reviewers: sammccall Reviewed By: sammccall Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61071 llvm-svn: 359174
* [NFC][LoopIdiomRecognize] Some basic baseline tests for bcmp loop idiomRoman Lebedev2019-04-254-0/+2734
| | | | | | | Doubt this is the final test coverage, but this appears to have good coverage already, so i figure i might as well precommit it. llvm-svn: 359173
* [NFC] test commit removing excess lineNikolai Kosjar2019-04-251-1/+0
| | | | llvm-svn: 359172
* [MIPS] Use custom bitcast lowering to avoid excessive instructionsSimon Atanasyan2019-04-254-7/+45
| | | | | | | | | | | | | On Mips32r2 bitcast can be expanded to two sw instructions and an ldc1 when using bitcast i64 to double or an sdc1 and two lw instructions when using bitcast double to i64. By introducing custom lowering that uses mtc1/mthc1 we can avoid excessive instructions. Patch by Mirko Brkusanin. Differential Revision: https://reviews.llvm.org/D61069 llvm-svn: 359171
* [X86] Remove part of an if condition that should always be true.Craig Topper2019-04-251-1/+1
| | | | | | | | The IndexReg will always be non-null at this point. Earlier in the function, if IndexReg was null we set it to CurDAG->getRegister(0, VT) which made it non-null. llvm-svn: 359170
* [JITLink] Make the JITLink MachO/x86-64 eh-frame test work on Windows.Lang Hames2019-04-251-6/+1
| | | | | | | This should fix the MachO/x86-64 eh-frame regression test by ensuring that the symbols __ZTIi and ___gxx_personality_v0 are defined on all platforms. llvm-svn: 359169
* [llvm-rtdyld] Add support for passing command line arguments to rtdyld-run code.Lang Hames2019-04-251-5/+19
| | | | | | | | | | | | | | | | | The --args option can now be used to pass arguments to code linked with llvm-rtdyld. E.g. $ llvm-rtdyld file1.o file2.o --args a b c is equivalent to: $ ld -o program file1.o file2.o $ ./program a b c This is the rtdyld counterpart to the jitlink change in r359115, and makes benchmarking and comparison between the tools easier. llvm-svn: 359168
* Enable LoopVectorization by default.Alina Sbirlea2019-04-255-517/+11
| | | | | | | | | | | | | | | | | Summary: When refactoring vectorization flags, vectorization was disabled by default in the new pass manager. This patch re-enables is for both managers, and changes the assumptions opt makes, based on the new defaults. Comments in opt.cpp should clarify the intended use of all flags to enable/disable vectorization. Reviewers: chandlerc, jgorbe Subscribers: jlebar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61091 llvm-svn: 359167
* [llvm-objdump] errorToErrorCode+message -> toStringFangrui Song2019-04-252-5/+4
| | | | | | For test/Object/elf-invalid-phdr.test, the intended error message got lost due to errorToErrorCode(). llvm-svn: 359166
* [PowerPC][NFC]Update licence to Apache 2Jinsong Ji2019-04-251-17/+3
| | | | llvm-svn: 359164
* Consolidate existing utilities for interpreting vector predicate maskes [NFC]Philip Reames2019-04-254-47/+61
| | | | llvm-svn: 359163
* Update test to better check for the non-constexpr-ness of a move ↵Marshall Clow2019-04-251-5/+20
| | | | | | constructor. Fixes PR#41577. llvm-svn: 359162
* Fix unused variable warning in LoopFusion pass.Kit Barton2019-04-251-7/+5
| | | | | | | | | | Do not wrap the contents of printFusionCandidates in the LLVM_DEBUG macro. This fixes an unused variable warning generated when compiling without asserts but with -DENABLE_LLVM_DUMP. Differential Revision: https://reviews.llvm.org/D61035 llvm-svn: 359161
* [InstCombine] Be consistent w/handling of masked intrinsics style wise [NFC]Philip Reames2019-04-252-5/+6
| | | | llvm-svn: 359160
* Use modern type trait implementations when available.Richard Smith2019-04-252-14/+45
| | | | | | | | | | | | | | Teach libcxx to stop using various deprecated __has_* type traits, in favor of the ("modern", C++11 era) __is_* type traits. This is mostly just a simplification, but fixes at least one bug: _Atomic T should be considered trivially-destructible, but is not considered to be POD by Clang, and __has_trivial_destructor is specified in the GCC documentation as returning false for non-POD non-class types. Differential Revision: https://reviews.llvm.org/D48292 llvm-svn: 359159
* Fix typo in comment in r312851.Richard Smith2019-04-251-2/+2
| | | | | | Thanks to Nico Weber for pointing this out! llvm-svn: 359158
* [utils] Add a lldb data formatter for llvm::SmallString.Davide Italiano2019-04-251-0/+11
| | | | | | | | | Result: (lldb) p val (llvm::SmallString<32>) $31 = "patatino" llvm-svn: 359157
* Hide stderr output from lldb-argdumperAdrian Prantl2019-04-243-31/+46
| | | | | | | | | | | | | Under very specific circumstances the default shell /bin/sh might print stuff to stderr before launching lldb-argdumper, which then confuses the JSON parser. This patch suppresses stderr output from lldb-argdumper to avoid this situation. rdar://problem/50149390 Differential Revision: https://reviews.llvm.org/D61101 llvm-svn: 359156
* PR41427: This has apparently been fixed already, just add a regressionRichard Smith2019-04-241-0/+17
| | | | | | test. llvm-svn: 359155
OpenPOWER on IntegriCloud