summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [IR][X86] Move X86 specific portions of UpgradeIntrinsicFunction1 to a ↵Craig Topper2017-02-171-233/+248
| | | | | | | | couple helper functions. NFC This enables some early outs to avoid repeatedly using IsX86 check to qualify. I hope to continue to improve this to shorten the lengths of some of the string comparisons. llvm-svn: 295424
* Remove dead code in testEric Fiselier2017-02-171-2/+0
| | | | llvm-svn: 295423
* add implicit deduction guide tests for string_viewEric Fiselier2017-02-171-0/+71
| | | | llvm-svn: 295422
* Add better ODR checking for modules.Richard Trieu2017-02-1714-97/+3045
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A slightly weaker form of ODR checking than previous attempts, but hopefully won't break the modules build bot. Future work will be needed to catch all cases. When objects are imported for modules, there is a chance that a name collision will cause an ODR violation. Previously, only a small number of such violations were detected. This patch provides a stronger check based on AST nodes. The information needed to uniquely identify an object is taken from the AST and put into a one-dimensional byte stream. This stream is then hashed to give a value to represent the object, which is stored with the other object data in the module. When modules are loaded, and Decl's are merged, the hash values of the two Decl's are compared. Only Decl's with matched hash values will be merged. Mismatch hashes will generate a module error, and if possible, point to the first difference between the two objects. The transform from AST to byte stream is a modified depth first algorithm. Due to references between some AST nodes, a pure depth first algorithm could generate loops. For Stmt nodes, a straight depth first processing occurs. For Type and Decl nodes, they are replaced with an index number and only on first visit will these nodes be processed. As an optimization, boolean values are saved and stored together in reverse order at the end of the byte stream to lower the ammount of data that needs to be hashed. Compile time impact was measured at 1.5-2.0% during module building, and negligible during builds without module building. Differential Revision: https://reviews.llvm.org/D21675 llvm-svn: 295421
* Go binding: Add methods for missing PassManagerBuilder C APIsAndrew Wilkins2017-02-171-0/+20
| | | | | | | | Patch by Ryuichi Hayashida! Differential Revision: http://reviews.llvm.org/D30042 llvm-svn: 295420
* Updated isl to isl-0.18-254-g6bc184dTobias Grosser2017-02-17101-1749/+2506
| | | | | | | This update includes a couple more coalescing changes as well as a large number of isl-internal code cleanups (dead assigments, ...). llvm-svn: 295419
* Work around Clang assertion when testing C++17 deduction guides with '-g'.Eric Fiselier2017-02-171-0/+4
| | | | llvm-svn: 295417
* [index] Improvde how we handle synthesized ObjC properties and the ↵Argyrios Kyrtzidis2017-02-175-47/+165
| | | | | | | | | | | | associated ivars. Related synthesized properties with the ivar they use with the 'accessor' relation, and make sure we mark them 'implicit' when appropriate. Patch by Nathan Hawes! https://reviews.llvm.org/D30012 llvm-svn: 295416
* [ScopInfo] Do not try to fold array dimensions of size zeroTobias Grosser2017-02-172-0/+63
| | | | | | | | | | Trying to fold such kind of dimensions will result in a division by zero, which crashes the compiler. As such arrays are likely to invalidate the scop anyhow (but are not illegal in LLVM-IR), there is no point in trying to optimize the array layout. Hence, we just avoid the folding of constant dimensions of size zero. llvm-svn: 295415
* Revert "Upgrade ios min version to 8"Francis Ricci2017-02-171-1/+1
| | | | | | | | Accidental commit This reverts commit f21d4a6836ea159e95e5042ba8383f20d4899cda. llvm-svn: 295414
* Use pthreads for thread-local lsan allocator cache on darwinFrancis Ricci2017-02-174-44/+56
| | | | | | | | | | | | | | | Summary: This patch allows us to move away from using __thread on darwin, which is requiring for building lsan for darwin on ios version 7 and on iossim i386. Reviewers: kubamracek, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29994 llvm-svn: 295413
* Upgrade ios min version to 8Francis Ricci2017-02-171-1/+1
| | | | | | | | | | | | | | | Summary: Version 8 is the first version to support the __thread keyword, which is required for building lsan for 64-bit ios. Reviewers: kubamracek, kcc, glider Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D29787 llvm-svn: 295412
* Fix test_exception_storage.pass.cpp in C++17 my re-enabling the unexpected ↵Eric Fiselier2017-02-171-0/+4
| | | | | | handlers llvm-svn: 295411
* [JumpThreading] Re-enable JumpThreading for guardsSanjoy Das2017-02-176-15/+440
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: JumpThreading for guards feature has been reverted at https://reviews.llvm.org/rL295200 due to the following problem: the feature used the following algorithm for detection of diamond patters: 1. Find a block with 2 predecessors; 2. Check that these blocks have a common single parent; 3. Check that the parent's terminator is a branch instruction. The problem is that these checks are insufficient. They may pass for a non-diamond construction in case if those two predecessors are actually the same block. This may happen if parent's terminator is a br (either conditional or unconditional) to a block that ends with "switch" instruction with exactly two branches going to one block. This patch re-enables the JumpThreading for guards and fixes this issue by adding the check that those found predecessors are actually different blocks. This guarantees that parent's terminator is a conditional branch with exactly 2 different successors, which is now ensured by assertions. It also adds two more tests for this situation (with parent's terminator being a conditional and an unconditional branch). Patch by Max Kazantsev! Reviewers: anna, sanjoy, reames Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30036 llvm-svn: 295410
* Fix build breakage from moving kInvalidTid to lsan_commonFrancis Ricci2017-02-171-0/+1
| | | | llvm-svn: 295409
* Rename getAliases -> getSymbolsAt.Rui Ueyama2017-02-171-3/+3
| | | | | | | The previous name caused a little confusion because the function not only returns aliases but a given symbol itself too. llvm-svn: 295408
* Add doc for _LIBCPP_ENABLE_CXX17_DISABLED_AUTO_PTR and make it work under ↵Eric Fiselier2017-02-173-2/+9
| | | | | | _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES llvm-svn: 295407
* [libcxx] Remove unexpected handlers in C++17Eric Fiselier2017-02-1713-1/+179
| | | | | | | | | | | | | | | | | | | Summary: This patch implements [P0003R5](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html) which removes exception specifications from C++17. The only changes to the library are removing `set_unexpected`, `get_unexpected`, `unexpected`, and `unexpected_handler`. These functions can be re-enabled in C++17 using `_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS`. @mclow.lists what do you think about removing stuff is this way? Reviewers: mclow.lists Reviewed By: mclow.lists Subscribers: mclow.lists, cfe-commits Differential Revision: https://reviews.llvm.org/D28172 llvm-svn: 295406
* Use pthreads to store current thread id on darwinFrancis Ricci2017-02-174-26/+24
| | | | | | | | | | | | | | Summary: __thread is not supported by all darwin versions and architectures, use pthreads instead to allow for building darwin lsan on iossim. Reviewers: kubamracek, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29993 llvm-svn: 295405
* Added doxygen comments to smmintrin.h's intrinsics.Ekaterina Romanova2017-02-172-1/+2012
| | | | | | | | | | Note: The doxygen comments are automatically generated based on Sony's intrinsic s document. I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream. llvm-svn: 295404
* Mark a couple for basic_string member templates as inline. no ABI change ↵Eric Fiselier2017-02-171-3/+3
| | | | | | this time. llvm-svn: 295403
* Revert "[Hexagon] Start using regmasks on calls"Rafael Espindola2017-02-1720-272/+118
| | | | | | | | | | This reverts commit r295371. It broke windows bots: http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/11402/steps/test-llvm/logs/stdio llvm-svn: 295402
* Retry: [ubsan] Reduce null checking of C++ object pointers (PR27581)Vedant Kumar2017-02-177-30/+249
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch teaches ubsan to insert exactly one null check for the 'this' pointer per method/lambda. Previously, given a load of a member variable from an instance method ('this->x'), ubsan would insert a null check for 'this', and another null check for '&this->x', before allowing the load to occur. Similarly, given a call to a method from another method bound to the same instance ('this->foo()'), ubsan would a redundant null check for 'this'. There is also a redundant null check in the case where the object pointer is a reference ('Ref.foo()'). This patch teaches ubsan to remove the redundant null checks identified above. Testing: check-clang and check-ubsan. I also compiled X86FastISel.cpp with -fsanitize=null using patched/unpatched clangs based on r293572. Here are the number of null checks emitted: ------------------------------------- | Setup | # of null checks | ------------------------------------- | unpatched, -O0 | 21767 | | patched, -O0 | 10758 | ------------------------------------- Changes since the initial commit: don't rely on IRGen of C labels in the test. Differential Revision: https://reviews.llvm.org/D29530 llvm-svn: 295401
* Add myself to CODE_OWNERS.txt for NetBSDKamil Rytarowski2017-02-171-0/+4
| | | | llvm-svn: 295400
* update revision in CHANGELOG.TXT and fix python errorEric Fiselier2017-02-172-3/+3
| | | | llvm-svn: 295399
* Remove more basic_string member function templates from the dylib exportsEric Fiselier2017-02-173-1913/+1924
| | | | llvm-svn: 295398
* [XRAY] [x86_64] Adding a Flight Data filetype reader to the llvm-xray Trace ↵Dean Michael Berris2017-02-176-23/+334
| | | | | | | | | | | | | | | | | | | | | | | | implementation. Summary: The file type packs function trace data onto disk from potentially multiple threads that are aggregated and flushed during the course of an instrumented program's runtime. It is named FDR mode or Flight Data recorder as an analogy to plane blackboxes, which instrument a running system without access to IO. The writer code is defined in compiler-rt in xray_fdr_logging.h/cc Reviewers: rSerge, kcc, dberris Reviewed By: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29697 llvm-svn: 295397
* Revert "[ubsan] Reduce null checking of C++ object pointers (PR27581)"Vedant Kumar2017-02-177-248/+30
| | | | | | | | | | This reverts commit r295391. It breaks this bot: http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/1898 I need to not rely on labels in the IR test. llvm-svn: 295396
* Move test to X86 subdirectory for bot failuresTeresa Johnson2017-02-171-0/+0
| | | | | | Second attempt at fixing bot failures from r295384. llvm-svn: 295395
* [x86] Give this test a triple so that we don't have to cope with twoChandler Carruth2017-02-171-1/+3
| | | | | | different asm comment syntaxes. llvm-svn: 295394
* [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible ↵Eric Fiselier2017-02-174-27/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parameter types. Summary: This patch fixes http://llvm.org/PR31938. The description below is copy/pasted from the bug: The standard says: template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT>> class basic_string { using value_type = typename traits::char_type; // ... basic_string(const charT* s, const Allocator& a = Allocator()); }; libc++ actually chooses to declare the constructor as basic_string(const value_type* s, const Allocator& a = Allocator()); The implicit deduction guides from class template argument deduction make what was previously an implementation detail visible: std::basic_string s = "foo"; // error, can't deduce charT. The constructor in question is in the libc++ DSO, but fortunately it looks like fixing this will not result in an ABI break. @rsmith How does this look? I did more than just the constructors mentioned in the PR, but IDK how far to take it. Reviewers: mclow.lists, rsmith Reviewed By: rsmith Subscribers: cfe-commits, rsmith Differential Revision: https://reviews.llvm.org/D29863 llvm-svn: 295393
* [CMake] Add variable IOS to iOS toolchainChris Bieneman2017-02-171-0/+1
| | | | | | This is useful for some edge cases where detecting things gets tricky. Specifically LLDB needs this to support iOS because CMake doesn't support running tests using obj-c code. llvm-svn: 295392
* [ubsan] Reduce null checking of C++ object pointers (PR27581)Vedant Kumar2017-02-177-30/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch teaches ubsan to insert exactly one null check for the 'this' pointer per method/lambda. Previously, given a load of a member variable from an instance method ('this->x'), ubsan would insert a null check for 'this', and another null check for '&this->x', before allowing the load to occur. Similarly, given a call to a method from another method bound to the same instance ('this->foo()'), ubsan would a redundant null check for 'this'. There is also a redundant null check in the case where the object pointer is a reference ('Ref.foo()'). This patch teaches ubsan to remove the redundant null checks identified above. Testing: check-clang and check-ubsan. I also compiled X86FastISel.cpp with -fsanitize=null using patched/unpatched clangs based on r293572. Here are the number of null checks emitted: ------------------------------------- | Setup | # of null checks | ------------------------------------- | unpatched, -O0 | 21767 | | patched, -O0 | 10758 | ------------------------------------- Differential Revision: https://reviews.llvm.org/D29530 llvm-svn: 295391
* add tests for ENAMETOOLONGEric Fiselier2017-02-172-9/+25
| | | | llvm-svn: 295390
* Attempt to fix bot failures by adding -mtriple to llc invocationTeresa Johnson2017-02-171-1/+1
| | | | | | | Failures on hexagon from test added with r295384, e.g.: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/3793 llvm-svn: 295389
* Add a comment.Rui Ueyama2017-02-171-0/+3
| | | | llvm-svn: 295388
* Bug 31948: Fix assertion when bitcasting constantexpr pointersMatt Arsenault2017-02-174-0/+32
| | | | llvm-svn: 295387
* FileCheck-ize some tests in test/CodeGen/X86/Chandler Carruth2017-02-176-32/+55
| | | | | | | | Patch by Jorge Gorbe! Differential Revision: https://reviews.llvm.org/D29807 llvm-svn: 295386
* Merge reloc sections in -emit-reloc mode.Rafael Espindola2017-02-172-0/+29
| | | | | | | | | | | | | Without this we would produce two relocation sections pointing to the same section, which gnu tools reject. This fixes pr31986. The implementation of -r/--emit-reloc is getting fairly complicated. But lets get the test passing before trying to refactor it. llvm-svn: 295385
* Handle link of NoDebug CU with a CU that has debug emission enabledTeresa Johnson2017-02-173-1/+95
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is an issue both with regular and Thin LTO. When we link together a DICompileUnit that is marked NoDebug (e.g when compiling with -g0 but applying an AutoFDO profile, which requires location tracking in the compiler) and a DICompileUnit with debug emission enabled, we can have failures during dwarf debug generation. Specifically, when we have inlined from the NoDebug compile unit into the debug compile unit, we can fail during construction of the abstract and inlined scope DIEs. This is because the SPMap does not include NoDebug CUs (they are skipped in the debug_compile_units_iterator). This patch fixes the failures by skipping locations from NoDebug CUs when extracting lexical scopes. Reviewers: dblaikie, aprantl Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D29765 llvm-svn: 295384
* [IR] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-02-1715-151/+228
| | | | | | minor fixes (NFC). llvm-svn: 295383
* [pdb] Add the ability to resolve TypeServer PDBs.Zachary Turner2017-02-1624-17/+513
| | | | | | | | | | | | | | Some PDBs or object files can contain references to other PDBs where the real type information lives. When this happens, all type indices in the original PDB are meaningless because their records are not there. With this patch we add the ability to pull type info from those secondary PDBs. Differential Revision: https://reviews.llvm.org/D29973 llvm-svn: 295382
* Use correct fix-it location for -Wblock-capture-autoreleasingAlex Lorenz2017-02-162-2/+31
| | | | | | | | | The '__autoreleasing' keyword should be inserted after the Objective-C pointer type. rdar://30123548 llvm-svn: 295381
* Properly set up the DeclContext for parameters of implicit deduction guides;Richard Smith2017-02-162-2/+15
| | | | | | this is needed for deferred instantiation of default arguments. llvm-svn: 295379
* [LSR] Prevent formula with SCEVAddRecExpr type of Reg from Sibling loopsWei Mi2017-02-162-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In rL294814, we allow formula with SCEVAddRecExpr type of Reg from loops other than current loop. This is good for the case when induction variable of outerloop being used in expr in innerloop. But it is very bad to allow such Reg from sibling loop because we may need to add lsr.iv in other sibling loops when scev expanding those SCEVAddRecExpr type exprs. For the testcase below, one loop can be inserted with a bunch of lsr.iv because of LSR for other loops. // The induction variable j from a loop in the middle will have initial // value generated from previous sibling loop and exit value used by its // next sibling loop. void goo(long i, long j); long cond; void foo(long N) { long i = 0; long j = 0; i = 0; do { goo(i, j); i++; j++; } while (cond); i = 0; do { goo(i, j); i++; j++; } while (cond); i = 0; do { goo(i, j); i++; j++; } while (cond); i = 0; do { goo(i, j); i++; j++; } while (cond); i = 0; do { goo(i, j); i++; j++; } while (cond); i = 0; do { goo(i, j); i++; j++; } while (cond); } The fix is to only allow formula with SCEVAddRecExpr type of Reg from current loop or its parents. Differential Revision: https://reviews.llvm.org/D30021 llvm-svn: 295378
* Fix -Wunused-lambda-capture by removing some unused lambda capturesDavid Blaikie2017-02-161-2/+2
| | | | llvm-svn: 295373
* [MachinePipeliner] Remove redundant destructor. NFC.Benjamin Kramer2017-02-161-8/+1
| | | | llvm-svn: 295372
* [Hexagon] Start using regmasks on callsKrzysztof Parzyszek2017-02-1620-118/+272
| | | | | | All the cool targets are doing it... llvm-svn: 295371
* Change default TimerGroup singleton to use magic staticsErich Keane2017-02-161-16/+3
| | | | | | | | | | | TimerGroup was showing up on a leak in valigrind, and used some pretty complex code to implement a singleton. This patch replaces the implementation with a vastly simpler one. Differential Revision: https://reviews.llvm.org/D28367 llvm-svn: 295370
* Fix buildZachary Turner2017-02-162-2/+2
| | | | llvm-svn: 295369
OpenPOWER on IntegriCloud