summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readobj] - Rewrite reloc-types.test to use YAML. NFCI.George Rimar2019-05-3021-699/+1843
| | | | | | | | | | | | | | | | | | | | | | This change rewrites and splits reloc-types.test to use yaml2obj instead of precompiled binaries. That allowed to remove 7 precompiled objects from the inputs. I took the existent objects, used obj2yaml on them, simplified the result and used yaml2obj in the test case with the result. Notes: * I converted, but did not remove relocs.obj.elf-i386, relocs.obj.elf-x86_64 or relocs.obj.elf-mips objects because found they are used in other tests. * I was unable to convert relocs.obj.elf-ppc64, because obj2yaml hangs on this file for me. * I was unable to convert relocs.obj.macho-arm, relocs.obj.macho-i386 and relocs.obj.macho-x86_64 because the output produced by obj2yaml does not seem to be correct. * Because of the above I did not remove the script for creating all of those objects: test\tools\llvm-readobj\Inputs\relocs.py Differential revision: https://reviews.llvm.org/D62594 llvm-svn: 362089
* [ARM] Introduce separate features for FP registersSjoerd Meijer2019-05-309-36/+220
| | | | | | | | | | | | | | | | | The MVE extension in Arm v8.1-M permits the use of some move, load and store isntructions which access the FP registers, even if there's no actual FP support in the processor (in particular, if you have the integer-only version of MVE). Therefore, we need separate subtarget features to condition those instructions on, which are implied by both FP and MVE but are not part of either. Patch mostly by Simon Tatham. Differential Revision: https://reviews.llvm.org/D60694 llvm-svn: 362088
* [OpenCL] Support logical vector operators in C++ modeSven van Haastregt2019-05-302-2/+4
| | | | | | | | | Support logical operators on vectors in C++ for OpenCL mode, to preserve backwards compatibility with OpenCL C. Differential Revision: https://reviews.llvm.org/D62588 llvm-svn: 362087
* DWARFASTParserClang: Delete dead codePavel Labath2019-05-301-33/+0
| | | | | | | This removes places where DW_AT_decl_file/line/column was being parsed, but not used. llvm-svn: 362086
* Fix Wdocumentation warning. NFCI.Simon Pilgrim2019-05-301-1/+0
| | | | llvm-svn: 362085
* [llvm-readobj] - An attemp to fix BB.George Rimar2019-05-301-2/+2
| | | | | | | | | | | | | BB failed: http://lab.llvm.org:8011/builders/clang-armv7-linux-build-cache/builds/15062/steps/build%20stage%201/logs/stdio Error was: /home/buildslave/buildslave/clang-armv7-linux-build-cache/llvm/tools/llvm-readobj/ELFDumper.cpp:3540:7: error: non-constant-expression cannot be narrowed from type 'llvm::support::detail::packed_endian_specific_integral<unsigned long long, llvm::support::endianness::little, 1>::value_type' (aka 'unsigned long long') to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] StrTabSec->sh_size}; llvm-svn: 362084
* [CostModel][X86] Add bool vector and/or/xor cost testsSimon Pilgrim2019-05-301-0/+192
| | | | llvm-svn: 362083
* [llvm-readobj/llvm-readelf] - Implement GNU style dumper of the ↵George Rimar2019-05-302-16/+53
| | | | | | | | | | | SHT_GNU_verdef section. It was not implemented yet, we had only LLVM style dumper implemented. Section description is here: https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html Differential revision: https://reviews.llvm.org/D62520 llvm-svn: 362082
* [X86][SSE] Improve bool vector extload (PR26091)Simon Pilgrim2019-05-303-5386/+423
| | | | | | | | We already have good codegen for (vXiY *ext(vXi1 bitcast(iX))) cases, this patch uses it for loads of vXi1 types as well - changing the load into a iX integer load, and bitcasting so that combineToExtendBoolVectorInReg can then use it. Differential Revision: https://reviews.llvm.org/D62449 llvm-svn: 362081
* [llvm-readobj/llvm-readelf] - Implement GNU style dumper of the ↵George Rimar2019-05-303-15/+193
| | | | | | | | | | | SHT_GNU_verneed section. It was not implemented yet, we had only LLVM style dumper implemented. Section description is here: https://refspecs.linuxfoundation.org/LSB_2.0.1/LSB-Core/LSB-Core/symverrqmts.html Differential revision: https://reviews.llvm.org/D62516 llvm-svn: 362080
* Revert "asm goto: fix out-of-bounds read of Constraints after rC362045"Fangrui Song2019-05-301-1/+0
| | | | | | It was fixed by rC362062. llvm-svn: 362079
* [ELF] Implement Local Dynamic style TLSDESC for x86-64Fangrui Song2019-05-305-6/+80
| | | | | | | | | | | | | | | | | | | | | | | For the Local Dynamic case of TLSDESC, _TLS_MODULE_BASE_ is defined as a special TLS symbol that makes: 1) Without relaxation: it produces a dynamic TLSDESC relocation that computes 0. Adding @dtpoff to access a TLS symbol. 2) With LD->LE relaxation: _TLS_MODULE_BASE_@tpoff = 0 (lowest address in the TLS block). Adding @tpoff to access a TLS symbol. For 1), this saves dynamic relocations and GOT slots as otherwise (General Dynamic) we would create an R_X86_64_TLSDESC and reserve two GOT slots for each symbol. Add ElfSym::TlsModuleBase and change the signature of getTlsTpOffset() to special case _TLS_MODULE_BASE_. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62577 llvm-svn: 362078
* Fix sphinx warning about missing footnote.Simon Pilgrim2019-05-301-1/+1
| | | | llvm-svn: 362077
* Fix MSVC "not all control paths return a value" warning.Simon Pilgrim2019-05-301-0/+1
| | | | llvm-svn: 362076
* DWARFASTParserClang: Move attribute parsing into a single functionPavel Labath2019-05-301-634/+427
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The ParseTypeFromDWARF function consists of a huge switch on the kind of type being parsed. Each case in this switch starts with parsing the attributes of the current DIE. A lot of these attributes are specific to one kind of a type, but a lot of them are common too, leading to code duplication. This patch reduces the duplication (and the size of ParseTypeFromDWARF) by moving the attribute parsing to a separate function. It creates a struct (ParsedTypeAttributes), which contains a parsed form of all attributes which are useful for parsing any kind of a type. The parsing code for a specific type kind can then access the fields which are relevant for that specific case. Reviewers: JDevlieghere, clayborg, aprantl Subscribers: jdoerfert, lldb-commits Differential Revision: https://reviews.llvm.org/D62477 llvm-svn: 362075
* [llvm-objcopy] Remove %p format specifiersEugene Leviant2019-05-302-5/+5
| | | | | | | On 32-bit machines %p expects 32 bit values, however addresses in llvm-objcopy are always 64 bits. llvm-svn: 362074
* [AArch64][SVE2] Asm: support SVE2 vector splice (constructive)Cullen Rhodes2019-05-304-0/+142
| | | | | | | | | | | | Summary: The specification can be found here: https://developer.arm.com/docs/ddi0602/latest Reviewed By: SjoerdMeijer Differential Revision: https://reviews.llvm.org/D62530 llvm-svn: 362073
* [AArch64][SVE2] Asm: support SVE2 load instructionsCullen Rhodes2019-05-3017-2/+1182
| | | | | | | | | | | | | | | Summary: Patch adds support for the following instructions: * LDNT1SB, LDNT1B, LDNT1SH, LDNT1H, LDNT1SW, LDNT1W, LDNT1D The specification can be found here: https://developer.arm.com/docs/ddi0602/latest Reviewed By: SjoerdMeijer Differential Revision: https://reviews.llvm.org/D62528 llvm-svn: 362072
* [AArch64][SVE2] Asm: support FCVTX/FLOGB instructionsCullen Rhodes2019-05-306-0/+187
| | | | | | | | | | | | | | | | | Summary: Patch completes SVE2 support for: SVE Floating Point Unary Operations - Predicated Group The specification can be found here: https://developer.arm.com/docs/ddi0602/latest Reviewed By: SjoerdMeijer Differential Revision: https://reviews.llvm.org/D62526 llvm-svn: 362071
* [AArch64][SVE2] Asm: add ext (immediate offset, constructive) instructionCullen Rhodes2019-05-304-0/+122
| | | | | | | | | | | | Summary: The specification can be found here: https://developer.arm.com/docs/ddi0602/latest Reviewed By: chill Differential Revision: https://reviews.llvm.org/D62518 llvm-svn: 362070
* Make CompileUnit::GetSupportFiles return a const listPavel Labath2019-05-303-11/+9
| | | | | | | | | | | | There's no reason for anyone to modify a list from outside of a symbol file (as that would break a lot of invariants that symbol files depend on). Make the function return a const FileSpecList and fix up a couple of places that were needlessly binding non-const references to the result of this function. llvm-svn: 362069
* [ARM] Add an MVE execution domainSjoerd Meijer2019-05-302-6/+8
| | | | | | | | | | | | | | | | | | | | | | MVE architecturally specifies a 'beat' system in which a vector instruction executed now will complete its actual operation over the next four cycles, so it can overlap with the execution of the previous and next MVE instruction. This makes it generally an advantage to avoid moving values back and forth between MVE registers and anywhere else, if there's any sensible way to do the same processing in whatever register type the values already occupied. That's just what the 'execution domain' system is supposed to achieve. So here we add a new execution domain which will contain all the MVE vector instructions when they are added. Patch by: Simon Tatham Differential Revision: https://reviews.llvm.org/D60703 llvm-svn: 362068
* asm goto: fix out-of-bounds read of Constraints after rC362045Fangrui Song2019-05-301-0/+1
| | | | | | | | | | | | When parsing goto labels, Names and Exprs are expanded but Constraints is not, this may cause a out-of-bounds read later in: // GCCAsmStmt::GCCAsmStmt // `constraints` has only `NumExprs - NumLabels` elements Constraints = new (C) StringLiteral*[NumExprs]; std::copy(constraints, constraints + NumExprs, Constraints); llvm-svn: 362067
* [TableGen] AsmMatcher: allow repeated input operandsSjoerd Meijer2019-05-301-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an assembly instruction has to mention an input operand name twice, for example the MVE VMOV instruction that accesses two lanes of the same vector by writing 'vmov r1, r2, q0[3], q0[1]', then the obvious way to write its AsmString is to include the same operand (here $Qd) twice. But this causes the AsmMatcher generator to omit that instruction completely from the match table, on the basis that the generator isn't clever enough to deal with the duplication. But you need to have _some_ way of dealing with an instruction like this - and in this case, where the mnemonic is shared with many other instructions that the AsmMatcher does handle, it would be very painful to take it out of the AsmMatcher system completely. A nicer way is to add a custom AsmMatchConverter routine, and let that deal with the problem if the autogenerated converter can't. But that doesn't work, because TableGen leaves the instruction out of its table _even_ if you provide a custom converter. Solution: this change, which makes TableGen relax the restriction on duplicated operands in the case where there's a custom converter. Patch by: Simon Tatham Differential Revision: https://reviews.llvm.org/D60695 llvm-svn: 362066
* [CMake] Use find_package(LLVM) instead of LLVMConfigPetr Hosek2019-05-302-10/+3
| | | | | | | | This addresses an issues introduced in r362047. Differential Revision: https://reviews.llvm.org/D62640 llvm-svn: 362065
* [TableGen] New default operand "undef_tied_input"Sjoerd Meijer2019-05-303-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a new special identifier which you can use as a default in OperandWithDefaultOps. The idea is that you use it for an input operand of an instruction that's tied to an output operand, and its semantics are that (in the default case) the input operand's value is not used at all. The detailed effect is that when instruction selection emits the instruction in the form of a pre-regalloc MachineInstr, it creates an IMPLICIT_DEF node to use as that input. If you're creating an MCInst with explicit register names, then the right handling would be to set the input operand to the same register as the output one (honouring the tie) and to add the 'undef' flag indicating that that register is deemed to acquire a new don't-care definition just before we read it. But I haven't done that in this commit, because there was no need to - no Tablegen backend seems to autogenerate default fields in an MCInst. Patch by: Simon Tatham Differential Revision: https://reviews.llvm.org/D60696 llvm-svn: 362064
* [lldb-server] Support 'g' packetsPavel Labath2019-05-309-47/+279
| | | | | | | Differential Revision: https://reviews.llvm.org/D62221 Patch by Guilherme Andrade <guiandrade@google.com>. llvm-svn: 362063
* [AST] asm goto labels don't have constraints, don't try to copy them.Benjamin Kramer2019-05-301-4/+6
| | | | | | Found by asan. llvm-svn: 362062
* [runtimes] Use _LIBCPP_HAS_COMMENT_LIB_PRAGMA in all relevant filesPetr Hosek2019-05-302-2/+2
| | | | | | These two sources were omitted in r362055. llvm-svn: 362061
* [LoopVectorize] Precommit tests for D62510. NFCCraig Topper2019-05-302-0/+61
| | | | llvm-svn: 362060
* Mark CodeGen/asm-goto.c as x86 specific after r362045Fangrui Song2019-05-301-1/+2
| | | | llvm-svn: 362059
* [libcxx][libcxxabi] Remove the unused CMake checksPetr Hosek2019-05-302-41/+1
| | | | | | | | | | | These seemed to have been used in the past but were since removed by the add_compile_flags_if_supported functions that combine these these checks and adding the flag, but the original checks were never removed. Differential Revision: https://reviews.llvm.org/D62566 llvm-svn: 362058
* [runtimes] Use -Wunknown-pragmas for the pragma checkPetr Hosek2019-05-303-0/+12
| | | | | | | This is a follow up to r362055, we need -Wunknown-pragmas otherwise the check is going to succeed it the pragma isn't supported. llvm-svn: 362057
* [LV] Inform about exactly reason of loop illegalityFlorian Hahn2019-05-303-29/+92
| | | | | | | | | | | | | | | | | | | | | | | Currently, only the following information is provided by LoopVectorizer in the case when the CF of the loop is not legal for vectorization: LV: Can't vectorize the instructions or CFG LV: Not vectorizing: Cannot prove legality. But this information is not enough for the root cause analysis; what is exactly wrong with the loop should also be printed: LV: Not vectorizing: The exiting block is not the loop latch. Patch by Pavel Samolysov. Reviewers: mkuper, hsaito, rengolin, fhahn Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D62311 llvm-svn: 362056
* [runtimes] Check if pragma comment(lib, ...) is supported firstPetr Hosek2019-05-3020-16/+56
| | | | | | | | | This fixes the issue introduced by r362048 where we always use pragma comment(lib, ...) for dependent libraries when the compiler is Clang, but older Clang versions don't support this pragma so we need to check first if it's supported before using it. llvm-svn: 362055
* Add the `objc_class_stub` attribute.John McCall2019-05-3012-47/+312
| | | | | | | | | | | | | | | | | | | | | | | | | Swift requires certain classes to be not just initialized lazily on first use, but actually allocated lazily using information that is only available at runtime. This is incompatible with ObjC class initialization, or at least not efficiently compatible, because there is no meaningful class symbol that can be put in a class-ref variable at load time. This leaves ObjC code unable to access such classes, which is undesirable. objc_class_stub says that class references should be resolved by calling a new ObjC runtime function with a pointer to a new "class stub" structure. Non-ObjC compilers (like Swift) can simply emit this structure when ObjC interop is required for a class that cannot be statically allocated, then apply this attribute to the `@interface` in the generated ObjC header for the class. This attribute can be thought of as a generalization of the existing `objc_runtime_visible` attribute which permits more efficient class resolution as well as supporting the additon of categories to the class. Subclassing these classes from ObjC is currently not allowed. Patch by Slava Pestov! llvm-svn: 362054
* [X86] Add ENQCMD instructionsPengfei Wang2019-05-3015-0/+450
| | | | | | | | | | | | For more details about these instructions, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference. Patch by Tianqing Wang (tianqing) Differential Revision: https://reviews.llvm.org/D62281 llvm-svn: 362053
* [Driver] Render target options (e.g. -fuse-init-array) for -fembed-bitcodeFangrui Song2019-05-302-0/+11
| | | | | | | | | | | | | | | | | | | | | Modern ELF platforms use -fuse-init-array to emit .init_array instead of .ctors . ld.bfd and gold --ctors-in-init-array merge .init_array and .ctors into .init_array but lld doesn't do that. If crtbegin*.o crtend*.o don't provide .ctors/.dtors, such .ctors in user object files can lead to crash (see PR42002. The first and the last elements in .ctors/.dtors are ignored - they are traditionally provided by crtbegin*.o crtend*.o). Call addClangTargetOptions() to ensure -fuse-init-array is rendered on modern ELF platforms. On Hexagon, this renders -target-feature +reserved-r19 for -ffixed-r19. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D62509 llvm-svn: 362052
* [PowerPC] Set the default PLT mode on musl to Secure PLTFangrui Song2019-05-301-1/+1
| | | | | | | | | | | | The musl libc only supports Secure PLT. Patch by A. Wilcox! Reviewed By: jhibbits Differential Revision: https://reviews.llvm.org/D59185 llvm-svn: 362051
* [Driver] -static-pie: add -z textFangrui Song2019-05-302-0/+8
| | | | | | | | | | | | | | | | | | | | | | | This matches gcc -static-pie. The intention is to prevent dynamic relocations in read-only segments. In ld.bfd and gold, -z notext is the default. If text relocations are needed: * -z notext: allow and emit DF_TEXTREL. DF_TEXTREL is not emitted if there is no text relocation. * -z text: error In lld, -z text is the default (this change is a no-op). * -z text: error on text relocations * -z notext: allow text relocations, and emit DF_TEXTREL no matter whether text relocations exist. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D62606 llvm-svn: 362050
* DWARFDebugInfoEntry: delete unused Extract() and rename FastExtract() to ↵Fangrui Song2019-05-303-172/+10
| | | | | | | | | | | | | Extract() The function Extract() is almost a duplicate of FastExtract() but is not used. Delete it and rename FastExtract() to Extract(). Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D62593 llvm-svn: 362049
* [runtimes] Support ELF dependent libraries featurePetr Hosek2019-05-3015-0/+63
| | | | | | | | | | | | | | | | | | | As of r360984, LLD supports dependent libraries feature for ELF. libunwind, libc++abi and libc++ have library dependencies: libdl librt and libpthread, which means that when libunwind and libc++ are being statically linked (using -static-libstdc++ flag), user has to manually specify -ldl -lpthread which is onerous. This change includes the lib pragma to specify the library dependencies directly in the source that uses those libraries. This doesn't make any difference when using linkers that don't support dependent libraries. However, when using LLD that has dependent libraries feature, users no longer have to manually specifying library dependencies when using static linking, linker will pick the library automatically. Differential Revision: https://reviews.llvm.org/D62090 llvm-svn: 362048
* [CMake] Set LLVM_PATH in the runtimes buildPetr Hosek2019-05-301-4/+6
| | | | | | | | | | | This avoids using llvm-config for inferring various paths within the runtimes build. We also set LLVM_INCLUDE_DIR variable that's used by these builds and move assignment of LLVM_BINARY_DIR and LLVM_LIBRARY_DIR to the same location for consistency. Differential Revision: https://reviews.llvm.org/D62637 llvm-svn: 362047
* [BitstreamWriter][NFC] Remove obsolete comment.Jan Korous2019-05-301-3/+1
| | | | | | The Abbv parameter was just a raw pointer when the comment was written. llvm-svn: 362046
* clang support gnu asm goto.Jennifer Yu2019-05-3028-148/+732
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Syntax: asm [volatile] goto ( AssemblerTemplate : : InputOperands : Clobbers : GotoLabels) https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html New llvm IR is "callbr" for inline asm goto instead "call" for inline asm For: asm goto("testl %0, %0; jne %l1;" :: "r"(cond)::label_true, loop); IR: callbr void asm sideeffect "testl $0, $0; jne ${1:l};", "r,X,X,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* blockaddress(@foo, %label_true), i8* blockaddress(@foo, %loop)) #1 to label %asm.fallthrough [label %label_true, label %loop], !srcloc !3 asm.fallthrough: Compiler need to generate: 1> a dummy constarint 'X' for each label. 2> an unique fallthrough label for each asm goto stmt " asm.fallthrough%number". Diagnostic 1> duplicate asm operand name are used in output, input and label. 2> goto out of scope. llvm-svn: 362045
* [crashlog] Add a missing call to decode.Davide Italiano2019-05-301-1/+1
| | | | | | <rdar://problem/51139357> llvm-svn: 362044
* [Commands] Remove commented out codeAlex Langford2019-05-291-4/+0
| | | | llvm-svn: 362042
* [llvm-objcopy][MachO] Print an error message on use of unsupported optionsSeiya Nuta2019-05-291-1/+37
| | | | | | | | | | | | | | | | | | | Summary: It is better to print an error message instead of silently ignoring unsupported options. As mentioned in https://reviews.llvm.org/D57045, this is not the best solution and we should print which flag is not supported at some time. Reviewers: alexshap, rupprecht, jhenderson, jakehehrlich Reviewed By: alexshap, rupprecht, jakehehrlich Subscribers: jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62578 llvm-svn: 362040
* Move the pybool logic from CMake to Python for simplicityReid Kleckner2019-05-292-4/+1
| | | | | | | This is how similar booleans are handled, and seems to work for me locally. llvm-svn: 362039
* CodeView - add static data members to global variable debug info.Amy Huang2019-05-294-32/+79
| | | | | | | | | | | | | | | | | | Summary: Add static data members to IR debug info's list of global variables so that they are emitted as S_CONSTANT records. Related to https://bugs.llvm.org/show_bug.cgi?id=41615. Reviewers: rnk Subscribers: aprantl, cfe-commits, llvm-commits, thakis Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62167 llvm-svn: 362038
OpenPOWER on IntegriCloud