summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sanitizer_common: fix description of disable_coredump flagDmitry Vyukov2016-10-281-3/+3
| | | | | | | s/disable_core/disable_coredump/ Add missing space in text. llvm-svn: 285401
* tsan: fix windows buildDmitry Vyukov2016-10-283-1/+5
| | | | | | | | | | | | | | | | | | | | | Currently fails with: C:\workdir\compiler-rt\lib\tsan\go>gcc -c -o race_windows_amd64.syso gotsan.cc -I..\rtl -I..\.. -I..\..\sanitizer_common -I..\..\..\include -m64 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO -Wno-error=at tributes -Wno-attributes -Wno-format -Wno-maybe-uninitialized -DSANITIZER_DEBUG=0 -O3 -fomit-frame-pointer -std=c++11 gotsan.cc:9229:0: warning: ignoring #pragma comment [-Wunknown-pragmas] #pragma comment(linker, "/alternatename:__sanitizer_print_memory_profile=__sanitizer_default_print_memory_profile") // NOLINT ^ gotsan.cc: In function 'void __sanitizer_print_memory_profile(int)': gotsan.cc:9226:17: error: redefinition of 'void __sanitizer_print_memory_profile(int)' extern "C" void __sanitizer_print_memory_profile(int top_percent) {} ^ gotsan.cc:6898:6: note: 'void __sanitizer_print_memory_profile(int)' previously defined here void __sanitizer_print_memory_profile(int top_percent) { Remove __sanitizer_print_memory_profile from Go build, it is not needed. llvm-svn: 285400
* [SelectionDAG] computeKnownBits - early-out if any BUILD_VECTOR element has ↵Simon Pilgrim2016-10-281-0/+4
| | | | | | | | no known bits No need to check the remaining elements - no common known bits are available. llvm-svn: 285399
* [SelectionDAG] Tidyup UDIV computeKnownBits implementationSimon Pilgrim2016-10-281-2/+0
| | | | | | No need to clear KnownOne2/KnownZero2 bits as the next call to computeKnownBits will overwrite them anyway llvm-svn: 285398
* [SelectionDAG] Increment computeKnownBits recursion depth for ↵Simon Pilgrim2016-10-281-2/+2
| | | | | | SMIN/SMAX/UMIN/UMAX like all other ops llvm-svn: 285397
* [include-fixer] Make error message sound less like clang crashed.Benjamin Kramer2016-10-281-2/+6
| | | | | | | | | We suppress all Clang diagnostics (because they would be wrong, include-fixer does custom recovery) but still want to give some feedback in case there was a compiler error we couldn't recover from. The most common case for this is a #include in the file that couldn't be found. llvm-svn: 285396
* [OpenCL] Diagnose variadic argumentsAnastasia Stulova2016-10-287-29/+47
| | | | | | | | | | | | | | OpenCL disallows using variadic arguments (s6.9.e and s6.12.5 OpenCL v2.0) apart from some exceptions: - printf - enqueue_kernel This change adds error diagnostic for variadic functions but accepts printf and any compiler internal function (which should cover __enqueue_kernel_XXX cases). It also unifies diagnostic with block prototype and adds missing uncaught cases for blocks. llvm-svn: 285395
* [LCSSA] Perform LCSSA verification only for the current loop nest.Igor Laevsky2016-10-286-5/+63
| | | | | | | | | Now LPPassManager will run LCSSA verification only for the top-level loop which was processed on the current iteration. Differential Revision: https://reviews.llvm.org/D25873 llvm-svn: 285394
* Add a couple of fun unit tests for FileSpec::EqualPavel Labath2016-10-281-9/+82
| | | | | | | Most of them fail right now and are commented out. The main problem is handling of backslashes on windows, but also the posix path code has a couple of issues. llvm-svn: 285393
* Fix test when using an installed libc++Eric Fiselier2016-10-282-0/+3
| | | | llvm-svn: 285392
* [Objective-C] Add objc_subclassing_restricted attributeAlex Lorenz2016-10-286-0/+76
| | | | | | | | | | | | | | | | | | | | This patch adds an objc_subclassing_restricted attribute into clang. This attribute acts similarly to 'final' - Objective-C classes with this attribute can't be subclassed. However, @interface declarations that have objc_subclassing_restricted but don't have @implementation are allowed to inherit other @interface declarations with objc_subclassing_restricted. This is needed to describe the Swift class hierarchy in clang while making sure that the Objective-C classes cannot subclass the Swift classes. This attribute is already implemented in a fork of clang that's used for Swift (https://github.com/apple/swift-clang) and this patch moves that code to the upstream clang repository. rdar://28937548 Differential Revision: https://reviews.llvm.org/D25993 llvm-svn: 285391
* Fix MSVC "not all control paths return a value" warningSimon Pilgrim2016-10-281-0/+2
| | | | | | Add unreachable after enum switch statement llvm-svn: 285390
* [asan] Run pthread_create_from_constructor test on x86 targets.Maxim Ostapenko2016-10-281-1/+1
| | | | llvm-svn: 285389
* [openmp] Remove test assumption that canonical binary name contains "clang"Benjamin Kramer2016-10-281-15/+15
| | | | | | | | Patch by Sam McCall! Differential Revision: https://reviews.llvm.org/D26067 llvm-svn: 285388
* [asan] Disable pthread_create_from_constructor test on PowerPC64.Maxim Ostapenko2016-10-281-0/+1
| | | | llvm-svn: 285387
* Sema: do not warn about unused const vars if main file is a headerErik Verbruggen2016-10-282-2/+9
| | | | | | | | | If we pass a header to libclang, e.g. because it's open in an editor in an IDE, warnings about unused const vars are not useful: other files that include the header might use those constants. So when -x *-header is passed as command-line option, suppress this warning. llvm-svn: 285386
* [asan/lsan] Avoid possible deadlock in dynamic ASan runtime thread ↵Maxim Ostapenko2016-10-282-0/+49
| | | | | | | | | | | | | | | | | | | | initialization. There is possible deadlock in dynamic ASan runtime when we dlopen() shared lib which creates a thread at the global initialization stage. The scenario: 1) dlopen grabs a GI_pthread_mutex_lock in main thread. 2) main thread calls pthread_create, ASan intercepts it, calls real pthread_create and waits for the second thread to be "fully initialized". 3) Newly created thread tries to access a thread local disable_counter in LSan (to complete its "full initialization") and hangs in tls_get_addr_tail, because it also tries to acquire GI_pthread_mutex_lock. The issue is reproducible on relative recent Glibc versions e.g. 2.23. Differential Revision: https://reviews.llvm.org/D26028 llvm-svn: 285385
* Add more tests for optional<const T>Eric Fiselier2016-10-286-0/+29
| | | | llvm-svn: 285384
* Update mac ABI listEric Fiselier2016-10-282-1/+2
| | | | llvm-svn: 285383
* Add __libcpp_version file and __libcpp_library_version function.Eric Fiselier2016-10-286-0/+57
| | | | | | | | | | | | | | | This patch does two seperate things. First it adds a file called "__libcpp_version" which only contains the current libc++ version (currently 4000). This file is not intended for use as a header. This file is used by Clang in order to easily determine the installed libc++ version. This allows Clang to enable/disable certain language features only when the library supports them. The second change is the addition of _LIBCPP_LIBRARY_VERSION macro, which returns the version of the installed dylib since it may be different than the headers. llvm-svn: 285382
* Revert "[DAGCombiner] Add vector demanded elements support to computeKnownBits"Juergen Ributzka2016-10-284-137/+59
| | | | | | | This seems to have increased LTO compile time bejond 2x of previous builds. See http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto/10676/ llvm-svn: 285381
* [Reassociate] Removing instructions mutates the IR.Davide Italiano2016-10-282-1/+19
| | | | | | | | | Fixes PR 30784. Discussed with Justin, who pointed out that in the new PassManager infrastructure we can have more fine-grained control on which analyses we want to preserve, but this is the best we can do with the current infrastructure. llvm-svn: 285380
* [ThinLTO] Create AliasSummary when building indexTeresa Johnson2016-10-282-7/+27
| | | | | | | | | | | | | | | | | | | Summary: Previously we were creating the alias summary on the fly while writing the summary to bitcode. This moves the creation of these summaries to the module summary index builder where we build the rest of the summary index. This is going to be necessary for setting the NoRename flag for values possibly used in inline asm or module level asm. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26049 llvm-svn: 285379
* [Modules] Make test from r285377 darwin specificBruno Cardoso Lopes2016-10-281-0/+2
| | | | | | | Appease buildbots: http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55876 llvm-svn: 285378
* [Modules] Add testcase for builtins used in umbrella headersBruno Cardoso Lopes2016-10-286-0/+46
| | | | | | | | | | | | | | This used to work before r284797 + r285152, which exposed something interesting; some users include builtins from umbrella headers. Clang should emit a warning to warn users this is not a good practice and umbrella headers shouldn't get the implicitly-add-the-builtin-version behavior for builtin header names. While we're not there, add the testcase to represent the way it currently works. llvm-svn: 285377
* [ThinLTO] Rename HasSection to NoRename (NFC)Teresa Johnson2016-10-284-13/+16
| | | | | | | | | | | | | | Summary: This is in preparation for a change to utilize this flag for symbols referenced/defined in either inline or module level assembly. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26048 llvm-svn: 285376
* [IR] Clang-format my previous commit. NFCI.Davide Italiano2016-10-281-2/+2
| | | | llvm-svn: 285375
* [Acxxel] Remove setActiveDeviceForThreadJason Henline2016-10-287-249/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: After experimenting with CUDA, I realized that we really only need to set the active context right before creating an object such as a stream or a device memory allocation. When we go on to use these objects later, it is fine if the context that created them is no longer active, operations with those objects will succeed anyway. Since it turns out that we don't have to check the active context for every operation, it makes sense to hide this active context from users (by removing the "ActiveDeviceForThread" setter and getter) and to change the Acxxel API to explicitly pass in the device ID to create objects. This change improves the Acxxel API and greatly simplifies the CUDA and OpenCL implementations because they no longer require thread_local data. Reviewers: jlebar, jprice Subscribers: mgorny, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D26050 llvm-svn: 285372
* [ConstantFold] Get the correct vector type when folding a getelementptr.Davide Italiano2016-10-282-6/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D26014 llvm-svn: 285371
* Fix a crash on invalid code.Richard Trieu2016-10-282-1/+19
| | | | | | | | | | | | The diagnostic was attempting to access the QualType of a TypeDecl by calling TypeDecl::getTypeForDecl. However, the Type pointer stored there is lazily loaded by functions in ASTContext. In most cases, the pointer is loaded and this does not cause a problem. However, when more that 50 or so unknown types are seen beforehand, this causes the Type to not be loaded, passing a null Type to the diagnostics, leading to the crash. Using ASTContext::getTypeDeclType will give a proper QualType for all cases. llvm-svn: 285370
* Check that we got back an object from MakeFunctionCallerJason Molenda2016-10-274-4/+4
| | | | | | | | before we call through it. <rdar://problem/28979705> llvm-svn: 285369
* AMDGPU/SI: Handle hazard with s_rfe_b64Tom Stellard2016-10-274-1/+66
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye Differential Revision: https://reviews.llvm.org/D25638 llvm-svn: 285368
* AMDGPU/SI: Handle hazard with sgpr lane selects for v_{read,write}laneTom Stellard2016-10-273-1/+100
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D25637 llvm-svn: 285367
* Remove accidentally commited test.Davide Italiano2016-10-271-15/+0
| | | | llvm-svn: 285366
* [IR] Reintroduce getGEPReturnType(), it will be used in a later patch.Davide Italiano2016-10-272-0/+20
| | | | llvm-svn: 285365
* AMDGPU/SI: Fix unused variable warning on non-debug buildsTom Stellard2016-10-271-0/+1
| | | | llvm-svn: 285363
* Reverting back r285355: "Update .debug_line section version information to ↵Ekaterina Romanova2016-10-2714-77/+33
| | | | | | match DWARF version", while I'm investigating a test failure. llvm-svn: 285362
* Revert "[Test Suite] Pull generateSource into lldbtest"Chris Bieneman2016-10-2712-48/+58
| | | | | | | | This reverts commit r285357. I committed this patch accidentally out of order. Will recommit when the change this depends on is landed. llvm-svn: 285361
* [Coverage] Darwin: Move __llvm_covmap from __DATA to __LLVM_COVVedant Kumar2016-10-272-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Programs with very large __llvm_covmap sections may fail to link on Darwin because because of out-of-range 32-bit RIP relative references. It isn't possible to work around this by using the large code model because it isn't supported on Darwin. One solution is to move the __llvm_covmap section past the end of the __DATA segment. === Testing === In addition to check-{llvm,clang,profile}, I performed a link test on a simple object after injecting ~4GB of padding into __llvm_covmap: @__llvm_coverage_padding = internal constant [4000000000 x i8] zeroinitializer, section "__LLVM_COV,__llvm_covmap", align 8 (This test is too expensive to check-in.) === Backwards Compatibility === This patch should not pose any backwards-compatibility concerns. LLVM is expected to scan all of the sections in a binary for __llvm_covmap, so changing its segment shouldn't affect anything. I double-checked this by loading coverage produced by an unpatched compiler with a patched llvm-cov. Suggested by Nick Kledzik. llvm-svn: 285360
* AMDGPU/SI: Handle hazard with > 8 byte VMEM storesTom Stellard2016-10-277-24/+201
| | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D25577 llvm-svn: 285359
* Reapply r285351 "[APFloat] Add DoubleAPFloat mode to APFloat. NFC." withTim Shen2016-10-272-221/+441
| | | | | | a workaround for old clang. llvm-svn: 285358
* [Test Suite] Pull generateSource into lldbtestChris Bieneman2016-10-2712-58/+48
| | | | | | | | | | | | | | | Summary: Convert tests using LLDB headers to use generateSource to put the right include paths in place regardless of whether or not you're building a framework. This also abstracted generateSource out of TestPublicAPIHeaders.py into lldbtest.py. Reviewers: tfiala, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D25887 llvm-svn: 285357
* [CMake] Rename lldb-launcher to darwin-debugChris Bieneman2016-10-273-43/+2
| | | | | | | | | | | | Summary: This tool is only built on Darwin, and the name darwin-debug matches the Xcode project. We should have this in sync unless there is a good reason not to. Reviewers: zturner, tfiala, labath Subscribers: labath, mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D25745 llvm-svn: 285356
* Update .debug_line section version information to match DWARF version.Ekaterina Romanova2016-10-2714-33/+77
| | | | | | | | | | In the past the compiler always emitted .debug_line version 2, though some opcodes from DWARF 3 (e.g. DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin or DW_LNS_set_isa) and from DWARF 4 could be emitted by the compiler. This patch changes version information of .debug_line to exactly match the DWARF version. For .debug_line version 4, a new field maximum_operations_per_instruction is emitted. Differential Revision: https://reviews.llvm.org/D16697 llvm-svn: 285355
* Revert "[APFloat] Add DoubleAPFloat mode to APFloat. NFC."Tim Shen2016-10-272-433/+221
| | | | | | This reverts r285351, since it breaks the build. llvm-svn: 285354
* [libFuzzer] enable use_cmp by defaultKostya Serebryany2016-10-2711-15/+17
| | | | llvm-svn: 285353
* [libcxx] Make regex_match backtrack when search failsTim Shen2016-10-272-20/+85
| | | | | | | | | | | | | | | | Summary: Fixes PR19851. alg.re.match/ecma.pass.cpp still XFAILS on linux, but after commenting out locale-related tests, it passes. I don't have a freebsd machine to produce a full pass. Reviewers: mclow.lists Subscribers: cfe-commits, emaste Differential Revision: https://reviews.llvm.org/D26026 llvm-svn: 285352
* [APFloat] Add DoubleAPFloat mode to APFloat. NFC.Tim Shen2016-10-272-221/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds DoubleAPFloat mode to APFloat. Now, an APFloat with semantics PPCDoubleDouble will have DoubleAPFloat layout (APFloat.U.Double), which contains two underlying APFloats as PPCDoubleDoubleImpl and IEEEdouble semantics. Currently the IEEEdouble APFloat is not used, and the first APFloat behaves exactly the same before this change. This patch consists of three kinds of logics: 1) Construction and destruction of APFloat. Now the ctors, dtor, assign opertors and factory functions construct different underlying layout based on the semantics passed in. 2) s/IEEE/getIEEE()/ for normal, lifetime-unrelated computation functions. These functions only access Floats[0] in DoubleAPFloat, which is the same as today's semantic. 3) A "Double dispatch" function, APFloat::convert. Converting between two different layouts requires appropriate logic. Neither of these change the external behavior. Reviewers: hfinkel, kbarton, echristo, iteratee Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D25977 llvm-svn: 285351
* BitcodeReader: Require clients to read the block info block at most once.Peter Collingbourne2016-10-271-2/+2
| | | | | | | | | | | | This change makes it the client's responsibility to call ReadBlockInfoBlock() at most once. This is in preparation for a future change that will allow there to be multiple block info blocks. See also: http://lists.llvm.org/pipermail/llvm-dev/2016-October/106512.html Differential Revision: https://reviews.llvm.org/D26016 llvm-svn: 285350
* [docs] Update the TSan and MSan docs to refer to the new no_sanitize attributeAnna Zaks2016-10-272-10/+10
| | | | | | | | | | TSan and MSan were the only remaining sanitizers referring to the deprecated attribute for issue suppression. Update the docs to recommend __attribute__((no_sanitize("..."))) instead. Differential Revision: https://reviews.llvm.org/D25885 llvm-svn: 285349
OpenPOWER on IntegriCloud