summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix unsigned/signed comparison failure in unittest.Eric Christopher2018-06-251-1/+1
| | | | llvm-svn: 335547
* Add an option to support debug fission on implicit ThinLTO.Yunlian Jiang2018-06-252-0/+12
| | | | | | | | | | | | | | | | Summary: This adds an option -gsplit-dwarf=<arg>. LLVM can create .dwo files in the given directory during the implicit ThinLTO link stage. Reviewers: tejohnson, dblaikie, pcc Reviewed By: pcc Subscribers: steven_wu, aprantl, JDevlieghere, yunlian, probinson, mehdi_amini, inglorion, cfe-commits Differential Revision: https://reviews.llvm.org/D44788 llvm-svn: 335546
* [InstCombine] cleanup udiv folds; NFCISanjay Patel2018-06-251-30/+20
| | | | | | | | | This removes a "UDivFoldAction" in favor of a simple constant matcher. In theory, the existing code could do more matching, but I don't see any evidence or need for it. I've left a TODO about using ValueTracking in case we see any regressions. llvm-svn: 335545
* [InstCombine] add/move tests for udiv; NFCSanjay Patel2018-06-252-6/+52
| | | | llvm-svn: 335544
* Fix tests from r335542 to use %hmaptoolBruno Cardoso Lopes2018-06-251-2/+2
| | | | llvm-svn: 335543
* Warning for framework include violation from Headers to PrivateHeadersBruno Cardoso Lopes2018-06-2516-5/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | Framework vendors usually layout their framework headers in the following way: Foo.framework/Headers -> "public" headers Foo.framework/PrivateHeader -> "private" headers Since both headers in both directories can be found with #import <Foo/some-header.h>, it's easy to make mistakes and include headers in Foo.framework/PrivateHeader from headers in Foo.framework/Headers, which usually configures a layering violation on Darwin ecosystems. One of the problem this causes is dep cycles when modules are used, since it's very common for "private" modules to include from the "public" ones; adding an edge the other way around will trigger cycles. Add a warning to catch those cases such that: ./A.framework/Headers/A.h:1:10: warning: public framework header includes private framework header 'A/APriv.h' #include <A/APriv.h> ^ rdar://problem/38712182 llvm-svn: 335542
* Implement new methods for handling an error in MI commands.Alexander Polyakov2018-06-252-0/+68
| | | | | | | | | | | | | | | | Summary: The new methods take SBError object and call handler, specified by user, depending on SBError status. Reviewers: aprantl, clayborg, labath Reviewed By: aprantl, clayborg Subscribers: ki.stfu, lldb-commits Differential Revision: https://reviews.llvm.org/D48295 llvm-svn: 335541
* [Instrumentation] Remove unused includeBenjamin Kramer2018-06-251-1/+0
| | | | | | It's also a layering violation. llvm-svn: 335528
* [InstCombine] fold sdiv with sext bool divisorSanjay Patel2018-06-252-8/+9
| | | | llvm-svn: 335527
* [InstCombine] add tests for sdiv with sext bool divisor; NFCSanjay Patel2018-06-251-84/+112
| | | | llvm-svn: 335526
* UBSan blacklist workaround for bot timeoutsVlad Tsyrklevich2018-06-251-0/+5
| | | | | | | | | | | | | | Summary: Workaround for PR37929 Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D48566 llvm-svn: 335525
* [UBsan] Enable ubsan minimal unit tests on OpenBSDDavid Carlier2018-06-252-2/+11
| | | | | | | | | | | | | OpenBSD needs lld linker for sanitisers. Disabling lint checking as some symbols cannot be defined and block the proper unit tests launch. Reviewers: lebedev.ri, vitalybuka Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D48528 llvm-svn: 335524
* [ubsan] Mark a test case as unsupported on WindowsVedant Kumar2018-06-251-2/+7
| | | | | | | | | __ubsan_on_report isn't defined as weak, and redefining it in a test is not supported on Windows. See the error message here: https://reviews.llvm.org/D48446 llvm-svn: 335523
* Revert r335513: [SCEVExp] Advance found insertion pointFlorian Hahn2018-06-252-65/+3
| | | | llvm-svn: 335522
* [LoopIdiomRecognize] Fix a couple places where it appears we were ↵Craig Topper2018-06-251-6/+5
| | | | | | unintenionally making copies of DebugLoc. llvm-svn: 335521
* Force vector width for scev-expander-debug.ll testFlorian Hahn2018-06-251-1/+1
| | | | llvm-svn: 335520
* [CMake] Run libFuzzer tests with check-all.Matt Morehouse2018-06-251-2/+0
| | | | | | | | | | | | Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D48200 llvm-svn: 335519
* [X86] Simplify intrinsic table binary search to not require a temporary struct.Craig Topper2018-06-251-10/+9
| | | | | | std::lower_bound doesn't require the thing to search for to be the same type as the table entries. We just need to define an appropriate comparison function that can take an table entry and an intrinsic number. llvm-svn: 335518
* [X86] Add comment about the sorting of the memory folding tables added in ↵Craig Topper2018-06-251-0/+15
| | | | | | r335501. llvm-svn: 335517
* Revert "Append new attributes to the end of an AttributeList."Michael Kruse2018-06-2536-146/+188
| | | | | | | This reverts commit r335084 as requested by David Jones and Eric Christopher because of differences of emitted warnings. llvm-svn: 335516
* [docs] Update doc after split of -gen-intrinsic in r335407Fangrui Song2018-06-251-2/+6
| | | | llvm-svn: 335515
* [PowerPC] Fix incorrectly encoded wait instructionLei Huang2018-06-253-13/+13
| | | | | | | | Encoding for the wait instruction was wrong. Fix according to ISA 3.0. Differential Revision: https://reviews.llvm.org/D48550 llvm-svn: 335514
* [SCEVExp] Advance found insertion point until we find a non-dbg instruction.Florian Hahn2018-06-252-3/+65
| | | | | | | | | | | | | This avoids creating unnecessary casts if the IP used to be a dbg info intrinsic. Fixes PR37727. Reviewers: vsk, aprantl, sanjoy, efriedma Reviewed By: vsk, efriedma Differential Revision: https://reviews.llvm.org/D47874 llvm-svn: 335513
* [InstSimplify] fold div/rem of zexted boolSanjay Patel2018-06-254-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was looking at an unrelated fold and noticed that we don't have this simplification (because the other fold would break existing tests). Name: zext udiv %z = zext i1 %x to i32 %r = udiv i32 %y, %z => %r = %y Name: zext urem %z = zext i1 %x to i32 %r = urem i32 %y, %z => %r = 0 Name: zext sdiv %z = zext i1 %x to i32 %r = sdiv i32 %y, %z => %r = %y Name: zext srem %z = zext i1 %x to i32 %r = srem i32 %y, %z => %r = 0 https://rise4fun.com/Alive/LZ9 llvm-svn: 335512
* Handle NetBSD specific path in findDebugBinary()Kamil Rytarowski2018-06-251-0/+5
| | | | | | | | | | | | | | | | | | | | Summary: The NetBSD Operating System installs debuginfo files into /usr/libdata/debug, rather than other path like in some other popular distribution. This change makes llvm-symbolizer functional with the basesystem executables. Reviewers: joerg, vitalybuka Reviewed By: vitalybuka Subscribers: JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D48525 llvm-svn: 335511
* [WebAssembly] Add no-prototype attribute to prototype-less C functionsSam Clegg2018-06-252-0/+29
| | | | | | | | | | The WebAssembly backend in particular benefits from being able to distinguish between varargs functions (...) and prototype-less C functions. Differential Revision: https://reviews.llvm.org/D48443 llvm-svn: 335510
* [InstSimplify] add tests for div/rem with bool divisor; NFCSanjay Patel2018-06-252-0/+44
| | | | llvm-svn: 335509
* Re-land r335297 "[X86] Implement more of x86-64 large and medium PIC code ↵Reid Kleckner2018-06-2514-42/+545
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | models" The large code model allows code and data segments to exceed 2GB, which means that some symbol references may require a displacement that cannot be encoded as a displacement from RIP. The large PIC model even relaxes the assumption that the GOT itself is within 2GB of all code. Therefore, we need a special code sequence to materialize it: .LtmpN: leaq .LtmpN(%rip), %rbx movabsq $_GLOBAL_OFFSET_TABLE_-.LtmpN, %rax # Scratch addq %rax, %rbx # GOT base reg From that, non-local references go through the GOT base register instead of being PC-relative loads. Local references typically use GOTOFF symbols, like this: movq extern_gv@GOT(%rbx), %rax movq local_gv@GOTOFF(%rbx), %rax All calls end up being indirect: movabsq $local_fn@GOTOFF, %rax addq %rbx, %rax callq *%rax The medium code model retains the assumption that the code segment is less than 2GB, so calls are once again direct, and the RIP-relative loads can be used to access the GOT. Materializing the GOT is easy: leaq _GLOBAL_OFFSET_TABLE_(%rip), %rbx # GOT base reg DSO local data accesses will use it: movq local_gv@GOTOFF(%rbx), %rax Non-local data accesses will use RIP-relative addressing, which means we may not always need to materialize the GOT base: movq extern_gv@GOTPCREL(%rip), %rax Direct calls are basically the same as they are in the small code model: They use direct, PC-relative addressing, and the PLT is used for calls to non-local functions. This patch adds reasonably comprehensive testing of LEA, but there are lots of interesting folding opportunities that are unimplemented. I restricted the MCJIT/eh-lg-pic.ll test to Linux, since the large PIC code model is not implemented for MachO yet. Differential Revision: https://reviews.llvm.org/D47211 llvm-svn: 335508
* [CMake] Fix install-cxx target.Matt Morehouse2018-06-251-1/+1
| | | | | | Was broken by r334477. llvm-svn: 335507
* [InstCombine] add tests for add-of-sext-bool; NFCSanjay Patel2018-06-251-0/+22
| | | | | | | We canonicalize to select with a zext-add and either zext-sub or sext-sub, so this shows a pattern that's not conforming to the general trend. llvm-svn: 335506
* [GISel]: Update the end of GISel Opcode namespace.Aditya Nandakumar2018-06-251-1/+1
| | | | | | | G_ADDRSPACE_CAST was added at the end, but PRE_ISEL_GENERIC_OPCODE_END is still pointing incorrectly. llvm-svn: 335505
* [MachineOutliner] Outline from linkonceodrs by default in LTO when -moutline ↵Jessica Paquette2018-06-252-0/+12
| | | | | | | | | | | | is passed Pass -enable-linkonceodr-outlining by default when LTO is enabled. The outliner shouldn't compete with any sort of linker deduplication on linkonceodr functions when LTO is enabled. Therefore, this behaviour should be the default. llvm-svn: 335504
* [MachineOutliner] Make last of -moutline/-mno-outline winJessica Paquette2018-06-252-10/+8
| | | | | | | | The expected behaviour of command-line flags to clang is to have the last of -m(whatever) and -mno-(whatever) win. The outliner didn't do that. This fixes that and updates the test. llvm-svn: 335503
* [HWASan] Initalize shadow earler.Alex Shlyapnikov2018-06-251-4/+4
| | | | | | | | | | | | | | Summary: Initialize shadow memory before calling more libc functions to allow for HWASan-instrumented libc. Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48551 llvm-svn: 335502
* [X86] Sort the static memory folding tables by reg opcode. Remove the ↵Craig Topper2018-06-252-5419/+5328
| | | | | | | | | | | | reg->mem DenseMaps in favor of binary search. With the static tables sorted we can binary search them directly for reg->mem lookups. This removes 6 DenseMaps that had to be created when X86InstrInfo is constructed. We still have one Mem->Reg DenseMap for the reverse direction. This is created just as before by walking the reg->mem arrays to populate it. Differential Revision: https://reviews.llvm.org/D48527 llvm-svn: 335501
* [X86] Allow base and index for gather instructions to appear in other order ↵Craig Topper2018-06-252-0/+16
| | | | | | for Intel syntax. llvm-svn: 335500
* [ELF] Fix sort-non-script.sFangrui Song2018-06-251-1/+1
| | | | llvm-svn: 335499
* [ELF] Change test files for style consistency. NFCFangrui Song2018-06-2510-37/+37
| | | | | | | | | * Move `REQUIRES:` line to the top * llvm-mc ... -o %t -> llvm-mc ... -o %t.o * Don't check "TEXT" "DATA" columns (they are bfd-style names that do not fit into llvm well) in llvm-objdump output llvm-svn: 335498
* [SelectionDAG] Remove debug locations from ConstantSD(FP)NodesVedant Kumar2018-06-257-75/+28
| | | | | | | | | | | | | | | | | | This removes debug locations from ConstantSDNode and ConstantSDFPNode. When this kind of node is materialized we no longer create a line table entry which jumps back to the constant's first point of use. This makes single-stepping behavior smoother, and it matches the model used by IR, where Constants have no locations. See this thread for more context: http://lists.llvm.org/pipermail/llvm-dev/2018-June/124164.html I'd like to handle constant BuildVectorSDNodes and to try to eliminate passing SDLocs to SelectionDAG::getConstant*() in follow-up commits. Differential Revision: https://reviews.llvm.org/D48468 llvm-svn: 335497
* [llvm-mca] Rename Backend to Pipeline. NFC.Matt Davis2018-06-2522-96/+97
| | | | | | | | | | | | | | | | | | Summary: This change renames the Backend and BackendPrinter to Pipeline and PipelinePrinter respectively. Variables and comments have also been updated to reflect this change. The reason for this rename, is to be slightly more correct about what MCA is modeling. MCA models a Pipeline, which implies some logical sequence of stages. Reviewers: andreadb, courbet, RKSimon Reviewed By: andreadb, courbet Subscribers: mgorny, javed.absar, tschuett, gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D48496 llvm-svn: 335496
* Use Triple::isMIPS() instead of enumerating all Triples. NFCAlexander Richardson2018-06-2510-74/+31
| | | | | | | | Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D48549 llvm-svn: 335495
* [ELF] readobj -elf-output-style=GNU -> readelfFangrui Song2018-06-2512-16/+15
| | | | | | Style change for consistency. NFC llvm-svn: 335494
* Add Triple::isMIPS()/isMIPS32()/isMIPS64(). NFCAlexander Richardson2018-06-2511-26/+28
| | | | | | | | | | | | | | There are quite a few if statements that enumerate all these cases. It gets even worse in our fork of LLVM where we also have a Triple::cheri (which is mips64 + CHERI instructions) and we had to update all if statements that check for Triple::mips64 to also handle Triple::cheri. This patch helps to reduce our diff to upstream and should also make some checks more readable. Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D48548 llvm-svn: 335493
* [clang-format] Add a default format style that can be used by users of ↵Eric Liu2018-06-253-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | `getStyle` Summary: Tools that reformat code often call `getStyle` to decide the format style to use on a certain source file. In practice, "file" style is widely used. As a result, many tools hardcode "file" when calling `getStyle`, which makes it hard to control the default style in tools across a codebase when needed. This change introduces a `DefaultFormatStyle` constant (default to "file" in upstream), which can be modified downstream if wanted, so that all users/tools built from the same source tree can have a consistent default format style. This also adds an DefaultFallbackStyle that is recommended to be used by tools and can be modified downstream. Reviewers: sammccall, djasper Reviewed By: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48492 llvm-svn: 335492
* Revert "[ASTImporter] Import the whole redecl chain of functions"Gabor Marton2018-06-255-787/+111
| | | | | | This reverts commit r335480. llvm-svn: 335491
* AMDGPU/GlobalISel: Add support for llvm.amdgcn.kernarg.segment.ptrMatt Arsenault2018-06-255-1/+62
| | | | | | | | | Note a normal select test is not currently possible because this relies on input registers tracked in SIMachineFunctionInfo which are not currently serializable in MIR, but this does work end-to-end from the IR. llvm-svn: 335490
* [LLDB] Select helper sign comparison fixDavid Carlier2018-06-251-2/+2
| | | | | | | | | | | | The constant could be unsigned thus explicit cast to silent compilation warnings Reviewers: aprantl Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D48540 llvm-svn: 335489
* StackSlotColoring: Decide colors per stack IDMatt Arsenault2018-06-253-22/+150
| | | | | | | | | | | | | | | | I thought I fixed this in r308673, but that fix was very broken. The assumption that any frame index can be used in place of another was more widespread than I realized. Even when stack slot sharing was disabled, this was still replacing frame index uses with a different ID with a different stack slot. Really fix this by doing the coloring per-stack ID, so all of the coloring logically done in a separate namespace. This is a lot simpler than trying to figure out how to change the color if the stack ID is different. llvm-svn: 335488
* [libFuzzer] Use Vector rather than std::vector.Matt Morehouse2018-06-251-1/+1
| | | | llvm-svn: 335487
* AMDGPU: Remove commented out codeMatt Arsenault2018-06-251-2/+0
| | | | llvm-svn: 335486
OpenPOWER on IntegriCloud