summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-exegesis] Fix compilation before c++17.Clement Courbet2019-03-221-1/+1
| | | | | | | ClusteringTest.cpp:25:23: error: constexpr variable cannot have non-literal type 'const llvm::exegesis::(anonymous namespace)::(lambda at /home/buildslave/ps4-buildslave4/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/unittests/tools/llvm-exegesis/ClusteringTest.cpp:25:35)' static constexpr auto HasPoints = [](const std::vector<int> &Indices) { llvm-svn: 356748
* [llvm-exegesis] Add clustering test.Clement Courbet2019-03-221-5/+37
| | | | | | | | | | | | Summary: To show that dbscan is insensitive to the order of the points. Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59693 llvm-svn: 356747
* [llvm-objcopy]Add coverage for --split-dwo and --output-formatJames Henderson2019-03-221-17/+37
| | | | | | | | | | | | Also fix up a couple of minor issues in the test being updated, where FileCheck could match on incorrect output and fix the test case order to match the struct order. Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D59691 llvm-svn: 356746
* Revert r356738 "[llvm-objcopy] - Implement replaceSectionReferences for ↵George Rimar2019-03-224-81/+0
| | | | | | | | | GroupSection class." Seems this broke ubsan bot: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/11760 llvm-svn: 356745
* [RISCV] Add basic RV32E definitions and MC layer supportAlex Bradbury2019-03-2216-15/+333
| | | | | | | | | | | | | | | | | | | | | The RISC-V ISA defines RV32E as an alternative "base" instruction set encoding, that differs from RV32I by having only 16 rather than 32 registers. This patch adds basic definitions for RV32E as well as MC layer support (assembling, disassembling) and tests. The only supported ABI on RV32E is ILP32E. Add a new RISCVFeatures::validate() helper to RISCVUtils which can be called from codegen or MC layer libraries to validate the combination of TargetTriple and FeatureBitSet. Other targets have similar checks (e.g. erroring if SPE is enabled on PPC64 or oddspreg + o32 ABI on Mips), but they either duplicate the checks (Mips), or fail to check for both codegen and MC codepaths (PPC). Codegen for the ILP32E ABI support and RV32E codegen are left for a future patch/patches. Differential Revision: https://reviews.llvm.org/D59470 llvm-svn: 356744
* [Tooling] Avoid working-dir races in AllTUsToolExecutorIlya Biryukov2019-03-221-14/+7
| | | | | | | | | | | | | | Reviewers: ioeric Reviewed By: ioeric Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59683 llvm-svn: 356743
* [ARM] Add Cortex-M35P SupportLuke Cheeseman2019-03-221-2/+4
| | | | | | | | - Add clang frontend testing for Cortex-M35P Differential Revision: https://reviews.llvm.org/D57765 llvm-svn: 356742
* [RISCV] Optimize emission of SELECT sequencesAlex Bradbury2019-03-224-417/+804
| | | | | | | | | | | | | | | | | | | This patch optimizes the emission of a sequence of SELECTs with the same condition, avoiding the insertion of unnecessary control flow. Such a sequence often occurs when a SELECT of values wider than XLEN is legalized into two SELECTs with legal types. We have identified several use cases where the SELECTs could be interleaved with other instructions. Therefore, we extend the sequence to include non-SELECT instructions if we are able to detect that the non-SELECT instructions do not impact the optimization. This patch supersedes https://reviews.llvm.org/D59096, which attempted to address this issue by introducing a new SelectionDAG node. Hat tip to Eli Friedman for his feedback on how to best handle this issue. Differential Revision: https://reviews.llvm.org/D59355 Patch by Luís Marques. llvm-svn: 356741
* [RISCV] Allow conversion of CC logic to bitwise logicAlex Bradbury2019-03-222-0/+134
| | | | | | | | | | | | | Indicates in the TargetLowering interface that conversions from CC logic to bitwise logic are allowed. Adds tests that show the benefit when optimization opportunities are detected. Also adds tests that show that when the optimization is not applied correct code is generated (but opportunities for other optimizations remain). Differential Revision: https://reviews.llvm.org/D59596 Patch by Luís Marques. llvm-svn: 356740
* [llvm-objcopy] - Fix a st_name of the first symbol table entry.George Rimar2019-03-222-0/+54
| | | | | | | | | | | | | | | | | | | | Spec says about the first symbol table entry that index 0 both designates the first entry in the table and serves as the undefined symbol index. It should have zero value. Hence the first symbol table entry has no name. And so has to have a st_name == 0. (http://refspecs.linuxbase.org/elf/gabi4+/ch4.symtab.html) Currently, we do not emit zero value for the first symbol table entry. That happens because we add empty strings to the string builder, which for each such case adds a zero byte: (https://github.com/llvm-mirror/llvm/blob/master/lib/MC/StringTableBuilder.cpp#L185) After the string optimization performed it might return non zero indexes for the empty string requested. The patch fixes this issue for the case above and other sections with no names. Differential revision: https://reviews.llvm.org/D59496 llvm-svn: 356739
* [llvm-objcopy] - Implement replaceSectionReferences for GroupSection class.George Rimar2019-03-224-0/+81
| | | | | | | | | | | | Currently, llvm-objcopy incorrectly handles compression and decompression of the sections from COMDAT groups, because we do not implement the replaceSectionReferences for this type of the sections. The patch does that. Differential revision: https://reviews.llvm.org/D59638 llvm-svn: 356738
* [llvm-objcopy]Add support for *-freebsd output formatsJames Henderson2019-03-225-22/+46
| | | | | | | | | | | | | | GNU objcopy can support output formats like elf32-i386-freebsd and elf64-x86-64-freebsd. The only difference from their regular non-freebsd counterparts that I have observed is that the freebsd versions set the OS/ABI field to ELFOSABI_FREEBSD. This patch sets the OS/ABI field according based on the format whenever --output-format is specified. Reviewed by: rupprecht, grimar Differential Revision: https://reviews.llvm.org/D59645 llvm-svn: 356737
* [RISCV][NFC] Add test case to MC/RISCV/linker-relaxation.s showing incorrect ↵Alex Bradbury2019-03-221-12/+28
| | | | | | | | relocations being emitted A follow-up patch will fix this case. llvm-svn: 356736
* [AMDGPU] Added v5i32 and v5f32 register classesTim Renouf2019-03-2212-4/+221
| | | | | | | | | | They are not used by anything yet, but a subsequent commit will start using them for image ops that return 5 dwords. Differential Revision: https://reviews.llvm.org/D58903 Change-Id: I63e1904081e39a6d66e4eb96d51df25ad399d271 llvm-svn: 356735
* [RISCV][NFC] Expand test/MC/RISCV/linker-relaxation.s testsAlex Bradbury2019-03-221-5/+62
| | | | | | | | | | Add more complete CHECK lines for the relocations generated when relaxation is enabled, and add cases where a locally defined symbol is referenced. Two instances of pcrel_lo(defined_symbol) are commented out, as they will produce an error. A follow-up patch will fix this. llvm-svn: 356734
* [X86] Add 32-bit command lines with and without SSE2 to ↵Craig Topper2019-03-221-79/+432
| | | | | | atomic-non-integer.ll. NFC llvm-svn: 356733
* [BPF] fix flaky btf unit test static-var-derived-type.llYonghong Song2019-03-221-66/+39
| | | | | | | | | | | | | | | | | The DataSecEentries is defined as an unordered_map since order does not really matter. std::unordered_map<std::string, std::unique_ptr<BTFKindDataSec>> DataSecEntries; This seems causing the test static-var-derived-type.ll flaky as two sections ".bss" and ".readonly" have undeterministic ordering when performing map iterating, which decides the output assembly code sequence of BTF_KIND_DATASEC entries. Fix the test to have only one data section to remove flakiness. Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 356731
* [DWARF] Refactor RelocVisitor and fix computation of SHT_RELA-typed ↵Fangrui Song2019-03-221-2/+24
| | | | | | | | | | | | | | | | | | relocation entries Summary: This is the lld-side change of D57939 Reviewers: echristo, dblaikie, ruiu, espindola Reviewed By: echristo, ruiu Subscribers: jdoerfert, emaste, arichardson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57940 llvm-svn: 356730
* [DWARF] Refactor RelocVisitor and fix computation of SHT_RELA-typed ↵Fangrui Song2019-03-228-376/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | relocation entries Summary: getRelocatedValue may compute incorrect value for SHT_RELA-typed relocation entries. // DWARFDataExtractor.cpp uint64_t DWARFDataExtractor::getRelocatedValue(uint32_t Size, uint32_t *Off, ... // This formula is correct for REL, but may be incorrect for RELA if the value // stored in the location (getUnsigned(Off, Size)) is not zero. return getUnsigned(Off, Size) + Rel->Value; In this patch, we * refactor these visit* functions to include a new parameter `uint64_t A`. Since these visit* functions are no longer used as visitors, rename them to resolve*. + REL: A is used as the addend. A is the value stored in the location where the relocation applies: getUnsigned(Off, Size) + RELA: The addend encoded in RelocationRef is used, e.g. getELFAddend(R) * and add another set of supports* functions to check if a given relocation type is handled. DWARFObjInMemory uses them to fail early. Reviewers: echristo, dblaikie Reviewed By: echristo Subscribers: mgorny, aprantl, aheejin, fedor.sergeev, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57939 llvm-svn: 356729
* [NFC][TSan][libdispatch] Don't use ignore_noninstrumented_modules on LinuxJulian Lettner2019-03-221-3/+0
| | | | llvm-svn: 356728
* [BPF] handle derived type properly for computing type idYonghong Song2019-03-2210-15/+206
| | | | | | | | | | | | | | | | | | Currently, the type id for a derived type is computed incorrectly. For example, type #1: int type #2: ptr to #1 For a global variable "int *a", type #1 will be attributed to variable "a". This is due to a bug which assigns the type id of the basetype of that derived type as the derived type's type id. This happens to "const", "volatile", "restrict", "typedef" and "pointer" types. This patch fixed this bug, fixed existing test cases and added a new one focusing on pointers plus other derived types. Signed-off-by: Yonghong Song <yhs@fb.com> llvm-svn: 356727
* Fix a vector test to not use a local type as a template parameter. This ↵Marshall Clow2019-03-221-7/+9
| | | | | | causes a warning on C++03. NFC llvm-svn: 356726
* [Reproducers] Fix log statementsJonas Devlieghere2019-03-211-3/+3
| | | | | | This isn't python where you can omit the index inside `{}`. llvm-svn: 356725
* This test assumes that -rtlib defaults to libgcc. But that isn't true in the ↵Sterling Augustine2019-03-211-7/+0
| | | | | | | | | | | | face of -DCLANG_DEFAULT_RTLIB=compiler-rt. Subscribers: dberris, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59674 llvm-svn: 356724
* [X86] Autogenerate complete checks. NFCCraig Topper2019-03-211-5/+44
| | | | llvm-svn: 356723
* [AArch64] Split the neon.addp intrinsic into integer and fp variants.Amara Emerson2019-03-2113-78/+47
| | | | | | | | | | | | | | | | | | | This is the result of discussions on the list about how to deal with intrinsics which require codegen to disambiguate them via only the integer/fp overloads. It causes problems for GlobalISel as some of that information is lost during translation, while with other operations like IR instructions the information is encoded into the instruction opcode. This patch changes clang to emit the new faddp intrinsic if the vector operands to the builtin have FP element types. LLVM IR AutoUpgrade has been taught to upgrade existing calls to aarch64.neon.addp with fp vector arguments, and we remove the workarounds introduced for GlobalISel in r355865. This is a more permanent solution to PR40968. Differential Revision: https://reviews.llvm.org/D59655 llvm-svn: 356722
* [X86] Use LoadInst->getType() instead of ↵Craig Topper2019-03-211-3/+2
| | | | | | | | LoadInst->getPointerOperandType()->getElementType(). NFCI For the future day when the pointer's don't have element types, we shoudl just use the type of the load result instead. llvm-svn: 356721
* [InstSimplify] Add tests for signed icmp of and/or; NFCNikita Popov2019-03-211-6/+150
| | | | | | | Even if a signed predicate is used, the ranges computed for and/or are unsigned, resulting in missed simplifications. llvm-svn: 356720
* [libc++] Remove too-stringent XFAILs for file_clock testsLouis Dionne2019-03-213-4/+0
| | | | | | | Those tests actually pass because we don't use anything that's marked as unavailable. llvm-svn: 356719
* [Object] Fix reading objects created with -fembed-bitcode-markerSteven Wu2019-03-214-0/+14
| | | | | | | | | | | | | | | | | | | | | Currently, this fails with many tools, e.g. $ clang -fembed-bitcode-marker -c -o test.o test.c $ nm test.o nm: test.o The file was not recognized as a valid object file -fembed-bitcode-marker creates a LLVM,bitcode section consisting of a single byte. When reading the object file, IRObjectFile::findBitcodeInObject succeeds, causing SymbolicFile::createSymbolicFile to try to read the "bitcode" rather than using the outer Mach-O data - when then fails. Fix this by making findBitcodeInObject return an error if the section size <= 1. Patched by: Nicholas Allegra Differential Revision: https://reviews.llvm.org/D44373 llvm-svn: 356718
* Mips: Fix typo in assert messageMatt Arsenault2019-03-211-1/+1
| | | | llvm-svn: 356717
* Mips: Don't create copy of nothingMatt Arsenault2019-03-214-119/+86
| | | | | | | | | This was creating a copy of the register the pseudo itself was def'ing, leaving a copy of an undefined register. I'm not sure how the verifier is not catching this, but this avoids asserting in a future change to RegAllocFast llvm-svn: 356716
* [OPENMP]Fix a warning about unused variable, NFC.Alexey Bataev2019-03-211-0/+1
| | | | llvm-svn: 356715
* GlobalISel: Fix RegBankSelect for REG_SEQUENCEMatt Arsenault2019-03-213-11/+160
| | | | | | | | | | | | | The AArch64 test was broken since the result register already had a set register class, so this test was a no-op. The mapping verify call would fail because the result size is not the same as the inputs like in a copy or phi. The AMDGPU testcases are half broken and introduce illegal VGPR->SGPR copies which need much more work to handle correctly (same for phis), but add them as a baseline. llvm-svn: 356713
* Improve the diagnostic for #include_next occurring in a file not foundRichard Smith2019-03-216-2/+40
| | | | | | | | | | | in the include path. Instead of making the incorrect claim that the included file has an absolute path, describe the actual problem: the including file was found either by absolute path, or relative to such a file, or relative to the primary source file. llvm-svn: 356712
* Makefile.rules: Normalize use of trailing slashes in path variables.Adrian Prantl2019-03-211-4/+4
| | | | llvm-svn: 356711
* [OPENMP] Simplify codegen for allocate directive on local variables.Alexey Bataev2019-03-214-57/+72
| | | | | | | Simplified codegen for the allocate directive for local variables, initial implementation of the codegen for NVPTX target. llvm-svn: 356710
* [X86] Correct the value of MaxAtomicInlineWidth for pre-586 cpusCraig Topper2019-03-218-25/+94
| | | | | | | | | | Use the new cx8 feature flag that was added to the backend to represent support for cmpxchg8b. Use this flag to set the MaxAtomicInlineWidth. This also assumes all the cmpxchg instructions are enabled for CK_Generic which is what cc1 defaults to when nothing is specified. Differential Revision: https://reviews.llvm.org/D59566 llvm-svn: 356709
* Don't add a tail keyword to calls to ObjC runtime functions if the callsAkira Hatanaka2019-03-212-2/+6
| | | | | | | | | | | | are annotated with notail. r356705 annotated calls to objc_retainAutoreleasedReturnValue with notail on x86-64. This commit teaches ARC optimizer to check the notail marker on the call before turning it into a tail call. rdar://problem/38675807 llvm-svn: 356707
* [Driver] Pass -malign-double from the driver to the cc1 command lineCraig Topper2019-03-212-0/+6
| | | | | | | | | | -malign-double is currently only implemented in the -cc1 interface. But its declared in Options.td so it is a driver option too. But you try to use it with the driver you'll get a message about the option being unused. This patch teaches the driver to pass the option through to cc1 so it won't be unused. The Options.td says the option is x86 only but I didn't see any x86 specific code in its impementation in cc1 so not sure if the documentation is wrong or if I should only pass this option through the driver on x86 targets. Differential Revision: https://reviews.llvm.org/D59624 llvm-svn: 356706
* [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValueAkira Hatanaka2019-03-2119-71/+88
| | | | | | | | | | | | | with notail on x86-64. On x86-64, the epilogue code inserted before the tail jump blocks the autoreleased return optimization. rdar://problem/38675807 Differential Revision: https://reviews.llvm.org/D59656 llvm-svn: 356705
* Refactor handling of #include directives to cleanly separate theRichard Smith2019-03-211-33/+49
| | | | | | | "skipped header because it should be imported as a module" cases from the "skipped header because of some other reason" cases. llvm-svn: 356704
* [lldb] Add missing EINTR handlingMichal Gorny2019-03-2115-26/+52
| | | | | | Differential Revision: https://reviews.llvm.org/D59606 llvm-svn: 356703
* [OPENMP]Codegen support for allocate directive on global variables.Alexey Bataev2019-03-216-0/+138
| | | | | | | | | For the global variables the allocate directive must specify only the predefined allocator. This allocator must be translated into the correct form of the address space for the targets that support different address spaces. llvm-svn: 356702
* Enable `asan/TestCases/Posix/start-deactivated.cc` test for iOS.Dan Liew2019-03-212-2/+1
| | | | | | | | | | | | | | | | | | | Summary: To make this test pass it was necesary to change `iossim_run.py` to propagate the `ASAN_ACTIVATION_OPTIONS` environment variable into the testing environment. rdar://problem/49114807 Reviewers: kubamracek, yln, serge-sans-paille Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D59660 llvm-svn: 356701
* [clang][OpenMP] Fix another test when using libgomp.Jordan Rupprecht2019-03-211-2/+2
| | | | | | Similarly to r356614, -fopenmp=libomp needs to be used for some omp-related AST matching. llvm-svn: 356700
* [OPENMP]Simplify the check for the predefined allocators, NFC.Alexey Bataev2019-03-211-39/+7
| | | | | | | | Previously implemented check required the reevaluation of the already evaluated predefined allocator kind for the global variables. Patch simplifies this evaluation and removes extra code. llvm-svn: 356699
* [AArch64] Update for ExynosEvandro Menezes2019-03-212-6/+6
| | | | | | Fix the feature set for Exynos M4 by removing support for `+fp16fml` and fix test case. llvm-svn: 356698
* [llvm-objdump] Support arg grouping for -j and -M (e.g. llvm-objdump -sj.foo ↵Jordan Rupprecht2019-03-213-6/+42
| | | | | | | | | | | | | | | | | | | | | | | -dMreg-names-raw) Summary: r354375 added support for most objdump groupings, but didn't add support for -j|--sections, because that wasn't possible. r354870 added --disassembler options, but grouping still wasn't available. r355185 supported values for grouped options. This just puts the three of them together. This supports -j in modes like `-s -j .foo`, `-sj .foo`, `-sj=.foo`, or `-sj.foo`, and similar for `-M`. Reviewers: ormris, jhenderson, ikudrin Reviewed By: jhenderson, ikudrin Subscribers: javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59618 llvm-svn: 356697
* [X86] canonicalizeBitSelect - don't attempt to canonicalize mask registersSimon Pilgrim2019-03-212-1/+83
| | | | | | | | We don't use X86ISD::ANDNP for mask registers. Test case from @craig.topper (Craig Topper) llvm-svn: 356696
OpenPOWER on IntegriCloud