summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [MIPS GlobalISel] Select bitwise instructionsPetar Jovanovic2018-08-217-0/+905
| | | | | | | | | | Select bitwise instructions for i32. Patch by Petar Avramovic. Differential Revision: https://reviews.llvm.org/D50183 llvm-svn: 340258
* [LLD][ELF] - Check the architecture of lazy objects earlier.George Rimar2018-08-213-18/+9
| | | | | | | | | | | | | | | | | | | | | | Our code in LazyObjFile::parse() has an ELFT switch and adds a lazy object by its ELFT kind. Though it might be possible to add a file using a different architecture and make LLD to silently accept it (if the file is empty or contains only week symbols). That itself, not a huge issue perhaps (because the error would be reported later if the file is fetched), but still does not look clean and correct. It is possible to report an error earlier and clean up the code. That is what the patch does. Ideally, we might want to reuse isCompatible from SymbolTable.cpp, but it is static and accepts a file as an argument, what is not convenient. Since such a situation should be rare, I think it should be OK to go with the way chosen in this patch. Differential revision: https://reviews.llvm.org/D50899 llvm-svn: 340257
* [LICM] Hoist guards with invariant conditionsMax Kazantsev2018-08-213-7/+25
| | | | | | | | | | This patch teaches LICM to hoist guards from the loop if they are guaranteed to execute and if there are no side effects that could prevent that. Differential Revision: https://reviews.llvm.org/D50501 Reviewed By: reames llvm-svn: 340256
* [RegisterCoalescer] Do not assert when trying to remat dead valuesBjorn Pettersson2018-08-212-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: RegisterCoalescer::reMaterializeTrivialDef used to assert that the input register was live in. But as shown by the new coalesce-dead-lanes.mir test case that seems to be a valid scenario. We now return false instead of the assert, simply avoiding to remat the dead def. Normally a COPY of an undef value is eliminated by eliminateUndefCopy(). Although we only do that when the destination isn't a physical register. So the situation above should be limited to the case when we copy an undef value to a physical register. Reviewers: kparzysz, wmi, tpr Reviewed By: kparzysz Subscribers: MatzeB, qcolombet, tpr, llvm-commits Differential Revision: https://reviews.llvm.org/D50842 llvm-svn: 340255
* [NFC] Add some LICM testsMax Kazantsev2018-08-211-0/+179
| | | | llvm-svn: 340254
* [docs] Add --print-icf-sections to ld.lld.1Fangrui Song2018-08-211-0/+2
| | | | llvm-svn: 340253
* [llvm] NFC: Fix assert condition and suppress warningKirill Bobyrev2018-08-211-1/+1
| | | | | | | | | As mentioned by andreadb, assert condition is wrong and causes GCC warning. Related Revision: https://reviews.llvm.org/D50839 llvm-svn: 340252
* Removed unused variable [NFC]Mikael Holmen2018-08-211-1/+1
| | | | | | | | | | The compiler warned: ../tools/clang/lib/Sema/SemaType.cpp:6788:31: error: unused variable 'AT' [-Werror,-Wunused-variable] if (const AttributedType *AT = S.getCallingConvAttributedType(type)) { ^ 1 error generated. llvm-svn: 340251
* [NFC] Factor out predecessors collection into a separate methodMax Kazantsev2018-08-212-11/+27
| | | | | | | | | It may be reused in a different piece of logic. Differential Revision: https://reviews.llvm.org/D50890 Reviewed By: reames llvm-svn: 340250
* [IR Verifier] Do not allow bitcast of pointer to vector of pointers and vice ↵Serguei Katkov2018-08-215-6/+57
| | | | | | | | | | | | | | | | | | versa. LangRef for BitCast requires that "The bit sizes of value and the destination type, ty2, must be identical". Currently verifier allows BitCast of pointer to vector of pointers so that the sizes are different. This change fixes that. Reviewers: arsenm Reviewed By: arsenm Subscribers: llvm-commits, wdng Differential Revision: https://reviews.llvm.org/D50886 llvm-svn: 340249
* [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
OpenPOWER on IntegriCloud