summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make ICP uses PSI to check for hotness.Dehao Chen2017-08-087-30/+33
| | | | | | | | | | | | | | Summary: Currently, ICP checks the count against a fixed value to see if it is hot enough to be promoted. This does not work for SamplePGO because sampled count may be much smaller. This patch uses PSI to check if the count is hot enough to be promoted. Reviewers: davidxl, tejohnson, eraman Reviewed By: davidxl Subscribers: sanjoy, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D36341 llvm-svn: 310416
* [demangler] Rename some variables, NFCErik Pilkington2017-08-081-662/+662
| | | | llvm-svn: 310415
* Add NetBSD support in asan_malloc_linux.ccKamil Rytarowski2017-08-081-2/+4
| | | | | | | | | | | | | | | | | | | Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, fjricci, vitalybuka, filcab Reviewed By: fjricci Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36376 llvm-svn: 310414
* Add NetBSD support in asan_symbolize.pyKamil Rytarowski2017-08-081-2/+2
| | | | | | | | | | | | | | | | | | | Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, filcab, vitalybuka, kcc, fjricci Reviewed By: fjricci Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36484 llvm-svn: 310413
* Enable ubsan on NetBSDKamil Rytarowski2017-08-084-9/+16
| | | | | | | | | | | | | | | | | | | Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, filcab, fjricci Reviewed By: fjricci Subscribers: srhines, kubamracek, mgorny, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36483 llvm-svn: 310412
* Reuse sanitizer_linux for NetBSDKamil Rytarowski2017-08-082-18/+110
| | | | | | | | | | | | | | | | | | | | | Summary: Follow FreeBSD and reuse sanitizer_linux for NetBSD. Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, filcab, vitalybuka, fjricci, dvyukov Reviewed By: fjricci Subscribers: dvyukov, emaste, kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36325 llvm-svn: 310411
* [codeview] Emit nested enums and typedefs from classesReid Kleckner2017-08-085-16/+195
| | | | | | | | | | Previously we limited ourselves to only emitting nested classes, but we need other kinds of types as well. This fixes the Visual Studio STL visualizers, so that users can visualize std::string and other objects. llvm-svn: 310410
* [sanitizer-coverage] -fsanitize-coverage=bb,inline-8bit-countersKostya Serebryany2017-08-082-1/+5
| | | | llvm-svn: 310409
* Integrate Kostya's clang-proto-fuzzer with LLVM.Matt Morehouse2017-08-0814-43/+529
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The clang-proto-fuzzer models a subset of C++ as a protobuf and uses libprotobuf-mutator to generate interesting mutations of C++ programs. Clang-proto-fuzzer has already found several bugs in Clang (e.g., https://bugs.llvm.org/show_bug.cgi?id=33747, https://bugs.llvm.org/show_bug.cgi?id=33749). As with clang-fuzzer, clang-proto-fuzzer requires the following cmake flags: - CMAKE_C_COMPILER=clang - CMAKE_CXX_COMPILER=clang++ - LLVM_USE_SANITIZE_COVERAGE=YES // needed for libFuzzer - LLVM_USE_SANITIZER=Address // needed for libFuzzer In addition, clang-proto-fuzzer requires: - CLANG_ENABLE_PROTO_FUZZER=ON clang-proto-fuzzer also requires the following dependencies: - binutils // needed for libprotobuf-mutator - liblzma-dev // needed for libprotobuf-mutator - libz-dev // needed for libprotobuf-mutator - docbook2x // needed for libprotobuf-mutator - Recent version of protobuf [3.3.0 is known to work] A working version of libprotobuf-mutator will automatically be downloaded and built as an external project. Implementation of clang-proto-fuzzer provided by Kostya Serebryany. https://bugs.llvm.org/show_bug.cgi?id=33829 Reviewers: kcc, vitalybuka, bogner Reviewed By: kcc, vitalybuka Subscribers: thakis, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D36324 llvm-svn: 310408
* [InstCombine] Support pulling left shifts through a subtract with constant LHSCraig Topper2017-08-082-0/+58
| | | | | | | | We already support pulling through an add with constant RHS. We can do the same for subtract. Differential Revision: https://reviews.llvm.org/D36443 llvm-svn: 310407
* [coverage] Special-case calls to noreturn functions.Eli Friedman2017-08-083-0/+34
| | | | | | | | | | | | | | | The code after a noreturn call doesn't execute. The pattern in the testcase is pretty common in LLVM (a switch with a default case that calls llvm_unreachable). The original version of this patch was reverted in r309995 due to a crash. This version includes a fix for that crash (testcase in test/CoverageMapping/md.cpp). Differential Revision: https://reviews.llvm.org/D36250 llvm-svn: 310406
* [DAG] Introduce peekThroughBitcast function. NFCI.Nirav Dave2017-08-081-23/+14
| | | | llvm-svn: 310405
* [DAG] Update comments. NFC.Nirav Dave2017-08-081-8/+9
| | | | llvm-svn: 310404
* Thread Safety Analysis: warn on nonsensical attributes.Josh Gao2017-08-084-34/+102
| | | | | | | | | | | | | Add warnings in cases where an implicit `this` argument is expected to attributes because either `this` doesn't exist because the attribute is on a free function, or because `this` is on a type that doesn't have a corresponding capability/lockable/scoped_lockable attribute. Reviewers: delesley, aaron.ballman Differential Revision: https://reviews.llvm.org/D36237 llvm-svn: 310403
* Reland "Thread Safety Analysis: fix assert_capability."Josh Gao2017-08-085-13/+58
| | | | | | | | | | | Delete the test that was broken by rL309725, and add it back in a follow up commit. Also, improve the tests a bit. Reviewers: delesley, aaron.ballman Differential Revision: https://reviews.llvm.org/D36237 llvm-svn: 310402
* PR19668, PR23034: Fix handling of move constructors and deleted copyRichard Smith2017-08-0811-128/+332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | constructors when deciding whether classes should be passed indirectly. This fixes ABI differences between Clang and GCC: * Previously, Clang ignored the move constructor when making this determination. It now takes the move constructor into account, per https://github.com/itanium-cxx-abi/cxx-abi/pull/17 (this change may seem recent, but the ABI change was agreed on the Itanium C++ ABI list a long time ago). * Previously, Clang's behavior when the copy constructor was deleted was unstable -- depending on whether the lazy declaration of the copy constructor had been triggered, you might get different behavior. We now eagerly declare the copy constructor whenever its deletedness is unclear, and ignore deleted copy/move constructors when looking for a trivial such constructor. This also fixes an ABI difference between Clang and MSVC: * If the copy constructor would be implicitly deleted (but has not been lazily declared yet), for instance because the class has an rvalue reference member, we would pass it directly. We now pass such a class indirectly, matching MSVC. llvm-svn: 310401
* Add NetBSD support in asan_interceptors.ccKamil Rytarowski2017-08-081-0/+5
| | | | | | | | | | | | | | | | | | | Summary: Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, vitalybuka, filcab, fjricci Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36470 llvm-svn: 310400
* [AMDGPU] Add llvm.amdgpu.update.dpp intrinsicConnor Abbott2017-08-083-0/+34
| | | | | | | | | | | | | | | | | | Summary: Now that we've made all the necessary backend changes, we can add a new intrinsic which exposes the new capabilities to IR producers. Since llvm.amdgpu.update.dpp is a strict superset of llvm.amdgpu.mov.dpp, we should deprecate the former. We also add tests for all the functionality that was added in previous changes, now that we can access it via an IR construct. Reviewers: tstellar, arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye Differential Revision: https://reviews.llvm.org/D34718 llvm-svn: 310399
* [NewGVN] Use a cast instead of a dyn_cast.Chad Rosier2017-08-081-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D36478 llvm-svn: 310397
* [PDB] Fix linking of function symbols and local variables.Zachary Turner2017-08-0814-44/+207
| | | | | | | | | | | | | | | | | | | | | | | | The compiler outputs PROC32_ID symbols into the object files for functions, and these symbols have an embedded type index which, when copied to the PDB, refer to the IPI stream. However, the symbols themselves are also converted into regular symbols (e.g. S_GPROC32_ID -> S_GPROC32), and type indices in the regular symbol records refer to the TPI stream. So this patch applies two fixes to function records. 1. It converts ID symbols to the proper non-ID record type. 2. After remapping the type index from the object file's index space to the PDB file/IPI stream's index space, it then remaps that index to the TPI stream's index space by. Besides functions, during the remapping process we were also discarding symbol record types which we did not recognize. In particular, we were discarding S_BPREL32 records, which is what MSVC uses to describe local variables on the stack. So this patch fixes that as well by copying them to the PDB. Differential Revision: https://reviews.llvm.org/D36426 llvm-svn: 310394
* dsymutil: support dwarf version mismatches between object and clang moduleAdrian Prantl2017-08-083-1/+26
| | | | | | | | | | This adds a missing call to maybeUpdateMaxDwarfVersion when visitng a clang module. Failing to do so will cause a failure when emitting DWARF 4 forms into a CU that AsmPrinter believes to be DWARF 2. rdar://problem/33666528 llvm-svn: 310392
* NetBSD compatibility nit in asan_test_utils.hKamil Rytarowski2017-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: Do not include <malloc.h> on NetBSD, as this header serves on this OS backward compatibility with K&R alias for <stdlib.h>. Sponsored by <The NetBSD Foundation> Reviewers: vitalybuka, kcc, joerg, filcab, fjricci Reviewed By: vitalybuka Subscribers: kubamracek, llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36469 llvm-svn: 310391
* [LoopVectorize] Fix assertion failure in Fcmp vectorizationAnna Thomas2017-08-082-1/+28
| | | | | | | | | | | | | | | | | | | | | Summary: When vectorizing fcmps we can trip on incorrect cast assertion when setting the FastMathFlags after generating the vectorized FCmp. This can happen if the FCmp can be folded to true or false directly. The fix here is to set the FastMathFlag using the FastMathFlagBuilder *before* creating the FCmp Instruction. This is what's done by other optimizations such as InstCombine. Added a test case which trips on cast assertion without this patch. Reviewers: Ayal, mssimpso, mkuper, gilr Reviewed by: Ayal, mssimpso Subscribers: llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D36244 llvm-svn: 310389
* Restore previous structure ABI behavior for bit-fields with the packed ↵Aaron Ballman2017-08-083-8/+37
| | | | | | | | | | attribute for PS4 targets. An ABI change was introduced in r254596 that modified structure layouts when the 'packed' attribute was used on one-byte bitfields. Since the PS4 target needs to maintain backwards compatibility for all structure layouts, this change reintroduces the old behavior for PS4 targets only. It also introduces PS4 specific cases to the relevant test. Patch by Matthew Voss. llvm-svn: 310388
* [OPENMP][DEBUG] Set proper address space info if required by target.Alexey Bataev2017-08-0811-49/+333
| | | | | | | | | | | Arguments, passed to the outlined function, must have correct address space info for proper Debug info support. Patch sets global address space for arguments that are mapped and passed by reference. Also, cuda-gdb does not handle reference types correctly, so reference arguments are represented as pointers. llvm-svn: 310387
* [X86] Support 'avx5124vnniw' and 'avx5124fmaps' for __builtin_cpu_supports.Craig Topper2017-08-083-2/+9
| | | | | | They still need to be implemented in the intrinsics, the command line, and the backend. But this change isn't dependent on any of that and resolves a TODO. llvm-svn: 310386
* [test] Add descriptions and pseudocode to tests. NFC.Michael Kruse2017-08-088-1/+94
| | | | llvm-svn: 310385
* Revert "[ARM] Fix assembly and disassembly for VMRS/VMSR"Tim Northover2017-08-089-436/+64
| | | | | | | | This reverts r310243. Only MVFR2 is actually restricted to v8 and it'll be a little while before we can get a proper fix together. Better that we allow incorrect code than reject correct in the meantime. llvm-svn: 310384
* [DomTree] Use a non-recursive DFS instead of a recursive one; NFCSanjoy Das2017-08-081-27/+35
| | | | | | | | | | | | Summary: The recursive DFS can stack overflow in pathological cases. Reviewers: kuhar Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D36442 llvm-svn: 310383
* [Availability] Don't make an availability attribute imply default visibility ↵Erik Pilkington2017-08-083-11/+6
| | | | | | | | | | on macOS Fixes PR33796, rdar://33655115 Differential revision: https://reviews.llvm.org/D36191 llvm-svn: 310382
* [DeLICM/ZoneAlgo] Remove duplicate code. NFC.Michael Kruse2017-08-083-31/+8
| | | | | | | | DeLICM and ZoneAlgo both implemented filterKnownValInst. Declare ZoneAlgo's version in the header and let DeLCIM use it. llvm-svn: 310381
* Use SCEV information for the second level aliasingRoman Gareev2017-08-085-11/+187
| | | | | | | | | | | | | | | | | | | | | We introduce another level of alias metadata to distinguish the individual non-aliasing accesses that have inter iteration alias-free base pointers marked with "Inter iteration alias-free" mark nodes. To distinguish two accesses, the comparison of raw pointers representing base pointers is used. In case of, for example, ublas's prod function that implements GEMM, and DeLiCM we can get accesses to same location represented by different raw pointers. Consequently, we create different alias sets that can prevent accesses from, for example, being sinked or hoisted. To avoid the issue, we compare the corresponding SCEV information instead of the corresponding raw pointers. Reviewed-by: Tobias Grosser <tobias@grosser.es> Differential Revision: https://reviews.llvm.org/D35761 llvm-svn: 310380
* Revert "[OPENMP][DEBUG] Set proper address space info if required by target."Alexey Bataev2017-08-0810-359/+54
| | | | | | This reverts commit r310377. llvm-svn: 310379
* [KnownBits][ValueTracking] Move the math for calculating known bits for ↵Craig Topper2017-08-084-41/+71
| | | | | | | | | | | | add/sub into a static method in KnownBits object I want to reuse this code in SimplifyDemandedBits handling of Add/Sub. This will make that easier. Wonder if we should use it in SelectionDAG's computeKnownBits too. Differential Revision: https://reviews.llvm.org/D36433 llvm-svn: 310378
* [OPENMP][DEBUG] Set proper address space info if required by target.Alexey Bataev2017-08-0810-54/+359
| | | | | | | | | | | Arguments, passed to the outlined function, must have correct address space info for proper Debug info support. Patch sets global address space for arguments that are mapped and passed by reference. Also, cuda-gdb does not handle reference types correctly, so reference arguments are represented as pointers. llvm-svn: 310377
* Use "foo-12345.o.tmp" instead of "foo.o-12345" as temporary file name.Nico Weber2017-08-081-2/+8
| | | | | | | | | | | | | | | This helps some tools that do things based on the output's extension. For example, we got reports from users on Windows that have a tool that scan a build output dir (but skip .obj files). The tool would keep the "foo.obj-12345" file open, and then when clang tried to rename the temp file to the final output filename, that would fail. By making the tempfile end in ".obj.tmp", tools like this could now have a rule to ignore .tmp files. This is a less ambitious reland of https://reviews.llvm.org/D36238 https://reviews.llvm.org/D36413 llvm-svn: 310376
* [RISCV] Fix warning about unused getSubtargetFeatureName()Alex Bradbury2017-08-081-1/+0
| | | | llvm-svn: 310375
* Do not use isl_set_project_out to get all loop prefixesRoman Gareev2017-08-084-9/+488
| | | | | | | | | | | | Currently, only convex isolation sets can be efficiently processed by isl. Consequently, as a temporary solution, we use a different algorithm for partial tile isolation that helps to build convex isolation sets in some cases. Reviewed-by: Tobias Grosser <tobias@grosser.es> Differential Revision: https://reviews.llvm.org/D36278 llvm-svn: 310374
* BasicAA: aliasGEP shouldn't get a PartialAlias response hereNuno Lopes2017-08-081-1/+3
| | | | | | add an assert() to ensure that's the case (as I'm not convinced it won't happen) llvm-svn: 310373
* [DAGCombiner] simplifyShuffleMask - handle UNDEF inputs from shuffles as ↵Simon Pilgrim2017-08-082-13/+12
| | | | | | | | well as BUILD_VECTOR Minor extension to D36393 llvm-svn: 310372
* [clang-tidy] Add new readability non-idiomatic static access checkGabor Horvath2017-08-089-0/+429
| | | | | | | | Patch by: Lilla Barancsuk Differential Revision: https://reviews.llvm.org/D35937 llvm-svn: 310371
* Enable COMPILER_RT_HAS_SANITIZER_COMMON on NetBSDKamil Rytarowski2017-08-081-2/+3
| | | | | | | | | | | | | | | | | | | | | Summary: Temporarily keep disabled COMPILER_RT_HAS_ASAN on NetBSD. Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas. Sponsored by <The NetBSD Foundation> Reviewers: joerg, filcab, kcc, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, mgorny, #sanitizers, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36312 llvm-svn: 310370
* [RegisterPasses] Run polly-simplify also right after scop modelingTobias Grosser2017-08-081-0/+2
| | | | | | | | This allows us to get rid of stores that are overwritten within the very same basic block, without ever being read beforehand. This simplification is necessary for delicm to run on pb4's correlation. llvm-svn: 310369
* Non-functional change. Fix test for D29654.Gheorghe-Teodor Bercea2017-08-081-1/+1
| | | | llvm-svn: 310368
* clang-format: [JS] fix union type spacing in object & array types.Martin Probst2017-08-082-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, clang-format would insert whitespace in union types nested in object and array types, as it wouldn't recognize those as a type operator: const x: {foo: number | null}; const x: [number | null]; While this is correct for actual binary operators, clang-format should not insert whitespace into union and intersection types to mark those: const x: {foo: number|null}; const x: [number|null]; This change propagates that the context is not an expression by inspecting the preceding token and marking as non-expression if it was a type colon. Reviewers: djasper Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36136 llvm-svn: 310367
* [clang-tidy] 'implicit cast' -> 'implicit conversion'Alexander Kornienko2017-08-0818-320/+356
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch renames checks, check options and changes messages to use correct term "implicit conversion" instead of "implicit cast" (which has been in use in Clang AST since ~10 years, but it's still technically incorrect w.r.t. C++ standard). * performance-implicit-cast-in-loop -> performance-implicit-conversion-in-loop * readability-implicit-bool-cast -> readability-implicit-bool-conversion - readability-implicit-bool-cast.AllowConditionalIntegerCasts -> readability-implicit-bool-conversion.AllowIntegerConditions - readability-implicit-bool-cast.AllowConditionalPointerCasts -> readability-implicit-bool-conversion.AllowPointerConditions Reviewers: hokein, jdennett Reviewed By: hokein Subscribers: mgorny, JDevlieghere, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D36456 llvm-svn: 310366
* clang-format: [JS] handle single lines comments ending in `\\`.Martin Probst2017-08-082-0/+50
| | | | | | | | | | | | | | Summary: Previously, clang-format would consider the following code line to be part of the comment and incorrectly format the rest of the file. Reviewers: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D36159 llvm-svn: 310365
* Revert "[OPENMP][DEBUG] Set proper address space info if required by target."Alexey Bataev2017-08-0810-352/+49
| | | | | | This reverts commit r310360. llvm-svn: 310364
* [RISCV] Add basic RISCVAsmParser (missing files)Alex Bradbury2017-08-083-0/+399
| | | | | | | | This commit adds the files missing from rL310361. Apologies for the noise. Differential Revision: https://reviews.llvm.org/D23563 llvm-svn: 310363
* [OpenMP] OpenMP device offloading code generation produces a cubin file ↵Gheorghe-Teodor Bercea2017-08-088-132/+286
| | | | | | | | which is then integrated in the host binary using the host linker. Diff: D29654 llvm-svn: 310362
OpenPOWER on IntegriCloud