summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Fix spelling error. NFCAustin Kerbow2019-04-241-1/+1
| | | | | | | | | | | | | | | | Summary: Test commit. Reviewers: msearles, jkorous Reviewed By: jkorous Subscribers: dexonsmith, arsenm, jvesely, nhaehnle, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61093 llvm-svn: 359154
* llvm-cvtres: Make new dupe resource error a bit friendlierNico Weber2019-04-2410-51/+60
| | | | | | | | | | | | For well-known type IDs, include the name of the type. To not duplicate the ID->name map, make llvm-readobj call this new function as well. It has slightly different output, so this also requires updating a few tests. Differential Revision: https://reviews.llvm.org/D61086 llvm-svn: 359153
* posix_spawn should retry upon EINTRJF Bastien2019-04-241-6/+10
| | | | | | | | | | | | | | | | | | | Summary: We've seen cases of bots failing with: clang: error: unable to execute command: posix_spawn failed: Interrupted system call Add a small retry loop to posix_spawn in case this happens. Don't retry too much in case there's some systemic problem going on, but retry a few times. <rdar://problem/50181448> Reviewers: Bigcheese, arphaman Subscribers: jkorous, dexonsmith, kristina, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61096 llvm-svn: 359152
* Mark new jitlink test XFAIL for windowsReid Kleckner2019-04-241-1/+6
| | | | llvm-svn: 359151
* [sanitizer_common] Remove some old commented-out printf statements, and ↵Mitch Phillips2019-04-241-6/+1
| | | | | | fixed up the order of includes. llvm-svn: 359150
* Recommitting r358783 and r358786 "[MS] Emit S_HEAPALLOCSITE debug info" with ↵Amy Huang2019-04-249-0/+182
| | | | | | | | | | | | | | | | | | | fixes for buildbot error (undefined assembler label). Summary: This emits labels around heapallocsite calls and S_HEAPALLOCSITE debug info in codeview. Currently only changes FastISel, so emitting labels still needs to be implemented in SelectionDAG. Reviewers: rnk Subscribers: aprantl, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D61083 llvm-svn: 359149
* [codeview] Fix symbol names for dynamic initializers and atexit stubsReid Kleckner2019-04-245-15/+120
| | | | | | | | | | | | | | | | Summary: Add a new variant to GlobalDecl for these so that we can detect them more easily during debug info emission and handle them appropriately. Reviewers: rsmith, rjmccall, jyu2 Subscribers: aprantl, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60930 llvm-svn: 359148
* [DAGCombiner] scale repeated FP divisor by splat factorSanjay Patel2019-04-242-16/+28
| | | | | | | | | | | | | | If we have a vector FP division with a splatted divisor, use the existing transform that converts 'x/y' into 'x * (1.0/y)' to allow more conversions. This can then potentially be converted into a scalar FP division by existing combines (rL358984) as seen in the tests here. That can be a potentially big perf difference if scalar fdiv has better timing (including avoiding possible frequency throttling for vector ops). Differential Revision: https://reviews.llvm.org/D61028 llvm-svn: 359147
* [PowerPC] Allow using initial-exec TLS with PICJoerg Sonnenberger2019-04-243-6/+21
| | | | | | | | | | Using initial-exec TLS variables is a reasonable performance optimisation for system libraries. Use the correct PIC mechanism to get hold of the GOT to avoid text relocations. Differential Revision: https://reviews.llvm.org/D61026 llvm-svn: 359146
* Skip test introduced in r359140 on windowsFrederic Riss2019-04-241-0/+2
| | | | | | | Not sure what is or is not supposed to work on Windows and I have no way to investigate this. llvm-svn: 359145
* Add period at end of comment.Sean Fertile2019-04-241-1/+1
| | | | llvm-svn: 359144
OpenPOWER on IntegriCloud