summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve caching scheme in ProvenanceAnalysis.Michael Zolotukhin2018-03-123-8/+20
| | | | | | | | | | | | | | | | | | | | | | Summary: ProvenanceAnalysis::related(A, B) currently memoizes its results, and on big tests the cache grows too large, and we're spending most of the time growing/looking through DenseMap. This patch reduces the size of the cache by normalizing keys first: we do that by calling GetUnderlyingObjCPtr on the input values. The results of GetUnderlyingObjCPtr are also memoized in a separate cache. The patch doesn't bring noticable changes to compile time on CTMark, however significantly helps one of our internal tests. Reviewers: gottesmm Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D44270 llvm-svn: 327328
* Revert "Improve prologue handling to support functions with multiple entry ↵Vedant Kumar2018-03-129-82/+3
| | | | | | | | | | | | | | | points." This reverts commit r327318. It breaks the Xcode and CMake Darwin builders: clang: error: no such file or directory: '.../source/Plugins/Architecture/PPC64/ArchitecturePPC64.cpp' clang: error: no input files More details are in https://reviews.llvm.org/D42582. llvm-svn: 327327
* [WebAssembly] Refactor to avoid conflating global and fucntion index space. NFCSam Clegg2018-03-127-88/+96
| | | | | | Differential Revision: https://reviews.llvm.org/D44358 llvm-svn: 327326
* [WebAssembly] Verify contents of relocation target before writing itSam Clegg2018-03-123-0/+61
| | | | | | | | | | | | Verify that the location where a relocation is about the be applied contains the expected existing value. This is essentially a sanity check to catch bugs in the compiler and the linker. Differential Revision: https://reviews.llvm.org/D44349 llvm-svn: 327325
* nan: ImplementJan Vesely2018-03-126-0/+52
| | | | | | | | Passes CTS on carrizo and turks Reviewer: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 327324
* travis: Add build using llvm-6Jan Vesely2018-03-121-0/+22
| | | | | | Acked-by: Aaron Watry <awatry@gmail.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 327323
* [Tooling] Clear the PreambleSrcLocCache when preamble is discarded during ↵Alex Lorenz2018-03-125-0/+17
| | | | | | | | | | | reparsing This ensures that diagnostics are not remapped to incorrect preamble locations after the second reparse with a remapped header file occurs. rdar://37502480 llvm-svn: 327322
* [scudo] Secondary allocator overhaul to support WindowsKostya Kortchinsky2018-03-122-56/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The need for this change stems from the fact that Windows doesn't support partial unmapping (`MEM_RELEASE` implies the entire allocated region). So we now have to keep track of the reserved region and the committed region, so that we can function without the trimming we did when dealing with larger alignments. Instead of just having a `ReservedAddressRange` per chunk, we introduce a `LargeChunkHeader` (and `LargeChunk` namespace) that additionally holds the committed size and the usable size. The former is needed for stats purposes, the latter is used by the frontend. Requiring both is debatable, we could only work with the usable size but then be off by up to a page per chunk when dealing with stats. Additionally, we introduce more stats since they turned out to be useful for experiments, and a `PrintStats` function that will be used by the combined allocator in later patch. Reviewers: alekseyshl, flowerhack Reviewed By: alekseyshl Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D43949 llvm-svn: 327321
* [llvm-readobj][ELF] Move ELF note parsing into libObjectScott Linder2018-03-124-47/+254
| | | | | | | | | Clean up the parsing of notes in llvm-readobj, improve bounds checking, and allow the parsing code to be reused. Differential Revision: https://reviews.llvm.org/D43958 llvm-svn: 327320
* [PowerPC][NFC] Explicitly state types on FP SDAG patterns in anticipation of ↵Lei Huang2018-03-123-132/+158
| | | | | | adding the f128 type llvm-svn: 327319
* Improve prologue handling to support functions with multiple entry points.Jim Ingham2018-03-129-3/+82
| | | | | | | | https://reviews.llvm.org/D42582 Patch from Leandro Lupori. llvm-svn: 327318
* Check that ubsan is the only supported sanitizer on OpenBSDVedant Kumar2018-03-121-0/+19
| | | | | | | | Patch by David Carlier! Differential Revision: https://reviews.llvm.org/D44069 llvm-svn: 327317
* [AArch64] Fold adds with tprel_lo12_nc and secrel_lo12 into a following ldr/strMartin Storsjo2018-03-125-25/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D44355 llvm-svn: 327316
* [InstCombine] Replace calls to getNumUses with hasNUses or hasNUsesOrMoreCraig Topper2018-03-122-5/+5
| | | | | | | | | | getNumUses is a linear time operation. It traverses the user linked list to the end and counts as it goes. Since we are only interested in small constant counts, we should use hasNUses or hasNUsesMore more that terminate the traversal as soon as it can provide the answer. There are still two other locations in InstCombine, but changing those would force a rebase of D44266 which if accepted would remove them. Differential Revision: https://reviews.llvm.org/D44398 llvm-svn: 327315
* [CallSiteSplitting] Use !Instruction::use_empty instead of checking for a ↵Craig Topper2018-03-121-1/+1
| | | | | | | | non-zero return from getNumUses getNumUses is a linear operation. It walks a linked list to get a count. So in this case its better to just ask if there are any users rather than how many. llvm-svn: 327314
* [Driver] Add text description of --help-hidden so it is shown in helpJan Korous2018-03-121-1/+2
| | | | llvm-svn: 327313
* [NFC] Replace iterators in PrintHelp with range-based forJan Korous2018-03-121-6/+4
| | | | llvm-svn: 327312
* [NFC] PrintHelp cleanupJan Korous2018-03-121-3/+1
| | | | llvm-svn: 327311
* [Hexagon] Fix typo in testcaseKrzysztof Parzyszek2018-03-121-1/+1
| | | | llvm-svn: 327310
* [analyzer] Move the GCDAsyncSemaphoreChecker to optin.performanceGeorge Karpenkov2018-03-124-43/+82
| | | | | | | | rdar://38383753 Differential Revision: https://reviews.llvm.org/D44228 llvm-svn: 327309
* [Hexagon] Counting leading/trailing bits is cheapKrzysztof Parzyszek2018-03-122-0/+79
| | | | llvm-svn: 327308
* [PatternMatch, InstSimplify] allow undef elements when matching vector -0.0Sanjay Patel2018-03-122-23/+46
| | | | | | | | | This is the FP equivalent of D42818. Use it for the few cases in InstSimplify with -0.0 folds (that's the only current use of m_NegZero()). Differential Revision: https://reviews.llvm.org/D43792 llvm-svn: 327307
* [X86][Btver2] FSqrt/FDiv reg-reg instructions don't use the AGU.Simon Pilgrim2018-03-121-4/+4
| | | | | | I love you llvm-mca. llvm-svn: 327306
* update_mir_test_checks: Fix handling of IR input after r326284Justin Bogner2018-03-121-2/+2
| | | | llvm-svn: 327305
* [libcxx][test] Adding apple-clang-9 to UNSUPPORTED in ↵Mike Edwards2018-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | iter_alloc_deduction.fail.cpp. After two failed attempts last week to make this work I am going back to a known good method of making this test pass on macOS...adding the current apple-clang version to the UNSUPPORTED list. During a previous patch review (https://reviews.llvm.org/D44103) it was suggested to just XFAIL libcpp-no-deduction-guides as was done to iter_alloc_deduction.pass.cpp. However this caused a an unexpected pass on: http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-gcc-tot-latest-std/builds/214 I then attempted to just mark libcpp-no-deduction-guides as UNSUPPORTED, however this caused an additional bot failure. So I reverted everything (https://reviews.llvm.org/rCXX327191). To solve this and get work unblocked I am adding apple-clang-9 to the original UNSUPPORTED list. llvm-svn: 327304
* [SelectionDAG] Improve handling of dangling debug infoBjorn Pettersson2018-03-129-61/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: 1) Make sure to discard dangling debug info if the variable (or variable fragment) is mapped to something new before we had a chance to resolve the dangling debug info. 2) When resolving debug info, make sure to bump the associated SDNodeOrder to ensure that the DBG_VALUE is emitted after the instruction that defines the value used in the DBG_VALUE. This will avoid a debug-use before def scenario as seen in https://bugs.llvm.org/show_bug.cgi?id=36417. The new test case, test/DebugInfo/X86/sdag-dangling-dbgvalue.ll, show some other limitations in how dangling debug info is handled in the SelectionDAG. Since we currently only support having one dangling dbg.value per Value, we will end up dropping debug info when there are more than one variable that is described by the same "dangling value". Reviewers: aprantl Reviewed By: aprantl Subscribers: aprantl, eraman, llvm-commits, JDevlieghere Tags: #debug-info Differential Revision: https://reviews.llvm.org/D44369 llvm-svn: 327303
* [Hexagon] Subtarget feature to emit one instruction per packetKrzysztof Parzyszek2018-03-128-11/+143
| | | | | | | | | | | | | | | | | This adds two features: "packets", and "nvj". Enabling "packets" allows the compiler to generate instruction packets, while disabling it will prevent it and disable all optimizations that generate them. This feature is enabled by default on all subtargets. The feature "nvj" allows the compiler to generate new-value jumps and it implies "packets". It is enabled on all subtargets. The exception is made for packets with endloop instructions, since they require a certain minimum number of instructions in the packets to which they apply. Disabling "packets" will not prevent hardware loops from being generated. llvm-svn: 327302
* [InstCombine] [NFC] Add tests for peeking through FP casts for sign-bit ↵Roman Lebedev2018-03-121-0/+1419
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compares (PR36682) Summary: This pattern came up in PR36682: https://bugs.llvm.org/show_bug.cgi?id=36682 https://godbolt.org/g/LhuD9A Tests for proposed fix in D44367. Looking at the IR pattern in question, as per [[ https://github.com/rutgers-apl/alive-nj | alive-nj ]], for all the type combinations i checked (input: `i16`, `i32`, `i64`; intermediate: `half`/`i16`, `float`/`i32`, `double`/`i64`) for the following `icmp` comparisons the `sitofp`+`bitcast` can be dropped: * `eq 0` * `ne 0` * `slt 0` * `sle 0` * `sge 0` * `sgt 0` * `slt 1` * `sge 1` * `sle -1` * `sgt -1` I did not check vectors, but i'm guessing it's the same there. {F5887419} Thus all these cases are in the testcase (along with the vector variant with additional `undef` element in the middle). There are no negative patterns here (unless alive-nj lied/is broken), all of these should be optimized. Generated with {F5887551} Reviewers: spatel, majnemer, efriedma, arsenm Reviewed By: spatel Subscribers: nlopes, wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D44390 llvm-svn: 327301
* [X86] Deleting README-MMX.txt now that all tasks have been completed.Simon Pilgrim2018-03-121-42/+0
| | | | | | MMX buildvectors were improved at rL327247 - new MMX bugs should be raised on bugzilla llvm-svn: 327300
* [AMDGPU][MC][GFX8] Added BUFFER_STORE_LDS_DWORD InstructionDmitry Preobrazhensky2018-03-124-6/+64
| | | | | | | | | See bug 36558: https://bugs.llvm.org/show_bug.cgi?id=36558 Differential Revision: https://reviews.llvm.org/D43950 Reviewers: artem.tamazov, arsenm llvm-svn: 327299
* [X86] Add all of the MRM_C0-MRM_FF forms to the switch in ↵Craig Topper2018-03-121-27/+20
| | | | | | | | | | RecognizableInstr::emitInstructionSpecifier. NFC Remove the special casing for MRM_F8 by using HANDLE_OPTIONAL. This should be NFC as the forms that were missing aren't used by any instructions today. They exist in the enum so that we didn't have to put them in one at a time when instructions are added. But looks like we failed here. llvm-svn: 327298
* [sanitizer] Align & pad the allocator structures to the cacheline size v2Kostya Kortchinsky2018-03-124-15/+18
| | | | | | | | | | | | | | | | | | | | Summary: This is a new version of D44261, which broke some builds with older gcc, as they can't align on a constexpr, but rather require an integer (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56859) among others. We introduce `SANITIZER_CACHE_LINE_SIZE` in `sanitizer_platform.h` to be used in `ALIGNED` attributes instead of using directly `kCacheLineSize`. Reviewers: alekseyshl, thakis Reviewed By: alekseyshl Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D44326 llvm-svn: 327297
* [X86][Btver2] Prefix all scheduler defs. NFCI.Simon Pilgrim2018-03-121-147/+147
| | | | | | These are all global, so prefix with 'J' to help prevent accidental name clashes with other models. llvm-svn: 327296
* Reland "[clang-doc] Setup clang-doc frontend framework"Julie Hockett2018-03-1225-0/+2181
| | | | | | | There was a missing newline in the docs, and a static_assert that needed to be a normal assert. llvm-svn: 327295
* Revert "[ObjC] Allow declaring __weak pointer fields in C structs inAkira Hatanaka2018-03-1218-380/+51
| | | | | | | | | | | ARC." This reverts commit r327206 as there were test failures caused by this patch. http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180312/221427.html llvm-svn: 327294
* [clangd] Fix diagnostic errors in the test code, NFC.Haojian Wu2018-03-121-1/+3
| | | | | | | | | | | | Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: klimek, jkorous-apple, cfe-commits, ioeric Differential Revision: https://reviews.llvm.org/D44294 llvm-svn: 327293
* [X86] Remove use of MVT class from the ShuffleDecode library.Craig Topper2018-03-124-277/+240
| | | | | | | | MVT belongs to the CodeGen layer, but ShuffleDecode is used by the X86 InstPrinter which is part of the MC layer. This only worked because MVT is completely implemented in a header file with no other library dependencies. Differential Revision: https://reviews.llvm.org/D44353 llvm-svn: 327292
* [AMDGPU] Fix lowering enqueue kernel when kernel has no nameYaxun Liu2018-03-122-17/+63
| | | | | | | | | | Since the enqueued kernels have internal linkage, their names may be dropped. In this case, give them unique names __amdgpu_enqueued_kernel or __amdgpu_enqueued_kernel.n where n is a sequential number starting from 1. Differential Revision: https://reviews.llvm.org/D44322 llvm-svn: 327291
* [WebAssembly] Add test for imported ctor and fix indexing bug foundNicholas Wilson2018-03-122-80/+134
| | | | | | | | | This bug was found by accident while trying to expand out testcases for imported symbols, and is covered by the additional test case. Differential Revision: https://reviews.llvm.org/D44331 llvm-svn: 327290
* [X86][Btver2] Extend JWriteResFpuPair to accept resource/uop counts. NFCI.Simon Pilgrim2018-03-121-51/+24
| | | | | | This allows the single resource classes (VarBlend, MPSAD, VarVecShift) to use the JWriteResFpuPair macro. llvm-svn: 327289
* [AMDGPU][MC][DOC] Updated AMD GPU assembler descriptionDmitry Preobrazhensky2018-03-125-29/+5790
| | | | | | | | | See bug 36572: https://bugs.llvm.org/show_bug.cgi?id=36572 Differential Revision: https://reviews.llvm.org/D44020 Reviewers: artem.tamazov, vpykhtin llvm-svn: 327288
* [InstSimplify] add test for m_NegZero with undef elt; NFCSanjay Patel2018-03-121-0/+9
| | | | llvm-svn: 327287
* [WebAssembly] Reorder synthetic functions to come firstNicholas Wilson2018-03-1219-252/+261
| | | | | | | | | This matches the existing ordering that's been there for globals for a while (__stack_pointer coming first). Differential Revision: https://reviews.llvm.org/D44333 llvm-svn: 327286
* [clang-format] Improve detection of Objective-C block typesBen Hamilton2018-03-123-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, clang-format would detect the following as an Objective-C block type: FOO(^); when it actually must be a C or C++ macro dealing with an XOR statement or an XOR operator overload. According to the Clang Block Language Spec: https://clang.llvm.org/docs/BlockLanguageSpec.html block types are of the form: int (^)(char, float) and block variables of block type are of the form: void (^blockReturningVoidWithVoidArgument)(void); int (^blockReturningIntWithIntAndCharArguments)(int, char); void (^arrayOfTenBlocksReturningVoidWithIntArgument[10])(int); This tightens up the detection so we don't unnecessarily detect C macros which pass in the XOR operator. Depends On D43904 Test Plan: New tests added. Ran tests with: make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: krasimir, jolesiak, djasper Reviewed By: djasper Subscribers: djasper, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D43906 llvm-svn: 327285
* [clang-format] Don't detect C++11 attribute specifiers as ObjCBen Hamilton2018-03-124-29/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, clang-format would detect C++11 and C++17 attribute specifiers like the following as Objective-C method invocations: [[noreturn]]; [[clang::fallthrough]]; [[noreturn, deprecated("so sorry")]]; [[using gsl: suppress("type")]]; To fix this, I ported part of the logic from tools/clang/lib/Parse/ParseTentative.cpp into TokenAnnotator.cpp so we can explicitly parse and identify C++11 attribute specifiers. This allows the guessLanguage() and getStyle() APIs to correctly guess files containing the C++11 attribute specifiers as C++, not Objective-C. Test Plan: New tests added. Ran tests with: make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: krasimir, jolesiak, djasper Reviewed By: djasper Subscribers: aaron.ballman, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D43902 llvm-svn: 327284
* [X86][Btver2] Use JWriteResFpuPair wrapper for AES/CLMUL/HADD scheduler ↵Simon Pilgrim2018-03-121-49/+6
| | | | | | | | cases. NFCI. These are single pipe and have the default resource/uop counts like JWriteResFpuPair so there's no need to handle them separately. llvm-svn: 327283
* [clangd] Revamp handling of diagnostics.Ilya Biryukov2018-03-1223-390/+732
| | | | | | | | | | | | | | | | Summary: The new implementation attaches notes to diagnostic message and shows the original diagnostics in the message of the note. Reviewers: hokein, ioeric, sammccall Reviewed By: sammccall Subscribers: klimek, mgorny, cfe-commits, jkorous-apple Differential Revision: https://reviews.llvm.org/D44142 llvm-svn: 327282
* [Hexagon] Add REQUIRES: asserts to testcases that use -statsKrzysztof Parzyszek2018-03-122-0/+2
| | | | llvm-svn: 327281
* [ELF] - Formatted comment, fixed mistype. NFC.George Rimar2018-03-121-3/+2
| | | | llvm-svn: 327280
* [Hexagon] Add REQUIRES: asserts to testcases that use -debug-onlyKrzysztof Parzyszek2018-03-123-1/+3
| | | | llvm-svn: 327279
OpenPOWER on IntegriCloud