summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [GCOV] Make test path generic so it passes on all machinesMarco Castelluccio2018-10-301-1/+1
| | | | llvm-svn: 345656
* Switch getline_nohang from XFAIL to UNSUPPORTED for NetBSDKamil Rytarowski2018-10-301-2/+2
| | | | | | This test sometimes works, usually breaks. llvm-svn: 345655
* Mark vptr-non-unique-typeinfo as a broken test for NetBSD/i386Kamil Rytarowski2018-10-301-0/+1
| | | | llvm-svn: 345654
* Add link to implementation for P1006R0Marshall Clow2018-10-301-1/+1
| | | | llvm-svn: 345653
* Update LLVM version used on Appveyor bot, remove MSVC 2015 botEric Fiselier2018-10-302-9/+1
| | | | llvm-svn: 345652
* Mark breaking sanitizer_common tests on NetBSDKamil Rytarowski2018-10-304-0/+7
| | | | | | | | | | Set XFAIL with appropriate configuration for: - NetBSD/getgroupmembership - Posix/dedup_token_length_test - Posix/readlinkat - get_module_and_offset_for_pc llvm-svn: 345651
* [FPEnv] [FPEnv] Add constrained intrinsics for MAXNUM and MINNUMCameron McInally2018-10-3014-1/+638
| | | | | | Differential Revision: https://reviews.llvm.org/D53216 llvm-svn: 345650
* Changing the command line parameters sent to diff for this test.Aaron Ballman2018-10-302-2/+2
| | | | | | On some systems, -U 1 was being interpreted as -U -1. Trying -U1 to see if that's the universally accepted approach instead. llvm-svn: 345649
* [ELF] Fallback to sh_link=0 if neither .dynsym nor .symtab existsFangrui Song2018-10-302-12/+18
| | | | | | | | | | | | | | Summary: .rela.plt may only contain R_*_{,I}RELATIVE relocations and not need a symbol table link. bfd/gold fallbacks to sh_link=0 in this case. Without this patch, ld.lld --strip-all caused lld to dereference a null pointer. Reviewers: ruiu, grimar, espindola Reviewed By: ruiu Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D53881 llvm-svn: 345648
* [InstCombine] use 'match' to reduce code; NFCSanjay Patel2018-10-301-92/+90
| | | | llvm-svn: 345647
* NFC: Merge KEYOBJC and KEYARCErik Pilkington2018-10-302-29/+27
| | | | | | | We used to only define ARC keywords in -fobjc-arc mode, but now that we define them in ObjC mode, there isn't any reason to keep them seperate. llvm-svn: 345646
* [builtins] Re-enable x86-only long double testsReid Kleckner2018-10-302-1/+13
| | | | | | | | | | | | | | | | | | | Summary: In r81552, the HAS_80_BIT_LONG_DOUBLE macro was added to the unit test only version of int_lib.h. One month later in r85260 the duplicate int_lib.h was removed, but the tests still passed because we don't build with -Werror. This is the minimal change to bring it back, and I decided to put the configuration macro next to our 128-bit integer support macro. Reviewers: joerg, compnerd, mstorsjo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53838 llvm-svn: 345645
* [InstCombine] Teach the move free before null test opti how to deal with ↵Quentin Colombet2018-10-302-12/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | noop casts InstCombine features an optimization that essentially replaces: if (a) free(a) into: free(a) Right now, this optimization is gated by the minsize attribute and therefore we only perform it if we can prove that we are going to be able to eliminate the branch and the destination block. However when casts are involved the optimization would fail to apply, because the optimization was not smart enough to realize that it is possible to also move the casts away from the destination block and that is harmless to the performance since they are just noops. E.g., foo(int *a) if (a) free((char*)a) Wouldn't be optimized by instcombine, because - We would refuse to hoist the `bitcast i32* %a to i8` in the source block - We would fail to see that `bitcast i32* %a to i8` and %a are the same value. This patch fixes both these problems: - It teaches the pattern matching of the comparison how to look through casts. - It checks that whether the additional instruction in the destination block can be hoisted and are harmless performance-wise. - It hoists all the code of the destination block in the source block. Differential Revision: D53356 llvm-svn: 345644
* Revert "[ASTImporter] Reorder fields after structure import is finished"Davide Italiano2018-10-302-55/+4
| | | | | | This reverts commit r345545 because it breaks some lldb tests. llvm-svn: 345643
* [x86] try to make test immune to better div optimization; NFCISanjay Patel2018-10-301-25/+18
| | | | llvm-svn: 345642
* [COFF, ARM64] Make sure to forward arguments from vararg to musttail varargMandeep Singh Grang2018-10-303-0/+61
| | | | | | | | | | | | | | | | | | Summary: Thunk functions in Windows are varag functions that call a musttail function to pass the arguments after the fixup is done. We need to make sure that we forward the arguments from the caller vararg to the callee vararg function. This is the same mechanism that is used for Windows on X86. Reviewers: ssijaric, eli.friedman, TomTan, mgrang, mstorsjo, rnk, compnerd, efriedma Reviewed By: efriedma Subscribers: efriedma, kristof.beyls, chrib, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D53843 llvm-svn: 345641
* [x86] try to make test immune to better div optimization; NFCISanjay Patel2018-10-301-26/+25
| | | | llvm-svn: 345640
* [x86] try to make test immune to better div optimization; NFCISanjay Patel2018-10-301-20/+14
| | | | llvm-svn: 345639
* [ScalarizeMaskedMemIntrin] Limit the scope of some variables that are only ↵Craig Topper2018-10-301-8/+5
| | | | | | used inside loops. llvm-svn: 345638
* NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)Erik Pilkington2018-10-3068-232/+218
| | | | | | | | | | We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't any reason to keep these separate. This patch replaces LangOpts::ObjC1 and LangOpts::ObjC2 with LangOpts::ObjC. Differential revision: https://reviews.llvm.org/D53547 llvm-svn: 345637
* [DAGCombiner] Fix for big endian in ForwardStoreValueToDirectLoadBjorn Pettersson2018-10-302-9/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Normalize the offset for endianess before checking if the store cover the load in ForwardStoreValueToDirectLoad. Without this we missed out on some optimizations for big endian targets. If for example having a 4 bytes store followed by a 1 byte load, loading the least significant byte from the store, the STCoversLD check would fail (see @test4 in test/CodeGen/AArch64/load-store-forwarding.ll). This patch also fixes a problem seen in an out-of-tree target. The target has i40 as a legal type, it is big endian, and the StoreSize for i40 is 48 bits. So when normalizing the offset for endianess we need to take the StoreSize into account (assuming that padding added when storing into a larger StoreSize always is added at the most significant end). Reviewers: niravd Reviewed By: niravd Subscribers: javed.absar, kristof.beyls, llvm-commits, uabelho Differential Revision: https://reviews.llvm.org/D53776 llvm-svn: 345636
* Speculatively attempt to fix a failing testbot.Aaron Ballman2018-10-302-2/+2
| | | | | | A testbot ( http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/54690/) was failing with a complaint about an obsolete option that wasn't present in the command line in the first place. This replaces my guess at the "obsolete option" with a different spelling that will hopefully be more acceptable to this bot without breaking other bots. llvm-svn: 345635
* [AArch64] [Windows] SEH opcodes should be scheduling boundaries.Eli Friedman2018-10-309-7/+48
| | | | | | | | | | | | | | Prevents the post-RA scheduler from modifying the prologue sequences emitting by frame lowering. This is roughly similar to what we do for other targets: TargetInstrInfo::isSchedulingBoundary checks isPosition(), which checks for CFI_INSTRUCTION. isSEHInstruction is taken from D50288; it'll land with whatever patch lands first. Differential Revision: https://reviews.llvm.org/D53851 llvm-svn: 345634
* Silencing a -Wunused-variable warning; NFC.Aaron Ballman2018-10-301-2/+0
| | | | llvm-svn: 345633
* [CMake] Check -ffreestanding as C not C++ flagPetr Hosek2018-10-301-1/+1
| | | | | | | | | | | When -ffreestanding is used, main() isn't considered special and when compiled as C++ code it'll get mangled which makes the compilation fail since main() will be undefined so this check will never succeed. Differential Revision: https://reviews.llvm.org/D49332 llvm-svn: 345632
* [AArch64] Create proper memoperand for multi-vector storesDavid Greene2018-10-302-1/+83
| | | | | | | | | | | | Re-apply r345315 with testcase fixes. Include all of the store's source vector operands when creating the MachineMemOperand. Previously, we were missing the first operand, making the store size seem smaller than it really is. Differential Revision: https://reviews.llvm.org/D52816 llvm-svn: 345631
* Fixing some build bot failures from r345628; NFC intended.Aaron Ballman2018-10-301-1/+1
| | | | llvm-svn: 345630
* [NativePDB] Add support for dumping global variables of class type.Zachary Turner2018-10-306-3/+345
| | | | | | | | | | | | | | | | | | | | | | | | | Previous patches added support for dumping global variables of primitive types, so we now do the same for class types. For the most part, everything just worked, there was only one minor bug needing fixed, which was that for variables of modified types (e.g. const, volatile, etc) we can't resolve the forward decl in CreateAndCacheType because the PdbSymUid must point to the LF_MODIFIER which must point to the forward decl. So when it comes time to call CompleteType, an assert was firing because we expected to get a class, struct, union, or enum, but we were getting an LF_MODIFIER instead. The other issue is that one the newly added tests is for an array member, which was not yet supported, so we add support for that now in this patch. There's probably room for other interesting layout test cases here, but this at least should test the basics. Differential Revision: https://reviews.llvm.org/D53822 llvm-svn: 345629
* Add the ability to output static analysis results to SARIF.Aaron Ballman2018-10-306-3/+389
| | | | | | This allows users to specify SARIF (https://github.com/oasis-tcs/sarif-spec) as the output from the clang static analyzer so that the results can be read in by other tools, such as extensions to Visual Studio and VSCode, as well as static analyzers like CodeSonar. llvm-svn: 345628
* Handle NetBSD alias for pthread_sigmaskKamil Rytarowski2018-10-302-0/+7
| | | | | | | | | | | | | | | | | | | | | Summary: Add a new helper macro TSAN_INTERCEPTOR_NETBSD_ALIAS_THR2 that handles pthread(3)/libc aliases in scenarios when a name in both libraries differs not just in prefix namespace. Handle TSan pthread_sigmask mangling accordingly into __libc_thr_sigsetmask. Reviewers: vitalybuka, joerg Reviewed By: vitalybuka Subscribers: kubamracek, jfb, llvm-commits, #sanitizers, mgorny Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D53863 llvm-svn: 345627
* [X86] In lowerVectorShuffleAsBroadcast, make peeking through CONCAT_VECTORS ↵Craig Topper2018-10-302-1/+31
| | | | | | | | | | | | work correctly if we already walked through a bitcast that changed the element size. The CONCAT_VECTORS case was using the original mask element count to determine how to adjust the broadcast index. But if we looked through a bitcast the original mask size doesn't tell us anything about the concat_vectors. This patch switchs to using the concat_vectors input element count directly instead. Differential Revision: https://reviews.llvm.org/D53823 llvm-svn: 345626
* [GCOV] Add a test for function defined on one line (follow-up of ↵Calixte Denizet2018-10-303-0/+36
| | | | | | | | | | | | | | | | https://reviews.llvm.org/D53600) Summary: Add a test for coverage for function definition like void foo() { }. Reviewers: marco-c Reviewed By: marco-c Subscribers: delcypher, llvm-commits, #sanitizers, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D53601 llvm-svn: 345625
* [GCOV] Function counters are wrong when on one lineCalixte Denizet2018-10-301-4/+3
| | | | | | | | | | | | | | | | Summary: After commit https://reviews.llvm.org/rL344228, the function definitions have a counter but when on one line the counter is wrong (e.g. void foo() { }) I added a test in: https://reviews.llvm.org/D53601 Reviewers: marco-c Reviewed By: marco-c Subscribers: llvm-commits, sylvestre.ledru Differential Revision: https://reviews.llvm.org/D53600 llvm-svn: 345624
* [DAG] Add const variants for BaseIndexOffset functions.Nirav Dave2018-10-302-7/+11
| | | | llvm-svn: 345623
* Fix printing bug in pdb2yaml.Zachary Turner2018-10-301-1/+1
| | | | | | | We were using the wrong enum table when mapping enum values to strings for public symbol flags. llvm-svn: 345622
* [DebugInfo] Define base function on DWARFDie reverse iteratorsJonas Devlieghere2018-10-302-0/+8
| | | | | | | | | | | | | | | | | | This defines member function base on the specialization of std::reverse_iterator for DWARFDie::iterator as required by C++ [reverse.iter.conv]. This fixes unit test DWARFDebugInfoTest.cpp under EXPENSIVE_CHECKS which currently can't be built due to GNU C++ Library calling this member function in debug mode. This fixes https://llvm.org/PR38785 Patch by: Eugene Sharygin Differential revision: https://reviews.llvm.org/D53792 llvm-svn: 345621
* Cast the return value of _Unwind_GetIP() to uptrKamil Rytarowski2018-10-301-1/+1
| | | | | | | This is needed for NetBSD to match the expected type in Unwind_GetIP(). llvm-svn: 345620
* Mark interception_failure_test with XFAIL for NetBSDKamil Rytarowski2018-10-301-1/+1
| | | | | | This test breaks also on FreeBSD. llvm-svn: 345619
* [SystemZ] Simplify LRV/STRV ISD nodesUlrich Weigand2018-10-304-47/+40
| | | | | | | | | | | The LRV and STRV nodes carry an extra operand to indicate the type of the memory access. This is redundant, since the nodes are actually of class MemIntrinsicNode and therefore hold that same information already as MemoryVT. NFC intended. llvm-svn: 345618
* [TTI] Fix uses of SK_ExtractSubvector shuffle costs (PR39368)Simon Pilgrim2018-10-3014-488/+799
| | | | | | | | | | | | | | | | Correct costings of SK_ExtractSubvector requires the SubTy argument to indicate the type/size of the extracted subvector. Unlike the rest of the shuffle kinds this means that the main Ty argument represents the source vector type not the destination! I've done my best to fix a number of vectorizer uses: SLP - the reduction epilogue costs should be using a SK_PermuteSingleSrc shuffle as these all occur at the hardware vector width - we're not extracting (illegal) subvector types. This is causing the cost model diffs as SK_ExtractSubvector costs are poorly handled and tend to just return 1 at the moment. LV - I'm not clear on what the SK_ExtractSubvector should represents for recurrences - I've used a <1 x ?> subvector extraction as that seems to match the VF delta. Differential Revision: https://reviews.llvm.org/D53573 llvm-svn: 345617
* [InstCombine] Add preliminary tests for nested min/max combines. NFCVolkan Keles2018-10-304-2/+242
| | | | | | | | | | | | | | Summary: As requested in D53774. Reviewers: spatel Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53875 llvm-svn: 345616
* [InstSimplify] add tests for fcmp folds; NFCSanjay Patel2018-10-301-2/+73
| | | | | | | This is part of a problem noted in PR39475: https://bugs.llvm.org/show_bug.cgi?id=39475 llvm-svn: 345615
* [llvm-objcopy] Fix --keep-global-symbol/--globalize-symbol for undefined ↵Jordan Rupprecht2018-10-303-6/+25
| | | | | | | | | | | | | | | | symbols. Summary: --keep-global-symbol and --globalize-symbol don't make sense for undefined symbols, so it should be ignored for those symbols. This matches GNU objcopy behavior. Reviewers: jhenderson, alexshap, jakehehrlich, espindola Reviewed By: jhenderson, jakehehrlich Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D53733 llvm-svn: 345614
* [InstCombine] use getFltSemantics() instead of duplicating it; NFCSanjay Patel2018-10-301-19/+3
| | | | llvm-svn: 345613
* [llvm-mca] Move namespace mca inside llvm::Fangrui Song2018-10-3059-42/+118
| | | | | | | | | | | | | | | | Summary: This allows to remove `using namespace llvm;` in those *.cpp files When we want to revisit the decision (everything resides in llvm::mca::*) in the future, we can move things to a nested namespace of llvm::mca::, to conceptually make them separate from the rest of llvm::mca::* Reviewers: andreadb, mattd Reviewed By: andreadb Subscribers: javed.absar, tschuett, gbedwell, llvm-commits Differential Revision: https://reviews.llvm.org/D53407 llvm-svn: 345612
* Add more benchmarks for std::string.Samuel Benzaquen2018-10-301-21/+326
| | | | | | | | | | | | | | | Summary: Added benchmarks for Construct, Copy, Move, Destroy, Relationals and Read. On the ones that matter, the benchmarks tests hot and cold data, and opaque and transparent inputs. Reviewers: EricWF Subscribers: christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D53825 llvm-svn: 345611
* [clang-tidy] cppcoreguidelines-macro-usage: print macro namesRoman Lebedev2018-10-307-28/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The macro may not have location (or more generally, the location may not exist), e.g. if it originates from compiler's command-line. The check complains on all the macros, even those without the location info. Which means, it only says it does not like it. What is 'it'? I have no idea. If we don't print the name, then there is no way to deal with that situation. And in general, not printing name here forces the user to try to understand, given, the macro definition location, what is the macro name? This isn't fun. Also, ignores-by-default the macros originating from command-line, with an option to not ignore those. I suspect some more issues may crop up later. Reviewers: JonasToth, aaron.ballman, hokein, xazax.hun, alexfh Reviewed By: JonasToth, aaron.ballman Subscribers: nemanjai, kbarton, rnkovacs, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D53817 llvm-svn: 345610
* [OPENMP] Support for mapping of the lambdas in target regions.Alexey Bataev2018-10-307-4/+348
| | | | | | | | | | Added support for mapping of lambdas in the target regions. It scans all the captures by reference in the lambda, implicitly maps those variables in the target region and then later reinstate the addresses of references in lambda to the correct addresses of the captured|privatized variables. llvm-svn: 345609
* [LIBOMPTARGET] Add support for mapping of lambda captures.Alexey Bataev2018-10-301-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Added support for correct mapping of variables captured by reference in lambdas. That kind of mapping may appear only in target-executable regions and must follow the original lambda or another lambda capture for the same lambda. The expected data: base address - the address of the lambda, begin pointer - pointer to the address of the lambda capture, size - size of the captured variable. When OMP_TGT_MAPTYPE_PTR_AND_OBJ mapping type is seen in target-executable region, the target address of the last processed item is taken as the address of the original lambda `tgt_lambda_ptr`. Then, the pointer to capture on the device is calculated like `tgt_lambda_ptr + (host_begin_pointer - host_begin_base)` and the target-based address of the original variable (which host address is `*(void**)begin_pointer`) is written to that pointer. Reviewers: kkwli0, gtbercea, grokos Subscribers: openmp-commits Differential Revision: https://reviews.llvm.org/D51107 llvm-svn: 345608
* [InstCombine] try to turn shuffle into insertelementSanjay Patel2018-10-302-20/+89
| | | | | | | | | | | | | | | | | | | | | | shuffle (insert ?, Scalar, IndexC), V1, Mask --> insert V1, Scalar, IndexC' The motivating case is at least a couple of steps away: I noticed that SLPVectorizer does not analyze shuffles as well as sequences of insert/extract in PR34724: https://bugs.llvm.org/show_bug.cgi?id=34724 ...so SLP may fail to vectorize when source code has shuffles to start with or instcombine has converted insert/extract to shuffles. Independent of that, an insertelement is always a simpler op for IR analysis vs. a shuffle, so we should transform to insert when possible. I don't think there's any codegen concern here - if a target can't insert a scalar directly to some fixed element in a vector (x86?), then this should get expanded to the insert+shuffle that we started with. Differential Revision: https://reviews.llvm.org/D53507 llvm-svn: 345607
OpenPOWER on IntegriCloud