summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] [NFC] Split up RetainSummaryManager from RetainCountChecker - try #2George Karpenkov2018-08-2113-350/+273
| | | | | | | | | | Turns out it can't be removed from the analyzer since it relies on CallEvent. Moving to staticAnalyzer/core Differential Revision: https://reviews.llvm.org/D51023 llvm-svn: 340247
* [docs] Fix a small typo in a debug info exampleAlex Langford2018-08-211-1/+1
| | | | llvm-svn: 340246
* [AST] Mark invariant.starts as being readonlyPhilip Reames2018-08-212-6/+6
| | | | | | | | These intrinsics are modelled as writing for control flow purposes, but they don't actually write to any location. Marking these - as we did for guards - allows LICM to hoist loads out of loops containing invariant.starts. Differential Revision: https://reviews.llvm.org/D50861 llvm-svn: 340245
* [LICM] Add tests from D50786 [NFC]Philip Reames2018-08-212-0/+34
| | | | | | Exercise more use of volatiles to illustrate that nothing changes as we tweak how we detect them. llvm-svn: 340244
* [LICM][NFC] Add tests from D50730Philip Reames2018-08-211-0/+38
| | | | | | | Landing tests so corresponding change can show effects clearly. see D50730 [AST] Generalize argument specific aliasing llvm-svn: 340243
* [LICM] More tests for D50925 [NFC]Philip Reames2018-08-211-0/+238
| | | | | | This time, the corresponding cases where we can hoist (store-like) calls out of loops. llvm-svn: 340242
* [llvm-objcopy] Simplify find(X,Y) != X.end() with is_contained()Fangrui Song2018-08-211-3/+3
| | | | llvm-svn: 340241
* Fix global_metadata_external_comdat.ll testReid Kleckner2018-08-211-2/+2
| | | | llvm-svn: 340240
* [MS Demangler] Demangle special operator 'dynamic initializer'.Zachary Turner2018-08-202-1/+24
| | | | | | | | | | | This is encoded as __E and should print something like "dynamic initializer for 'Foo'(void)" This also adds support for dynamic atexit destructor, which is basically identical but encoded as __F with slightly different description. llvm-svn: 340239
* [MS Demangler] Anonymous namespace hashes can be backreferenced.Zachary Turner2018-08-202-0/+5
| | | | | | | Previously we were not remembering the key values of anonymous namespaces, but we need to do this. llvm-svn: 340238
* [MS Demangler] Properly demangle anonymous namespaces.Zachary Turner2018-08-202-5/+9
| | | | llvm-svn: 340237
* [WebAssembly] Revert type of wake count in atomic.wake to i32Heejin Ahn2018-08-202-4/+4
| | | | | | | | | | | | | | Summary: We decided to revert this from i64 to i32 in Nov 28 CG meeting. Fixes PR38632. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D51013 llvm-svn: 340235
* [WebAssembly] Revert type of wake count in atomic.wake to i32Heejin Ahn2018-08-203-44/+44
| | | | | | | | | | | | | | Summary: We decided to revert this from i64 to i32 in Nov 28 CG meeting. Fixes PR38632. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D51010 llvm-svn: 340234
* [LICM][Tests] Add tests for store hoisting [NFC]Philip Reames2018-08-201-0/+230
| | | | | | https://reviews.llvm.org/D50925 will be rebased on top of this. llvm-svn: 340233
* Re-land r334313 "[asan] Instrument comdat globals on COFF targets"Reid Kleckner2018-08-203-8/+87
| | | | | | | | | | | | | | | | | | | If we can use comdats, then we can make it so that the global metadata is thrown away if the prevailing definition of the global was uninstrumented. I have only tested this on COFF targets, but in theory, there is no reason that we cannot also do this for ELF. This will allow us to re-enable string merging with ASan on Windows, reducing the binary size cost of ASan on Windows. I tested this change with ASan+PGO, and I fixed an issue with the __llvm_profile_raw_version symbol. With the old version of my patch, we would attempt to instrument that symbol on ELF because it had a comdat with external linkage. If we had been using the linker GC-friendly metadata scheme, everything would have worked, but clang does not enable it by default. llvm-svn: 340232
* [InstCombine] Add splat vector constant support to foldICmpAddOpConst.Craig Topper2018-08-203-23/+62
| | | | | | Differential Revision: https://reviews.llvm.org/D50946 llvm-svn: 340231
* [WebAssembly] Remove an unused argument from writeSPToMemory (NFC)Heejin Ahn2018-08-201-8/+5
| | | | | | | | | | Reviewers: dschuff Subscribers: dschuff, sbc100, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D50933 llvm-svn: 340230
* [llvm-strip] Allow only one inputFangrui Song2018-08-201-3/+3
| | | | | | | | | | | | | | Summary: Before, llvm-strip accepted a second argument but it would just be ignored. Reviewers: alexshap, jhenderson, paulsemel Reviewed By: alexshap Subscribers: jakehehrlich, rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D51004 llvm-svn: 340229
* libclang: add install/distribution targets for pythonSaleem Abdulrasool2018-08-202-0/+22
| | | | | | | | | | | Add installation support for the python bindings for libclang. Add an additional CMake configuration variable to enumerate the python versions for which the bindings should be installed. This allows for a LLVM/clang distribution to distribute the python bindings for libclang as part of the image. Because the python versions need to be explicitly stated by the user, the default image remains unchanged. llvm-svn: 340228
* [llvm-mca] Remove unused formal parameter. NFC.Matt Davis2018-08-201-4/+4
| | | | llvm-svn: 340227
* Teach libc++ to use native NetBSD's max_align_tKamil Rytarowski2018-08-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: The NetBSD headers ship with max_align_t, that is not compatible with the fallback version in libc++. There is no defined a compiler specific symbol in the headers like: - __CLANG_MAX_ALIGN_T_DEFINED - _GCC_MAX_ALIGN_T - __DEFINED_max_align_t Sponsored by <The NetBSD Foundation> Reviewers: chandlerc, dlj, EricWF, joerg Reviewed By: joerg Subscribers: bsdjhb, llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D47814 llvm-svn: 340224
* extend binop folds for selects to include true and false binops flag ↵Michael Berg2018-08-202-3/+4
| | | | | | | | | | | | | | intersection Summary: This change address bug 38641 Reviewers: spatel, wristow Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D50996 llvm-svn: 340222
* [llvm-objdump] Add ability to demangle COFF symbols.Zachary Turner2018-08-204-24/+33
| | | | llvm-svn: 340221
* [ASTImporter] Add test for C++'s try/catch statements.Raphael Isemann2018-08-203-0/+59
| | | | | | | | | | | | | | Summary: Also enable exceptions in clang-import-test so that we can parse the test files. Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50978 llvm-svn: 340220
* Reflow commentsAdrian Prantl2018-08-201-3/+3
| | | | llvm-svn: 340219
* Set path to sanitizer runtime when running tests through LIT on macOS.Adrian Prantl2018-08-202-0/+17
| | | | | | | | rdar://problem/42984739 Differential Revision: https://reviews.llvm.org/D50997 llvm-svn: 340218
* [X86] Add test command line to expose PR38649.Craig Topper2018-08-201-44/+105
| | | | | | Bypass slow division and constant hoisting are conspiring to break div+rem of large constants. llvm-svn: 340217
* [hwasan] Add a (almost) no-interceptor mode.Evgeniy Stepanov2018-08-2011-185/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The idea behind this change is to allow sanitization of libc. We are prototyping on Bionic, but the tool interface will be general enough (or at least generalizable) to support any other libc. When libc depends on libclang_rt.hwasan, the latter can not interpose libc functions. In fact, majority of interceptors become unnecessary when libc code is instrumented. This change gets rid of most hwasan interceptors and provides interface for libc to notify hwasan about thread creation and destruction events. Some interceptors (pthread_create) are kept under #ifdef to enable testing with uninstrumented libc. They are expressed in terms of the new libc interface. The new cmake switch, COMPILER_RT_HWASAN_WITH_INTERCEPTORS, ON by default, builds testing version of the library with the aforementioned pthread_create interceptor. With the OFF setting, the library becomes more of a libc plugin. Reviewers: vitalybuka, kcc, jfb Subscribers: srhines, kubamracek, mgorny, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D50922 llvm-svn: 340216
* Model type attributes as regular Attrs.Richard Smith2018-08-2026-743/+618
| | | | | | | | | | | | | | Specifically, AttributedType now tracks a regular attr::Kind rather than having its own parallel Kind enumeration, and AttributedTypeLoc now holds an Attr* instead of holding an ad-hoc collection of Attr fields. Differential Revision: https://reviews.llvm.org/D50526 This reinstates r339623, reverted in r339638, with a fix to not fail template instantiation if we instantiate a QualType with no associated type source information and we encounter an AttributedType. llvm-svn: 340215
* [X86] Prevent lowerVectorShuffleByMerging128BitLanes from creating cyclesCraig Topper2018-08-202-0/+30
| | | | | | | | | | | | Due to some splat handling code in getVectorShuffle, its possible for NewV1/NewV2 to have their mask modified from what is requested. This can lead to cycles being created in the DAG. This patch examines the returned mask and makes sure its different. Long term we may need to look closer at that splat code in getVectorShuffle, or add more splat awareness to getVectorShuffle. Fixes PR38639 Differential Revision: https://reviews.llvm.org/D50981 llvm-svn: 340214
* [X86] Teach combineTruncatedArithmetic to handle some cases of ISD::SUBCraig Topper2018-08-202-227/+38
| | | | | | | | We can safely avoid interfering with the subus combine if both inputs are freely truncatable. Either both extends, or an extend and a constant vector. Differential Revision: https://reviews.llvm.org/D50878 llvm-svn: 340212
* [X86] Pre-commit test cases for D50878.Craig Topper2018-08-201-0/+236
| | | | llvm-svn: 340211
* [LegacyPassManager] Remove analysis P from AnUsageMap before deleting it in ↵Craig Topper2018-08-201-0/+2
| | | | | | | | | | | | schedulePass. If we deem the analysis pass useless and delete it, we need to make sure we remove it from AnUsageMap. Otherwise we might allocate another pass in the freed memory. This will cause us to reuse the AnalysisUsage from the original pass instead of the new one. Fixes PR38511 Differential Revision: https://reviews.llvm.org/D50573 llvm-svn: 340210
* Consistently use MemoryLocation::UnknownSize to indicate unknown access sizeKrzysztof Parzyszek2018-08-209-18/+90
| | | | | | | | | | | | 1. Change the software pipeliner to use unknown size instead of dropping memory operands. It used to do it before, but MachineInstr::mayAlias did not handle it correctly. 2. Recognize UnknownSize in MachineInstr::mayAlias. 3. Print and parse UnknownSize in MIR. Differential Revision: https://reviews.llvm.org/D50339 llvm-svn: 340208
* Port LLVM r340203 (and r340205) to libcxxabi.Richard Smith2018-08-202-4835/+5273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move Itanium demangler implementation into a header file and add visitation support. Summary: This transforms the Itanium demangler into a generic reusable library that can be used to build, traverse, and transform Itanium mangled name trees. This is in preparation for adding a canonicalizing demangler, which cannot live in the Demangle library for layering reasons. In order to keep the diffs simpler, this patch moves more code to the new header than is strictly necessary: in particular, all of the printLeft / printRight implementations can be moved to the implementation file. (And indeed we could make them non-virtual now if we wished, and remove the vptr from Node.) All nodes are now included in the Kind enumeration, rather than omitting some of the Expr nodes, and the three different floating-point literal node types now have distinct Kind values. As a proof of concept for the visitation / matching mechanism, this patch implements a Node dumping facility on top of it, replacing the prior mechanism that produced the pretty-printed output rather than a tree dump. Sample dump output: FunctionEncoding( NameType("int"), NameWithTemplateArgs( NestedName( NameWithTemplateArgs( NameType("A"), TemplateArgs( {NameType("B")})), NameType("f")), TemplateArgs( {NameType("int")})), {}, <null>, QualConst, FunctionRefQual::FrefQualLValue) As a next step, it would make sense to move the LLVM high-level interface to the demangler (the itaniumDemangler function and ItaniumPartialDemangler class) into the Support library, and implement them in terms of the Demangle library. This would allow the libc++abi demangler implementation to be an identical copy of the llvm Demangle library, and would allow the LLVM implementation to reuse LLVM components such as llvm::BumpPtrAllocator, but we'll need to decide how to coordinate that with the MS ABI demangler, so I'm not doing that in this patch. No functionality change intended other than the behavior of dump(). Reviewers: erik.pilkington, zturner, chandlerc, dlj Subscribers: aheejin, llvm-commits Differential Revision: https://reviews.llvm.org/D50930 llvm-svn: 340207
* DebugInfo: Add the ability to disable DWARF name tables entirelyDavid Blaikie2018-08-2010-21/+53
| | | | | | | | | | | | | | | | | | This changes the current default behavior (from emitting pubnames by default, to not emitting them by default) & moves to matching GCC's behavior* with one significant difference: -gno(-gnu)-pubnames disables pubnames even in the presence of -gsplit-dwarf (though -gsplit-dwarf still by default enables -ggnu-pubnames). This allows users to disable pubnames (& the new DWARF5 accelerated access tables) when they might not be worth the size overhead. * GCC's behavior is that -ggnu-pubnames and -gpubnames override each other, and that -gno-gnu-pubnames and -gno-pubnames act as synonyms and disable either kind of pubnames if they come last. (eg: -gpubnames -gno-gnu-pubnames causes no pubnames (neither gnu or standard) to be emitted) llvm-svn: 340206
* Add missing include (<functional> for std::ref)David Blaikie2018-08-201-0/+1
| | | | llvm-svn: 340205
* Revert "(Retry) Add a basic integration test for C++ smart pointers"Vedant Kumar2018-08-201-41/+0
| | | | | | | This reverts r340189. The new test is still failing on some Apple-internal bots. llvm-svn: 340204
* Move Itanium demangler implementation into a header file and add visitation ↵Richard Smith2018-08-206-4860/+5291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support. Summary: This transforms the Itanium demangler into a generic reusable library that can be used to build, traverse, and transform Itanium mangled name trees. This is in preparation for adding a canonicalizing demangler, which cannot live in the Demangle library for layering reasons. In order to keep the diffs simpler, this patch moves more code to the new header than is strictly necessary: in particular, all of the printLeft / printRight implementations can be moved to the implementation file. (And indeed we could make them non-virtual now if we wished, and remove the vptr from Node.) All nodes are now included in the Kind enumeration, rather than omitting some of the Expr nodes, and the three different floating-point literal node types now have distinct Kind values. As a proof of concept for the visitation / matching mechanism, this patch implements a Node dumping facility on top of it, replacing the prior mechanism that produced the pretty-printed output rather than a tree dump. Sample dump output: FunctionEncoding( NameType("int"), NameWithTemplateArgs( NestedName( NameWithTemplateArgs( NameType("A"), TemplateArgs( {NameType("B")})), NameType("f")), TemplateArgs( {NameType("int")})), {}, <null>, QualConst, FunctionRefQual::FrefQualLValue) As a next step, it would make sense to move the LLVM high-level interface to the demangler (the itaniumDemangler function and ItaniumPartialDemangler class) into the Support library, and implement them in terms of the Demangle library. This would allow the libc++abi demangler implementation to be an identical copy of the llvm Demangle library, and would allow the LLVM implementation to reuse LLVM components such as llvm::BumpPtrAllocator, but we'll need to decide how to coordinate that with the MS ABI demangler, so I'm not doing that in this patch. No functionality change intended other than the behavior of dump(). Reviewers: erik.pilkington, zturner, chandlerc, dlj Subscribers: aheejin, llvm-commits Differential Revision: https://reviews.llvm.org/D50930 llvm-svn: 340203
* Revert "AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr space"Vitaly Buka2018-08-203-8/+2
| | | | | | | | As it introduces out of bound access. This reverts commit r340172 and r340171 llvm-svn: 340202
* [FPEnv] Support constrained FREM intrinsicCameron McInally2018-08-206-14/+296
| | | | | | Differential Revision: https://reviews.llvm.org/D50975 llvm-svn: 340201
* [PSV] Update API to be able to use TargetCustom without UB.Marcello Maggioni2018-08-207-12/+12
| | | | | | | | | | | getTargetCustom() requires values for "Kind" in the constructor that are not in the PSVKind enum. Passing a value that is not inside an enum as an argument to a constructor of the type of the enum is UB. Changing to the underlying type of the enum would solve the UB Differential Revision: https://reviews.llvm.org/D50909 llvm-svn: 340200
* [MS Demangler] Demangle member pointer template parameters.Zachary Turner2018-08-203-49/+270
| | | | llvm-svn: 340199
* [Lex] Make HeaderMaps a unique_ptr vectorFangrui Song2018-08-204-18/+12
| | | | | | | | | | | | Summary: unique_ptr makes the ownership clearer than a raw pointer container. Reviewers: Eugene.Zelenko, dblaikie Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50945 llvm-svn: 340198
* Revert "Revert r339977: [GISel]: Add Opcodes for a few LLVM Intrinsics"Aditya Nandakumar2018-08-205-0/+57
| | | | | | | | | | This reverts commit 7debc334e6421bb5251ef8f18e97166dfc7dd787. I missed updating legalizer-info-validation.mir as I had assertions turned off in my build and that specific test requires asserts. Fixed it now. llvm-svn: 340197
* [TargetLowering] Disable BuildSDiv division by one or negone.Simon Pilgrim2018-08-202-81/+118
| | | | | | Fuzz tests have detected an issue, currently working on a fix. llvm-svn: 340195
* [ConstantFolding] improve folding of binops with vector undef operandSanjay Patel2018-08-202-17/+17
| | | | | | | A non-undef operand may still have undef constant elements, so we should always propagate the vector results per-lane. llvm-svn: 340194
* Rename -mlink-cuda-bitcode to -mlink-builtin-bitcodeMatt Arsenault2018-08-207-14/+22
| | | | | | | The same semantics work for OpenCL, and probably any offload language. Keep the old name around as an alias. llvm-svn: 340193
* [MemorySSA] Update comment to better describe cfg change (NFC).Alina Sbirlea2018-08-201-3/+3
| | | | llvm-svn: 340192
* [OPENMP] Fix crash on the emission of the weak function declaration.Alexey Bataev2018-08-202-9/+25
| | | | | | | | | If the function is actually a weak reference, it should not be marked as deferred definition as this is only a declaration. Patch adds checks for the definitions if they must be emitted. Otherwise, only declaration is emitted. llvm-svn: 340191
OpenPOWER on IntegriCloud