summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the code that gets the Xcode path. After path normalization this could ↵Greg Clayton2018-05-101-1/+1
| | | | | | | | was failing. This meant if the "debugserver" binary was removed from the LLDB.framework, lldb wouldn't be able to find debugserver. llvm-svn: 332050
* [X86] Add new patterns for masked scalar load/store to match clang's codegen ↵Craig Topper2018-05-102-0/+270
| | | | | | | | | | | | from r331958. Clang's codegen now uses 128-bit masked load/store intrinsics in IR. The backend will widen to 512-bits on AVX512F targets. So this patch adds patterns to detect codegen's widening and patterns for AVX512VL that don't get widened. We may be able to drop some of the old patterns, but I leave that for a future patch. llvm-svn: 332049
* [tsan] Add debugging API to retrieve the "external tag" from reportsKuba Mracek2018-05-103-0/+88
| | | | | | Differential Revision: https://reviews.llvm.org/D46661 llvm-svn: 332048
* [asan] Enable memtrinsics interception for RTEMSWalter Lee2018-05-101-5/+5
| | | | | | | | | | Replace decltype(memcpy) with decltype(__asan_memcpy) because memcpy has not been defined in any headers on RTEMS. Similarly for memmove and memset. Differential Revision: https://reviews.llvm.org/D46625 llvm-svn: 332047
* [sanitizer] Port fast stack unwinder to sparcv8Walter Lee2018-05-103-1/+65
| | | | | | Differential Revision: https://reviews.llvm.org/D46469 llvm-svn: 332046
* implementing Cursor.get_included_file in python bindingsJonathan Coe2018-05-102-4/+23
| | | | | | | | | | | | | | | | | | | | Summary: adding function: `Cursor.get_included_file` , so the C API's `clang_getIncludedFile` function is available on the python binding interface also adding test to unittests related ticket: https://bugs.llvm.org/show_bug.cgi?id=15223 Reviewers: mgorny, arphaman, jbcoe Reviewed By: jbcoe Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46383 Patch by jlaz (József Láz) llvm-svn: 332045
* Revert "[InstCombine] snprintf optimizations"Martin Storsjo2018-05-103-230/+0
| | | | | | | | | This reverts commit SVN r331889, which could trigger failed assertions for cases where the snprintf function is declared with a vaguely differing signature (e.g. being defined as static inline), see PR37408. llvm-svn: 332043
* AMDGPU/GlobalISel: Implement select() for G_BITCAST s32 <--> <2 x s16>Tom Stellard2018-05-103-0/+47
| | | | | | | | | | Reviewers: arsenm, nhaehnle Subscribers: kzhuravl, wdng, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D45881 llvm-svn: 332042
* [LLVM-C] Consolidate llgo's DIBuilder BindingsRobert Widmann2018-05-108-102/+64
| | | | | | | | | | | | | | Summary: Move and correct LLVMDIBuilderCreateTypedef. This is the last API in DIBuilderBindings.h, so it is being removed and the C API will now be re-exported from IRBindings.h. Reviewers: whitequark, harlanhaskins, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46725 llvm-svn: 332041
* Fix PR37407 - callable traits don't correctly check complete types.Eric Fiselier2018-05-103-143/+39
| | | | | | | | | | | | | Checking for complete types is really rather tricky when you consider the amount of specializations required to check a function type. This specifically caused PR37407 where we incorrectly diagnosed noexcept function types as incomplete (but there were plenty of other cases that would cause this). This patch removes the complete type checking for now. I'm going to look into adding a clang builtin to correctly do this for us. llvm-svn: 332040
* AMDGPU/GlobalISel: Enable TableGen'd instruction selectorTom Stellard2018-05-108-4/+177
| | | | | | | | | | | | Reviewers: arsenm, nhaehnle Reviewed By: arsenm Subscribers: kzhuravl, wdng, mgorny, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D45994 llvm-svn: 332039
* Mitigate relocation overflow [part 1 of 2].Han Shen2018-05-1059-315/+371
| | | | | | | | | | | | This CL is to mitigate R_X86_64_PC32 relocation overflow problems for huge binaries that has near 4G allocated sections. By examining those binaries, there're 2 issues contributes to the problem: 1). huge ".dynsym" and ".dynstr" stands in the way between .rodata and .text 2). _init_array_start/end are placed at 0 if no ".init_array" presents, this causes .text relocation against them become more prone to overflow. This CL addresses 1st problem (the 2nd will be addressed in another CL.) by assigning a smaller sortrank to .dynsym and .dynstr thus they no longer stand in between. llvm-svn: 332038
* [libFuzzer] simplify tests, remove one redundant test; NFCKostya Serebryany2018-05-106-9/+5
| | | | llvm-svn: 332037
* [libFuzzer] remove the dump_coverage flag, it hasn't been working with the ↵Kostya Serebryany2018-05-107-38/+1
| | | | | | inline sanitizer coverage anyway llvm-svn: 332036
* Setup ORIGIN/NetBSD option in sanitizer testsKamil Rytarowski2018-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: NetBSD can use the approach that exists in FreeBSD, Linux and SunOS. Pick the FreeBSD one as marking programs with "-z origin" is useful. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc Reviewed By: vitalybuka Subscribers: emaste, fedor.sergeev, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D46718 llvm-svn: 332035
* [libFuzzer] remove the experimental support for clang coverage ↵Kostya Serebryany2018-05-1010-91/+1
| | | | | | instrumentation. This mode has not been used and our experiments with https://github.com/google/fuzzer-test-suite show that this signal is weaker than the SanitizerCoverage llvm-svn: 332034
* [asan] Initialize fake stack during thread initWalter Lee2018-05-102-3/+3
| | | | | | | | | | | If detect-stack-use-after-return is on, initialize fake stack during AsanThread::Init(), rather than lazily. This is required on Myriad. From kcc: "There used to be a reason why this was done lazily, but I don't remember if we still have that reason." Tested on x86. Differential Revision: https://reviews.llvm.org/D46626 llvm-svn: 332033
* [InstCombine] add folds for minnum(-a, -b) --> -maxnum(a, b)Sanjay Patel2018-05-103-21/+32
| | | | | | | | | | | This is similar to what we do for integer min/max with 'not' ops (rL321882). This should fix: https://bugs.llvm.org/show_bug.cgi?id=37404 https://bugs.llvm.org/show_bug.cgi?id=37405 llvm-svn: 332031
* [DWARF] Fixing a bug in DWARF v5 string offsets tables where the length ↵Wolfgang Pieb2018-05-1011-28/+38
| | | | | | | | | | | | | encoded the contribution length excluding the table header. Instead it must encode the contribution length minus the length field itself. Reviewer: JDevliegehere Differential Revision: https://reviews.llvm.org/D45922 llvm-svn: 332030
* [libFuzzer] Experimental data flow tracer for fuzz targets.Kostya Serebryany2018-05-103-0/+313
| | | | | | | | | | | | | | | | | | | | | Summary: Experimental data flow tracer for fuzz targets. Allows to tell which bytes of the input affect which functions of the fuzz target. We previously attempted to use DFSan directly in the libFuzzer process, and that didn't work nicely. Now we will try to collect the data flow information for the seed corpus in a separate process (using this tracer), and then use it in the regular libFuzzer runs. Reviewers: morehouse, pcc, Dor1s Reviewed By: morehouse, Dor1s Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D46666 llvm-svn: 332029
* [Itanium] Emit type info names with external linkage.Eric Fiselier2018-05-102-80/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The Itanium ABI requires that the type info for pointer-to-incomplete types to have internal linkage, so that it doesn't interfere with the type info once completed. Currently it also marks the type info name as internal as well. However, this causes a bug with the STL implementations, which use the type info name pointer to perform ordering and hashing of type infos. For example: ``` // header.h struct T; extern std::type_info const& Info; // tu_one.cpp #include "header.h" std::type_info const& Info = typeid(T*); // tu_two.cpp #include "header.h" struct T {}; int main() { auto &TI1 = Info; auto &TI2 = typeid(T*); assert(TI1 == TI2); // Fails assert(TI1.hash_code() == TI2.hash_code()); // Fails } ``` This patch fixes the STL bug by emitting the type info name as linkonce_odr when the type-info is for a pointer-to-incomplete type. Note that libc++ could fix this without a compiler change, but the quality of fix would be poor. The library would either have to: (A) Always perform strcmp/string hashes. (B) Determine if we have a pointer-to-incomplete type, and only do strcmp then. This would require an ABI break for libc++. Reviewers: rsmith, rjmccall, majnemer, vsapsai Reviewed By: rjmccall Subscribers: smeenai, cfe-commits Differential Revision: https://reviews.llvm.org/D46665 llvm-svn: 332028
* Register NetBSD/i386 in asan_mapping.hKamil Rytarowski2018-05-101-0/+10
| | | | | | | | | | | | | | | | | | | | | Summary: Introduce kNetBSD_ShadowOffset32 and document NetBSD/i386 (hosted on amd64 kernel) process virtual address space ranges. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, vitalybuka Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D46708 llvm-svn: 332027
* [InstCombine] Moving overflow computation logic from InstCombine to ↵Omer Paparo Bivas2018-05-105-86/+129
| | | | | | | | | ValueTracking; NFC Differential Revision: https://reviews.llvm.org/D46704 Change-Id: Ifabcbe431a2169743b3cc310f2a34fd706f13f02 llvm-svn: 332026
* [InstCombine] add minnum/maxnum tests (PR37404, PR37405); NFCSanjay Patel2018-05-102-1/+165
| | | | llvm-svn: 332025
* [X86] Initialize HasPTWRITE member of X86SubtargetGabor Buella2018-05-101-0/+1
| | | | | | | This was missing from r331961. Caught by sanitizer bots. llvm-svn: 332024
* Reland "[tools] Updating PPCallbacks::InclusionDirective calls"Julie Hockett2018-05-1010-13/+24
| | | | | | | | | This commit relands r331905. r331904 added SrcMgr::CharacteristicKind to the InclusionDirective callback, this revision updates instances of it in clang-tools-extra. llvm-svn: 332023
* [X86] Convert/Merge more instregex patterns to reduce InstrRW compile time.Simon Pilgrim2018-05-106-243/+162
| | | | | | Use instrs lists or merge multiple instregex patterns. llvm-svn: 332022
* Reland '[clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective'Julie Hockett2018-05-1013-48/+106
| | | | | | | | | | | | | | This commit relands r331904. Adding a SrcMgr::CharacteristicKind parameter to the InclusionDirective in PPCallbacks, and updating calls to that function. This will be useful in https://reviews.llvm.org/D43778 to determine which includes are system headers. Differential Revision: https://reviews.llvm.org/D46614 llvm-svn: 332021
* [lsan] Try to fix test failure due to compiler optimizationPeter Wu2018-05-101-7/+4
| | | | | | | | | | | | | | Summary: The SanitizerCommon-lsan-x86_64-Linux test failed due to the address of the very first allocation ending up in the stack through "delete[]". Workaround this by performing another allocation. The issue was only present with optimization enabled, the test would pass with -O0. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D46650 llvm-svn: 332020
* COFF: Don't create unnecessary thunks.Peter Collingbourne2018-05-105-30/+28
| | | | | | | | | A thunk is only needed if a relocation points to the undecorated import name. Differential Revision: https://reviews.llvm.org/D46673 llvm-svn: 332019
* Allow dllimport non-type template arguments in C++17Reid Kleckner2018-05-105-22/+112
| | | | | | | | | | | Summary: Fixes PR35772. Reviewers: rsmith Differential Revision: https://reviews.llvm.org/D43320 llvm-svn: 332018
* Add regression test for r331976George Burgess IV2018-05-101-0/+30
| | | | | | | | | | | | | | | | | | | | In general, it's difficult to poke the ConstantExpr code in CFLAA, since LLVM is so great at eagerly reducing ConstantExprs. :) Sadly, this only shows a functional difference from before the patch because CFLAA has some special logic around taking loads of non-pointers into account. Namely, with the broken select behavior, CFLAA will completely fail to take note of @g3. Since CFLAA doesn't have any record about @g3 when we do an alias query for @g3 and %a, it conservatively answers MayAlias. When we properly take @g3 into account with the new select logic, we get NoAlias for this query. I suspect that the aforementioned "special logic" isn't completely correct, but this test-case should prevent future wonky aliasing results from appearing for these flavors of ConstantExprs, so I think it's still worth having. llvm-svn: 332017
* [OPENMP, NVPTX] Initial support for L2 parallelism in SPMD mode.Alexey Bataev2018-05-106-73/+216
| | | | | | | | Added initial support for L2 parallelism in SPMD mode. Note, though, that the orphaned parallel directives are not currently supported in SPMD mode. llvm-svn: 332016
* [CGP] Split large data structres to sink more GEPsHaicheng Wu2018-05-105-26/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accessing the members of a large data structures needs a lot of GEPs which usually have large offsets due to the size of the underlying data structure. If the offsets are too large to fit into the r+i addressing mode, these GEPs cannot be sunk to their users' blocks and many extra registers are needed then to carry the values of these GEPs. This patch tries to split a large data struct starting from %base like the following. Before: BB0: %base = BB1: %gep0 = gep %base, off0 %gep1 = gep %base, off1 %gep2 = gep %base, off2 BB2: %load1 = load %gep0 %load2 = load %gep1 %load3 = load %gep2 After: BB0: %base = %new_base = gep %base, off0 BB1: %new_gep0 = %new_base %new_gep1 = gep %new_base, off1 - off0 %new_gep2 = gep %new_base, off2 - off0 BB2: %load1 = load i32, i32* %new_gep0 %load2 = load i32, i32* %new_gep1 %load3 = load i32, i32* %new_gep2 In the above example, the struct is split into two parts. The first part still starts from %base and the second part starts from %new_base. After the splitting, %new_gep1 and %new_gep2 have smaller offsets and then can be sunk to BB2 and folded into their users. The algorithm to split data structure is simple and very similar to the work of merging SExts. First, it collects GEPs that have large offsets when iterating the blocks. Second, it splits the underlying data structures and updates the collected GEPs to use smaller offsets. Differential Revision: https://reviews.llvm.org/D42759 llvm-svn: 332015
* [LLVM-C] Add Accessors for Common DIType and DILocation PropertiesRobert Widmann2018-05-102-0/+115
| | | | | | | | | | | | | | | | Summary: - Adds getters for the line, column, and scope of a DILocation - Adds getters for the name, size in bits, offset in bits, alignment in bits, line, and flags of a DIType Reviewers: whitequark, harlanhaskins, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46627 llvm-svn: 332014
* [WebAssembly] Add a flag to control merging data segmentsSam Clegg2018-05-105-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merging data segments produces smaller code sizes because each segment has some boilerplate. Therefore, merging data segments is generally the right approach, especially with wasm where binaries are typically delivered over the network. However, when analyzing wasm binaries, it can be helpful to get a conservative picture of which functions are using which data segments[0]. Perhaps there is a large data segment that you didn't expect to be included in the wasm, introduced by some library you're using, and you'd like to know which library it was. In this scenario, merging data segments only makes the analysis worse. Alternatively, perhaps you will remove some dead functions by-hand[1] that can't be statically proven dead by the compiler or lld, and removing these functions might make some data garbage collect-able, and you'd like to run `--gc-sections` again so that this now-unused data can be collected. If the segments were originally merged, then a single use of the merged data segment will entrench all of the data. [0] https://github.com/rustwasm/twiggy [1] https://github.com/fitzgen/wasm-snip Patch by Nick Fitzgerald! Differential Revision: https://reviews.llvm.org/D46417 llvm-svn: 332013
* lld-link: Add --color-diagnostics(={always,never,auto})?, ↵Nico Weber2018-05-106-13/+43
| | | | | | | | | | | | | | | --no-color-diagnostics flags. This is most useful when using lld-link on a non-Win host (but it might become useful on Windows too if lld also grows a fansi-escape-codes flag). Also make the help for --color-diagnostic mention the valid values in ELF and wasm, and print the flag name with two dashes in diags, since the one-dash form is seen as a list of many one-letter flags in some contexts. https://reviews.llvm.org/D46693 llvm-svn: 332012
* [WebAssembly] Simplify writing of exports section. NFC.Sam Clegg2018-05-101-34/+25
| | | | | | Differential Revision: https://reviews.llvm.org/D43963 llvm-svn: 332011
* [LLVM-C] Move DIBuilder Bindings For Temporary MDNodesRobert Widmann2018-05-107-33/+70
| | | | | | | | | | | | | | Summary: Move LLVMTemporaryMDNode and LLVMMetadataReplaceAllUsesWith to the C bindings and add LLVMDeleteTemporaryMDNode for deleting non-RAUW'ed temporary nodes. Reviewers: whitequark, harlanhaskins, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46632 llvm-svn: 332010
* [WebAssembly] Remove final -wasm component of target triple. NFC.Sam Clegg2018-05-1055-55/+55
| | | | | | This has been the default for a while now. llvm-svn: 332009
* [WebAsembly] Update default triple in test files to wasm32-unknown-unkown.Sam Clegg2018-05-10116-121/+121
| | | | | | | | | | Summary: The final -wasm component has been the default for some time now. Subscribers: jfb, dschuff, jgravelle-google, eraman, aheejin, JDevlieghere, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D46342 llvm-svn: 332007
* [X86][Znver1] Remove unnecessary SchedWritePMULLD InstRW overrides.Simon Pilgrim2018-05-101-17/+2
| | | | llvm-svn: 332006
* [WebAssembly] Create section start symbols automatically for all sectionsSam Clegg2018-05-104-22/+39
| | | | | | | | | | | These symbols only get included in the output symbols table if they are used in a relocation. This behaviour matches more closely the ELF object writer. Differential Revision: https://reviews.llvm.org/D46561 llvm-svn: 332005
* [PM/LoopUnswitch] Avoid pointlessly creating an exit block set.Chandler Carruth2018-05-101-19/+4
| | | | | | | This code can just test whether blocks are *in* the loop, which we already have a dedicated set tracking in the loop itself. llvm-svn: 332004
* wrong usages of sem_open in the libFuzzerKamil Rytarowski2018-05-102-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fixed two non-standard usages of sem_open in the libFuzzer library and one NetBSD-related modification with test script. - The return value to indicate error should be SEM_FAILED instead of (void *)-1 (please refer to "RETURN VALUE" section in this [[ http://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_open.html | page ]]). Actually, SEM_FAILED != (void *)-1 holds in NetBSD. - The SharedMemoryRegion::SemName function should return name starting with slash. Because the behaviour of name which does not start with slash is unspecified as the [[ http://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_open.html | "DESCRIPTION" section ]] specified: > If name does not begin with the <slash> character, the effect is implementation-defined. - The length of name is limited to 14 in NetBSD, it is suggested to reduce the length of equivalence server name in the test script. Patch by: Yang Zheng Reviewers: vitalybuka, krytarowski, kcc Reviewed By: kcc Subscribers: kcc, #sanitizers, llvm-commits, joerg Differential Revision: https://reviews.llvm.org/D46622 llvm-svn: 332003
* [X86][SNB] Fix typo in PEXTRDmr instregex, was missing VPEXTRDmr.Simon Pilgrim2018-05-102-7/+5
| | | | llvm-svn: 332002
* More notes on Rapperswil issuesMarshall Clow2018-05-101-9/+9
| | | | llvm-svn: 332000
* [X86] Split ↵Simon Pilgrim2018-05-1016-406/+201
| | | | | | | | WriteVecALU/WriteVecLogic/WriteShuffle/WriteVarShuffle/WritePSADBW/WritePHAdd scheduler classes Split off XMM classes from the default (MMX) classes. llvm-svn: 331999
* [InstCombine] regenerate full checks; NFCSanjay Patel2018-05-102-281/+341
| | | | llvm-svn: 331998
* [mips] Accept 32-bit offsets for ld/sd/lld commandsSimon Atanasyan2018-05-104-10/+42
| | | | | | | | | | | | This is a follow up to the rL330983. The patch teaches ld, sd, and lld commands accept 32-bit memory offsets by replacing `mem_simm16` operand to `mem_simmptr`. In fact, these commands should accept 64-bit offsets, but so large offsets require another command expanding and will be supported by a separate patch. Differential Revision: https://reviews.llvm.org/D46629 llvm-svn: 331997
OpenPOWER on IntegriCloud