summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add "(default)" to default optionsRui Ueyama2018-05-301-24/+24
| | | | | | | | This improves the help message shown for `ld.lld --help`. Differential Revision: https://reviews.llvm.org/D47562 llvm-svn: 333607
* [www] Update C++ status to cover P0620.Richard Smith2018-05-301-7/+12
| | | | | | While here, mark three-way comparison as in progress and bump "Clang 6" items from yellow to green. llvm-svn: 333606
* AMDGPU: Split AMDGPUTTI into GCNTTI and R600TTITom Stellard2018-05-304-42/+212
| | | | | | | | | | | | Reviewers: arsenm, nhaehnle Reviewed By: arsenm Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, llvm-commits, t-tye Differential Revision: https://reviews.llvm.org/D47359 llvm-svn: 333605
* [LowerTypeTests] Discard extern_weak linkage for definitionsVlad Tsyrklevich2018-05-302-0/+19
| | | | | | | | | | | | | | | | | | Summary: Fix PR37625. It's possible for an extern_weak declaration to be emitted to the merged module when a definition exists in the ThinLTO portion of the build; discard the linkage on the declaration in that case. (otherwise we copy the linkage to the alias to the jumptable and fail) Reviewers: pcc Reviewed By: pcc Subscribers: mehdi_amini, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D47494 llvm-svn: 333604
* [X86] Use C style comments in intrinsic headers for overall consistency.Craig Topper2018-05-306-91/+100
| | | | | | | | Most of the origial comments used C style /* */ comments, but some C++ // comments had snuck in over time. Still need to convert all the doxygen comments. Which is much harder to do. llvm-svn: 333603
* IRGen: Rename bitsets -> type metadata. NFC.Peter Collingbourne2018-05-301-18/+17
| | | | | | | "Type metadata" is the term that we've been using for the CFI-related information on vtables for a while now. llvm-svn: 333602
* [NewGVN] Fix set comparison; reflow commentGeorge Burgess IV2018-05-301-7/+8
| | | | | | | | | | | | | | | | Looks like we intended to compare this->Members with Other->Members here, but ended up comparing this->Members with this->Members. Oops. :) Since CongruenceClass::Members is a SmallPtrSet anyway, we can probably skip building std::sets if we're willing to write a bit more code. This appears to be no functional change (for sufficiently lax values of "no"): this equality check was only being called inside of an assert. So, worst case, we'll catch more bugs in the form of assertion failures. Thanks to d0k for noting this! llvm-svn: 333601
* AST: Remove an unused ctor. NFC.Peter Collingbourne2018-05-301-3/+0
| | | | llvm-svn: 333600
* PR37631: verify that a member deduction guide has the same access as its ↵Richard Smith2018-05-303-7/+54
| | | | | | template. llvm-svn: 333599
* AST: Remove an unused function. NFC.Peter Collingbourne2018-05-301-4/+0
| | | | llvm-svn: 333598
* [GlobalISel][AArch64] LegalizerInfo verifier: Adding ↵Roman Tereshin2018-05-304-0/+377
| | | | | | | | | | | | | | | LegalizerInfo::verify(...) call w/o fixing bugs This is to make it clear what kind of bugs the LegalizerInfo::verifier is able to catch and test its output Reviewers: aemerson, qcolombet Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D46338 llvm-svn: 333597
* Simplify `ld.lld --help` message.Rui Ueyama2018-05-301-79/+67
| | | | | | | | | | | | | | | | | | | | Previously, we printed out two lines of help messages for `--foo bar` and `--foo=bar` like this: --soname=<value> Set DT_SONAME --soname <value> Set DT_SONAME --sort-section=<value> Specifies sections sorting rule when linkerscript is used --sort-section <value> Specifies sections sorting rule when linkerscript is used This change eliminates duplicate lines that doesn't contain `=` for such options like this. --soname=<value> Set DT_SONAME --sort-section=<value> Specifies sections sorting rule when linkerscript is used Differential Revision: https://reviews.llvm.org/D47558 llvm-svn: 333596
* [asan] Remove unneeded VirtualQuery from exception handlerReid Kleckner2018-05-301-5/+0
| | | | | | | | We don't use the result of the query, and all tests pass if I remove it. During startup, ASan spends a fair amount of time in this handler, and the query is much more expensive than the call to commit the memory. llvm-svn: 333595
* Add fopen to the list of builtins that we check and whitelist.Eric Christopher2018-05-302-1/+10
| | | | llvm-svn: 333594
* [X86] Add __extension__ to a bunch of places in our intrinsic headers that ↵Craig Topper2018-05-304-103/+109
| | | | | | | | fail if you run it through -pedantic -ansi. All of these are lines that create a 'compound literal' to concatenate elements together. llvm-svn: 333593
* Revert r333584: [lit] Report line number for failed RUN commandJoel E. Denny2018-05-3017-190/+17
| | | | | | It breaks test-suite. llvm-svn: 333592
* [TableGen] Avoid leaking TreePatternNodes by using shared_ptr.Florian Hahn2018-05-303-234/+229
| | | | | | | | | | | | By using std::shared_ptr for TreePatternNode, we can avoid leaking them. Reviewers: craig.topper, dsanders, stoklund, tstellar, zturner Reviewed By: dsanders Differential Revision: https://reviews.llvm.org/D47463 llvm-svn: 333591
* [ADT] Add unit test for PrintHTMLEscapedJonas Devlieghere2018-05-301-0/+7
| | | | | | Add unit tests for PrintHTMLEscaped which was added in r333565. llvm-svn: 333590
* PR34520: after instantiating a non-templated member deduction guide, don't ↵Richard Smith2018-05-302-1/+16
| | | | | | forget to push it into the class scope. llvm-svn: 333589
* [IRBuilder] Add APIs for creating calls to atomic memmove and memset ↵Daniel Neilson2018-05-302-0/+119
| | | | | | | | | | | | | | intrinsics. (NFC) Summary: Creating the IRBuilder methods: CreateElementUnorderedAtomicMemSet CreateElementUnorderedAtomicMemMove These mirror the methods that create calls to the regular (non-atomic) memmove and memset intrinsics. llvm-svn: 333588
* As discussed with SG10, bump version of __cpp_deduction_guides macro to ↵Richard Smith2018-05-302-2/+2
| | | | | | indicate support for P0620R0. llvm-svn: 333587
* Fix Wdocumentation warning. NFCI.Simon Pilgrim2018-05-301-1/+1
| | | | llvm-svn: 333586
* [lldb-test] ir-memory-map: Avoid accessing a bad iteratorVedant Kumar2018-05-301-10/+8
| | | | | | | Do not access Probe.start() when Probe is at the end of the interval map. llvm-svn: 333585
* [lit] Report line number for failed RUN commandJoel E. Denny2018-05-3017-17/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Relands r330755 (reverted in r330848) with fix for PR37239.) When debugging test failures with -vv (or -v in the case of the internal shell), this makes it easier to locate the RUN line that failed. For example, clang's test/Driver/linux-ld.c has 892 total RUN lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines after concatenation for line continuations. When reading the generated shell script, this also makes it easier to locate the RUN line that produced each command. To support reporting RUN line numbers in the case of the internal shell, this patch extends the internal shell to support the null command, ":", except pipelines are not supported. To support reporting RUN line numbers in the case of windows cmd.exe as the external shell, this patch extends -vv to set "echo on" instead of "echo off" in bat files. (Support for windows cmd.exe as a lit external shell will likely be dropped later, but I found out too late.) Reviewed By: delcypher, asmith, stella.stamenova, jmorse, lebedev.ri, rnk Differential Revision: https://reviews.llvm.org/D44598 llvm-svn: 333584
* [lldb-test] Add a testing harness for the JIT's IRMemoryMapVedant Kumar2018-05-303-20/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This teaches lldb-test how to launch a process, set up an IRMemoryMap, and issue memory allocations in the target process through the map. This makes it possible to test IRMemoryMap in a targeted way. This has uncovered two bugs so far. The first bug is that Malloc performs an adjustment on the pointer returned from AllocateMemory (for alignment purposes) which ultimately allows overlapping memory regions to be created. The second bug is that after most of the address space on the host side is exhausted, Malloc may return the same address multiple times. These bugs (and hopefully more!) can be uncovered and tested for with targeted lldb-test commands. At an even higher level, the motivation for addressing these bugs is that they can lead to strange user-visible failures (e.g, variables assume the wrong value during expression evaluation, or the debugger crashes). See my third comment on this swift-lldb PR for an example: https://github.com/apple/swift-lldb/pull/652 I hope lldb-test is the right place to add this testing harness. Setting up a gtest-style unit test proved too cumbersome (you need to recreate or mock way too much debugger state), as did writing end-to-end tests (it's hard to write a test that actually hits a buggy path). With lldb-test, it's easy to read/generate the test input and parse the test output. I'll attach a simple "fuzz" tester which generates failing test cases to the Phab review. Here's an example: ``` Command: malloc(size=1024, alignment=32) Malloc: address = 0xca000 Command: malloc(size=64, alignment=16) Malloc: address = 0xca400 Command: malloc(size=1024, alignment=16) Malloc: address = 0xca440 Command: malloc(size=16, alignment=8) Malloc: address = 0xca840 Command: malloc(size=2048, alignment=16) Malloc: address = 0xcb000 Command: malloc(size=64, alignment=32) Malloc: address = 0xca860 Command: malloc(size=1024, alignment=16) Malloc: address = 0xca890 Malloc error: overlapping allocation detected, previous allocation at [0xca860, 0xca8a0) ``` {F6288839} Differential Revision: https://reviews.llvm.org/D47508 llvm-svn: 333583
* [CalledValuePropagation] Just use a sorted vector instead of a set.Benjamin Kramer2018-05-302-14/+17
| | | | | | | | | The set properties are never used, so a vector is enough. No functionality change intended. While there add some std::moves to SparseSolver. llvm-svn: 333582
* llvm-objcopy: Set sh_link to 0 on unrecognized symtab-linked sections.Peter Collingbourne2018-05-302-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | Per discussion on the generic-abi mailing list: https://groups.google.com/forum/#!topic/generic-abi/MPr8TVtnVn4 An object file manipulation tool must either write out a symbol table with the same number of entries as the original symbol table and in the same order, or if this is impossible, refuse to operate on the object file if it has unrecognized sections that are linked to the symtab section. However, existing tools (namely GNU strip, GNU objcopy and ld.{bfd,gold,lld} -r) do not comply with this at present: they change symbol table indexes and set sh_link to 0 on the unrecognized symtab-linked sections. We intend to use the latter as a (temporary) signal that a tool has operated on a proposed new symtab-linked section and invalidated the symbol table indexes. However, llvm-objcopy currently keeps sh_link pointing to the new symtab section. This patch changes llvm-objcopy to set sh_link to 0 to match the behaviour of the other tools. Differential Revision: https://reviews.llvm.org/D47404 llvm-svn: 333581
* [X86][SSE] Pulled out splat detection helper from LowerScalarVariableShift ↵Simon Pilgrim2018-05-301-37/+40
| | | | | | | | (NFCI) Created the IsSplatValue helper from the splat detection code in LowerScalarVariableShift as a first NFC step towards improving support for splat rotations, which is an extension of PR37426. llvm-svn: 333580
* Reverted r333424 as it broke multiple build bots and left unfixed for a long ↵Galina Kistanova2018-05-303-74/+4
| | | | | | time llvm-svn: 333578
* [GlobalISel][Legalizer] LegalizerInfo verifier: check rules cover type indicesRoman Tereshin2018-05-302-13/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a simple verifier that tracks type indices being touched by legalization rules' builders. Every target will now have an opportunity to call LegalizerInfo::verify(...) at the end of its derived LegalizerInfo's constructor and check there are no obvious mistakes like checking only first type for an opcode that has more than one type index and therefore implicitly declaring any type for the second (and higher) type index legal. The check is only ran in assert builds and should have very minor performance impact in assert builds and none in release builds. This commit does not add LegalizerInfo::verify(...) calls to target-specific legalizers, look for separate commits for that. This commit also doesn't make the verification errors fatal, only produces an error message, look for a later commit that does. Reviewers: aemerson, qcolombet Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D46338 llvm-svn: 333576
* [AST] Fix loss of enum forward decl from decl contextJoel E. Denny2018-05-303-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | For example, given: enum __attribute__((deprecated)) T *p; -ast-print produced: enum T *p; The attribute was lost because the enum forward decl was lost. Another example is the loss of enum forward decls from C++ namespaces (in MS compatibility mode). The trouble was that the EnumDecl node was suppressed, as revealed by -ast-dump. The suppression of the EnumDecl was intentional in r116122, but I don't understand why. The suppression isn't needed for the test suite to behave. Reviewed by: rsmith Differential Revision: https://reviews.llvm.org/D46846 llvm-svn: 333574
* [X86] Update the fast-isel tests for _mm_rcp_ss, _mm_rsqrt_ss, and ↵Craig Topper2018-05-301-27/+3
| | | | | | _mm_sqrt_ss to match clang codegen after r333572. llvm-svn: 333573
* [X86] Simplify the implementation of _mm_sqrt_ss, _mm_rcp_ss, and _mm_rsqrt_ss.Craig Topper2018-05-302-31/+4
| | | | | | | | We don't need the insertion back into the original vector at the end. The builtin already understands that. This is different than _mm_sqrt_sd which takes two arguments and we do need to insert. llvm-svn: 333572
* [WebAssembly] Initial support for LTOSam Clegg2018-05-3026-21/+674
| | | | | | Differential Revision: https://reviews.llvm.org/D47162 llvm-svn: 333570
* [X86] Reduce the number of setzero intrinsics to just the set defined by the ↵Craig Topper2018-05-3013-185/+150
| | | | | | | | | | Intel Intrinsics Guide. We had quite a few for different element sizes of integers sometimes with strange target features attached to them. We only need a single version for each of _m128i, _m256i, and _m512i with the target feature that first introduced those types. llvm-svn: 333568
* [ELF] Remove -m argument to lld in test files. NFC.Sam Clegg2018-05-3065-98/+99
| | | | | | | | | | | This should be correctly implied by the linker. This also makes the tests slightly easier to maintain and compare with the equivalent tests under for other platforms. Differential Revision: https://reviews.llvm.org/D47513 llvm-svn: 333567
* [dsymutil] Escape HTML special characters in plist.Jonas Devlieghere2018-05-304-10/+40
| | | | | | | | | | When printing string in the Plist, we weren't escaping the characters which lead to invalid XML. This patch adds the escape logic to StringExtras. rdar://39785334 llvm-svn: 333565
* [X86] Remove 'return' from a bunch of intrinsics that return void and use a ↵Craig Topper2018-05-309-19/+19
| | | | | | | | builtin that returns void. Found by running the intrinsic headers through -pedantic -ansi. llvm-svn: 333563
* [GlobalISel][Legalizer] NFC mostly reducing LegalizeRuleSet's methods' ↵Roman Tereshin2018-05-301-49/+55
| | | | | | | | | | | | | | | | inter-dependecies Making LegalizeRuleSet's implementation a little more dumb and straightforward to make it easier to read and change, in particular in order to add the initial version of LegalizerInfo verifier Reviewers: aemerson, qcolombet Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D46338 llvm-svn: 333562
* [X86][AVX512BW] Fixed check prefix copy+paste typo in avx512bw-intrinsics.llSimon Pilgrim2018-05-301-570/+570
| | | | | | Prefix was for AVX512F instead of AVX512BW llvm-svn: 333560
* [AMDGPU][Waitcnt] Fix build error: unused variable 'SWaitInst'Mark Searles2018-05-301-6/+2
| | | | | | | | | | | | | | https://reviews.llvm.org/rL333556 caused a buildbot failure. See http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/21876/steps/build_Lld/logs/stdio /Users/buildslave/as-bldslv9/lld-x86_64-darwin13/llvm.src/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:2007:10: error: unused variable 'SWaitInst' [-Werror,-Wunused-variable] auto SWaitInst = BuildMI(EntryBB, EntryBB.getFirstNonPHI(), The unused variable was for debugging purposes; removing that piece of code to fix the build. llvm-svn: 333559
* AMDGPU: Use better alignment for kernarg loweringMatt Arsenault2018-05-306-159/+116
| | | | | | | | | | This was just emitting loads with the ABI alignment for the raw type. The true alignment is often better, especially when an illegal vector type was scalarized. The better alignment allows using a scalar load more often. llvm-svn: 333558
* [ValueTracking] Fix endless recursion in isKnownNonZero()Karl-Johan Karlsson2018-05-302-4/+40
| | | | | | | | | | | | | | | | | | | | | Summary: The isKnownNonZero() function have checks that abort the recursion when it reaches the specified max depth. However one of the recursive calls was placed before the max depth check was done, resulting in a endless recursion that eventually triggered a segmentation fault. Fixed the problem by moving the max depth check above the first recursive call. Reviewers: Prazek, nlopes, spatel, craig.topper, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, bjope, llvm-commits Differential Revision: https://reviews.llvm.org/D47531 llvm-svn: 333557
* [AMDGPU][Waitcnt] Fix handling of loops with many bottom blocksMark Searles2018-05-302-19/+57
| | | | | | | | | | | | | In terms of waitcnt insertion/if necessary, the waitcnt pass forces convergence for a loop. Previously, that kicked if greater than 2 passes over a loop, which doesn't account for loop with many bottom blocks. So, increase the threshold to (n+1), where n is the number of bottom blocks. This gives the pass an opportunity to consider the contribution of each bottom block, to the overall loop, before the forced convergence potentially kicks in. Differential Revision: https://reviews.llvm.org/D47488 llvm-svn: 333556
* [X86] Lowering FMA intrinsics to native IR (Clang part)Gabor Buella2018-05-309-1233/+2453
| | | | | | | | | | | | | | | | This patch replaces all packed (and scalar without rounding mode) fused intrinsics with fmadd/fmaddsub variations. Then fmadd/fmaddsub are lowered to native IR. Patch by tkrupa Reviewers: craig.topper, sroland, spatel, RKSimon Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D47444 llvm-svn: 333555
* [X86] Lowering FMA intrinsics to native IR (LLVM part)Gabor Buella2018-05-3011-234/+9936
| | | | | | | | | | | | | | | | | | | | | | | | Support for Clang lowering of fused intrinsics. This patch: 1. Removes bindings to clang fma intrinsics. 2. Introduces new LLVM unmasked intrinsics with rounding mode: int_x86_avx512_vfmadd_pd_512 int_x86_avx512_vfmadd_ps_512 int_x86_avx512_vfmaddsub_pd_512 int_x86_avx512_vfmaddsub_ps_512 supported with a new intrinsic type (INTR_TYPE_3OP_RM). 3. Introduces new x86 fmaddsub/fmsubadd folding. 4. Introduces new tests for code emitted by sequentions introduced in Clang part. Patch by tkrupa Reviewers: craig.topper, sroland, spatel, RKSimon Reviewed By: craig.topper, RKSimon Differential Revision: https://reviews.llvm.org/D47443 llvm-svn: 333554
* [clang-format/ObjC] Correctly parse Objective-C methods with 'class' in nameBen Hamilton2018-05-303-1/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Please take a close look at this CL. I haven't touched much of `UnwrappedLineParser` before, so I may have gotten things wrong. Previously, clang-format would incorrectly format the following: ``` @implementation Foo - (Class)class { } - (void)foo { } @end ``` as: ``` @implementation Foo - (Class)class { } - (void)foo { } @end ``` The problem is whenever `UnwrappedLineParser::parseStructuralElement()` sees any of the keywords `class`, `struct`, or `enum`, it calls `parseRecord()` to parse them as a C/C++ record. This causes subsequent lines to be parsed incorrectly, which causes them to be indented incorrectly. In Objective-C/Objective-C++, these keywords are valid selector components. This diff fixes the issue by explicitly handling `+` and `-` lines inside `@implementation` / `@interface` / `@protocol` blocks and parsing them as Objective-C methods. Test Plan: New tests added. Ran tests with: make -j16 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: jolesiak, klimek Reviewed By: jolesiak, klimek Subscribers: klimek, cfe-commits, Wizard Differential Revision: https://reviews.llvm.org/D47095 llvm-svn: 333553
* [LLDB] Re-apply r303907 that's reverted by mistakeTim Shen2018-05-302-7/+13
| | | | llvm-svn: 333552
* [AliasSet] Teach the alias set how to handle atomic memcpy/memmove/memsetDaniel Neilson2018-05-303-12/+92
| | | | | | | | | Summary: The atomic variants of the memcpy/memmove/memset intrinsics can be treated the same was as the regular forms, with respect to aliasing. Update the AliasSetTracker to treat the atomic forms the same was as the regular forms. llvm-svn: 333551
* [InstCombine, ARM, AArch64] Convert table lookup to shuffle vectorAlexandros Lamprineas2018-05-303-0/+146
| | | | | | | | | | | Turning a table lookup intrinsic into a shuffle vector instruction can be beneficial. If the mask used for the lookup is the constant vector {7,6,5,4,3,2,1,0}, then the back-end generates byte reverse instructions instead. Differential Revision: https://reviews.llvm.org/D46133 llvm-svn: 333550
OpenPOWER on IntegriCloud