summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Rename MacOS X -> macOS where applicable.Adrian Prantl2019-05-1412-31/+30
| | | | llvm-svn: 360691
* [Test] Autogen a test for ease of later changingPhilip Reames2019-05-141-28/+61
| | | | llvm-svn: 360690
* [AMDGPU] Fixed handling of imemdiate i1 literalsStanislav Mekhanoshin2019-05-142-0/+26
| | | | | | | | This bug was exposed by the rL360395. Differential Revision: https://reviews.llvm.org/D61812 llvm-svn: 360689
* [AMDGPU] Fixed +DumpCodeTim Renouf2019-05-143-12/+24
| | | | | | | | | | | | | | | | | | The +DumpCode attribute is a horrible hack in AMDGPU to embed the disassembly of the generated code into the elf file. It is used by LLPC to implement an extension that allows the application to read back the disassembly of the code. Longer term, we should re-implement that by using the LLVM disassembler from the Vulkan driver. Recent LLVM changes broke +DumpCode. With -filetype=asm it crashed, and with -filetype=obj I think it did not include any instructions, only the labels. Fixed with this commit: now it has no effect with -filetype=asm, and works as intended with -filetype=obj. Differential Revision: https://reviews.llvm.org/D60682 Change-Id: I6436d86fe2ea220d74a643a85e64753747c9366b llvm-svn: 360688
* [ARM][CMSE] Add cmse intrinsics for TT instructionsJaved Absar2019-05-141-0/+12
| | | | | | | | | Defines intrinsics cmse_TT, cmse_TTT, cmse_TTA, cmse_TTAT. No tests here as the tests are in patches that uses these. Reviewed By: Todd Snider, Dave Green Differential Revision: https://reviews.llvm.org/D59888 llvm-svn: 360687
* [AMDGPU] gfx1010 Strengthen some SMEM WAR hazard unit tests. NFC.Stanislav Mekhanoshin2019-05-141-2/+19
| | | | | | | | | Tighten conditions on SMEM WAR hazard unit tests to ensure rejection of workaround insertion where a s_waitcnt is present in dependency chain. The current workaround code already conforms to these revise tests. llvm-svn: 360686
* [LLD][ELF] Add the -z ifunc-noplt optionFangrui Song2019-05-147-3/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Mark Johnston! Summary: When the option is configured, ifunc calls do not go through the PLT; rather, they appear as regular function calls with relocations referencing the ifunc symbol, and the resolver is invoked when applying the relocation. This is intended for use in freestanding environments where text relocations are permissible and is incompatible with the -z text option. The option is motivated by ifunc usage in the FreeBSD kernel, where ifuncs are used to elide CPU feature flag bit checks in hot paths. Instead of replacing the cost of a branch with that of an indirect function call, the -z ifunc-noplt option is used to ensure that ifunc calls carry no hidden overhead relative to normal function calls. Test Plan: I added a couple of regression tests and tested the FreeBSD kernel build using the latest lld sources. To demonstrate the effects of the change, I used a micro-benchmark which results in frequent invocations of a FreeBSD kernel ifunc. The benchmark was run with and without IBRS enabled, and with and without -zifunc-noplt configured. The observed speedup is small and consistent, and is significantly larger with IBRS enabled: https://people.freebsd.org/~markj/ifunc-noplt/noibrs.txt https://people.freebsd.org/~markj/ifunc-noplt/ibrs.txt Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D61613 llvm-svn: 360685
* [X86] Disable shouldFoldConstantShiftPairToMask for scalar shifts on AMD ↵Simon Pilgrim2019-05-144-58/+132
| | | | | | | | | | | | | | targets (PR40758) D61068 handled vector shifts, this patch does the same for scalars where there are similar number of pipes for shifts as bit ops - this is true almost entirely for AMD targets where the scalar ALUs are well balanced. This combine avoids AND immediate mask which usually means we reduce encoding size. Some tests show use of (slow, scaled) LEA instead of SHL in some cases, but thats due to particular shift immediates - shift+mask generate these just as easily. Differential Revision: https://reviews.llvm.org/D61830 llvm-svn: 360684
* [AArch64][SVE2] Asm: add SQRDMLAH/SQRDMLSH instructionsCullen Rhodes2019-05-146-0/+337
| | | | | | | | | | | | | | | Summary: This patch adds support for the indexed and unpredicated vectors forms of the SQRDMLAH and SQRDMLSH instructions. The specification can be found here: https://developer.arm.com/docs/ddi0602/latest Reviewed By: rovka Differential Revision: https://reviews.llvm.org/D61515 llvm-svn: 360683
* [AArch64][SVE2] Asm: add integer multiply-add/subtract (indexed) instructionsCullen Rhodes2019-05-146-0/+264
| | | | | | | | | | | | | | | | | | | Summary: This patch adds support for the following instructions: MLA mul-add, writing addend (Zda = Zda + Zn * Zm[idx]) MLS mul-sub, writing addend (Zda = Zda + -Zn * Zm[idx]) Predicated forms of these instructions were added in SVE. The specification can be found here: https://developer.arm.com/docs/ddi0602/latest Reviewed By: rovka Differential Revision: https://reviews.llvm.org/D61514 llvm-svn: 360682
* [Sema] CodeSynthesisContext - add missing variable initialization to ↵Simon Pilgrim2019-05-141-2/+4
| | | | | | | | constructor. NFCI. SavedInNonInstantiationSFINAEContext isn't used outside of specific contexts but this fixes cppcheck and scan-build warnings. llvm-svn: 360681
* Replace lit feature keyword 'not_COFF' with 'uses_COFF'.Paul Robinson2019-05-143-5/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D61791 llvm-svn: 360680
* [ELF] --gdb-index: fix SIGSEGV when a DWARFAddressRange has invalid SectionIndexFangrui Song2019-05-142-0/+142
| | | | | | | | | | See D61891: llvm had a bug that might create invalid (DW_AT_low_pc,DW_AT_high_pc) pairs or range list entries due to missing DW_AT_addr_base. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D61889 llvm-svn: 360679
* DWARF v5: emit DW_AT_addr_base if DW_AT_low_pc references .debug_addrFangrui Song2019-05-144-8/+31
| | | | | | | | | | | | | | | | The condition !AddrPool.empty() is tested before attachRangesOrLowHighPC(), which may add an entry to AddrPool. We emit DW_AT_low_pc (DW_FORM_addrx) but may incorrectly omit DW_AT_addr_base for LineTablesOnly. This can be easily reproduced: clang -gdwarf-5 -gmlt -c a.cc Fix this by moving !AddrPool.empty() below. This was discovered while investigating an lld crash (fixed by D61889) on such object files: ld.lld --gdb-index a.o Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D61891 llvm-svn: 360678
* [PowerPC] Custom lower known CR bit spillsLei Huang2019-05-142-16/+186
| | | | | | | | | | | | | | | | | | | For known CRBit spills, CRSET/CRUNSET, it is more efficient to load and spill the known value instead of extracting the bit. eg. This sequence is currently used to spill a CRUNSET: crclr 4*cr5+lt mfocrf r3,4 rlwinm r3,r3,20,0,0 stw r3,132(r1) This patch custom lower it to: li r3,0 stw r3,132(r1) Differential Revision: https://reviews.llvm.org/D61754 llvm-svn: 360677
* [llvm-readobj] - Apply clang format. NFC.George Rimar2019-05-141-587/+564
| | | | | | I am a bit tired of the formatting issues. llvm-svn: 360676
* [APFloat] APFloat::Storage::Storage - fix use after moveSimon Pilgrim2019-05-141-3/+3
| | | | | | This was mentioned both in https://www.viva64.com/en/b/0629/ and by scan-build checks llvm-svn: 360675
* [Driver][Windows] Add dependent lib argument for profile instr generateRussell Gallop2019-05-143-4/+24
| | | | | | | | | | This is needed so lld-link can find clang_rt.profile when self hosting on Windows with PGO. Using clang-cl as a linker knows to add the library but self hosting, using -DCMAKE_LINKER=<...>/lld-link.exe doesn't. Differential Revision: https://reviews.llvm.org/D61742 llvm-svn: 360674
* [libc++] [test] Use std::nextafter() instead of std::nexttoward()Michal Gorny2019-05-141-2/+2
| | | | | | | | | | | | Use std::nextafter() instead of std::nexttoward() in midpoint tests. In the context of this test, this should not cause any difference. Since nexttowardl() is not implemented on NetBSD 8, the latter function combined with 'long double' type caused test failure. nextafterl() does not have this problem. Differential Revision: https://reviews.llvm.org/D61748 llvm-svn: 360673
* [lit][tests]Add feature libcxx-used and use it in llvm-*-fuzzer testsXing Xue2019-05-145-0/+13
| | | | | | | | | | | | | | | | When a LLVM binary such as llvm-*-fuzzer is built with libc++, it has dependency on libc++. The path to find shared libraries specified in llvm-*-fuzzer is relative. As a result, these binaries cannot be copied to an arbitrary directory and launched from there. Changes in this patch add a LIT feature to indicate that libc++ is used to build and, based on the feature exclude test cases that test by copying llvm-*-fuzzer binaries to a directory. Reviewers: hubert.reinterpretcast, dberris, amyk, jasonliu, EricWF Reviewed By: hubert.reinterpretcast, amyk Subscribers: javed.absar, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61265 llvm-svn: 360672
* Save the induction binary operator in IVDescriptors for non FP induction ↵Kit Barton2019-05-144-3/+115
| | | | | | | | | | | | | | | | | | | | | | | | | variables. Summary: Currently InductionBinOps are only saved for FP induction variables, the PR extends it with non FP induction variable, so user of IVDescriptors can query the InductionBinOps for integer induction variables. The changes in hasUnsafeAlgebra() and getUnsafeAlgebraInst() are required for the existing LIT test cases to pass. As described in the comment of the two functions, one of the requirement to return true is it is a FP induction variable. The checks was not needed because InductionBinOp was not set on non FP cases before. https://reviews.llvm.org/D60565 depends on the patch. Committed on behalf of @Whitney (Whitney Tsang). Reviewers: jdoerfert, kbarton, fhahn, hfinkel, dmgreen, Meinersbur Reviewed By: jdoerfert Subscribers: mgorny, hiraditya, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61329 llvm-svn: 360671
* TableGen: support #ifndef in addition to #ifdef.Tim Northover2019-05-146-7/+33
| | | | | | | TableGen has a limited preprocessor, which only really supports easier. llvm-svn: 360670
* DWARF/NFC: Centralize DIERef conversionsPavel Labath2019-05-143-40/+24
| | | | | | | | | | | | | apple and manual indexing code were creating a DIERef in a bunch of places. Though the code itself is not much, it is also easy to simplify by factoring out the DIERef creation. In HashedNameToDIE I create a conversion operator from DIEInfo to DIERef, and in ManualDWARFIndex I just create the DIERef in a global variable up-front. This also reduces the diff in follow-up patches which change how DIERefs are constructed. llvm-svn: 360669
* Make getObjCEncodingForTypeImpl() take a bitmask instead of 8 boolsNico Weber2019-05-142-115/+122
| | | | | | | | | | | Slightly easier to read, uses slightly less stack space, and makes it impossible to mix up the order of all those bools. No behavior change. Differential Revision: https://reviews.llvm.org/D61788 llvm-svn: 360668
* Add a new language mode for C2x; enable [[attribute]] support by default in C2x.Aaron Ballman2019-05-1411-17/+37
| | | | llvm-svn: 360667
* Move SymbolTable::addFile to InputFiles.cpp.Rui Ueyama2019-05-145-86/+95
| | | | | | | | | | | | | | | | | The symbol table used to be a container of vectors of input files, but that's no longer the case because the vectors are moved out of SymbolTable and are now global variables. Therefore, addFile doesn't have to belong to any class. This patch moves the function out of the class. This patch is a preparation for my RFC [1]. [1] http://lists.llvm.org/pipermail/llvm-dev/2019-April/131902.html Differential Revision: https://reviews.llvm.org/D61854 llvm-svn: 360666
* Reinstate "FileCheck [5/12]: Introduce regular numeric variables"Thomas Preud'homme2019-05-1411-152/+803
| | | | | | | | | | | | | | | | | | | | | | | This reinstates r360578 (git e47362c1ec1ea31b626336cc05822035601c3e57), reverted in r360653 (git 004393681c25e34e921adccc69ae6378090dee54), with a fix for the list added in FileCheck.rst to build without error. Copyright: - Linaro (changes up to diff 183612 of revision D55940) - GraphCore (changes in later versions of revision D55940 and in new revision created off D55940) Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield Tags: #llvm Differential Revision: https://reviews.llvm.org/D60385 llvm-svn: 360665
* [X86] X86TargetLowering::LowerINTRINSIC_WO_CHAIN - ensure rounding control ↵Simon Pilgrim2019-05-141-7/+7
| | | | | | | | is initialized. NFCI. Fixes scan-build warnings llvm-svn: 360664
* AArch64: support binutils-like things on arm64_32.Tim Northover2019-05-1420-22/+162
| | | | | | | | This adds support for the arm64_32 watchOS ABI to LLVM's low level tools, teaching them about the specific MachO choices and constants needed to disassemble things. llvm-svn: 360663
* GlobalOpt: do not promote globals used atomically to constants.Tim Northover2019-05-142-2/+16
| | | | | | | | | | Some atomic loads are implemented as cmpxchg (particularly if large or floating), and that usually requires write access to the memory involved or it will segfault. We can still propagate the constant value to users we understand though. llvm-svn: 360662
* [llvm-objcopy] Cache gnu_debuglink's target CRCJames Henderson2019-05-145-20/+30
| | | | | | | | | | | | | | | | | | | | | | .gnu_debuglink section contains information regarding file with debugging symbols, identified by its CRC32. This target file is not intended to ever change or it would invalidate the stored checksum, yet the checksum is calculated over and over again for each of the objects inside the archive, usually hundreds of times. This patch precomputes the CRC32 of the target once and then reuses the value where required, saving lots of redundant I/O. The error message reported should stay the same, although now it might be reported earlier. Reviewed by: jhenderson, jakehehrlich, MaskRay Differential Revision: https://reviews.llvm.org/D61343 Patch by Michal Janiszewski llvm-svn: 360661
* [test]Make test work on WindowsJames Henderson2019-05-141-2/+1
| | | | | | | | | | | | | Previously, the test didn't work because '\' characters appeared in the sed string, causing bogus escape characters to form in the substituted string literal. Switching to using '%/p' causes the path to be emitted with '/' characters instead, so that there are are no escaping issues. Reviewed by: kzhuravl, grimar Differential Revision: https://reviews.llvm.org/D61856 llvm-svn: 360660
* [MemorySanitizer] getMMXVectorTy - assert valid element size. NFCI.Simon Pilgrim2019-05-141-0/+2
| | | | | | Fixes scan-build warnings llvm-svn: 360658
* Revert r360637 "PR41817: Fix regression in r359260 that caused the MS ↵Hans Wennborg2019-05-142-46/+6
| | | | | | | | | | | | compatibility" > extension allowing a "static" declaration to follow an "extern" > declaration to stop working. It introduced asserts for some "static-following-extern" cases, breaking the Chromium build. See the cfe-commits thread for reproducer. llvm-svn: 360657
* [IRTranslator] Don't hardcode GEP index typeDiana Picus2019-05-142-2/+25
| | | | | | | | | | | | | | | | | | When breaking up loads and stores of aggregates, the IRTranslator uses LLT::scalar(64) for the index type of the G_GEP instructions that compute the addresses. This is unnecessarily large for 32-bit targets. Use the int ptr type provided by the DataLayout instead. Note that we're already doing the right thing when translating getelementptr instructions from the IR. This is just an oversight when generating new ones while translating loads/stores. Both x86 and AArch64 already have tests confirming that the old behaviour is preserved for 64-bit targets. Differential Revision: https://reviews.llvm.org/D61852 llvm-svn: 360656
* TestMinidumpNew.py: Use yaml2obj where possiblePavel Labath2019-05-1410-79/+147
| | | | | | | | | Replace checked-in minidumps with their yaml forms now that yaml2obj supports the ThreadList stream. I delete the test_modules_in_mini_dump test altogether as this functionality is covered more systematically in TestMinidumpUUID.py. llvm-svn: 360655
* typedef enum -> enumFangrui Song2019-05-1448-202/+172
| | | | | | | | Reviewed By: labath Differential Revision: https://reviews.llvm.org/D61883 llvm-svn: 360654
* Revert "FileCheck [5/12]: Introduce regular numeric variables"Thomas Preud'homme2019-05-1411-803/+152
| | | | | | | | This reverts r360578 (git e47362c1ec1ea31b626336cc05822035601c3e57) to solve the sphinx build failure on http://lab.llvm.org:8011/builders/llvm-sphinx-docs buildbot. llvm-svn: 360653
* [CMake] Correctly reinstate LLDB_CAN_USE_LLDB_SERVERPavel Labath2019-05-141-2/+2
| | | | | | | | | | | | | | | | | r360631 introduced a "syntax error" which meant that cmake was still not honoring the value of LLDB_CAN_USE_LLDB_SERVER variable. The correct syntax for seting an internal cache variable is "set(VAR value CACHE INTERNAL)", but the patch omitted the "CACHE" keyword. The "syntax error" is in quotes because without the CACHE keyword this is still valid syntax for setting the value of LLDB_CAN_USE_LLDB_SERVER to "1 INTERNAL". There doesn't seem to be a need for this to be a cache variable so I'm reverting this variable to a plain one, as it was before r360621. This will hopefully fix the windows build. llvm-svn: 360652
* Add guidelines/recommendations for organizers of LLVM SocialsAlex Denisov2019-05-142-0/+97
| | | | | | Differential Revision: https://reviews.llvm.org/D61550 llvm-svn: 360651
* [X86] Prefer locked stack op over mfence for seq_cst 64-bit stores on 32-bit ↵Philip Reames2019-05-143-5/+6
| | | | | | | | | | targets This is a follow on to D58632, with the same logic. Given a memory operation which needs ordering, but doesn't need to modify any particular address, prefer to use a locked stack op over an mfence. Differential Revision: https://reviews.llvm.org/D61863 llvm-svn: 360649
* [Object] Change ObjectFile::getSectionContents to return ↵Fangrui Song2019-05-1417-59/+58
| | | | | | | | | | | | | | | | | | | Expected<ArrayRef<uint8_t>> Change std::error_code getSectionContents(DataRefImpl, StringRef &) const; to Expected<ArrayRef<uint8_t>> getSectionContents(DataRefImpl) const; Many object formats use ArrayRef<uint8_t> as the underlying type, which is generally better than StringRef to represent binary data, so change the type to decrease the number of type conversions. Reviewed By: ruiu, sbc100 Differential Revision: https://reviews.llvm.org/D61781 llvm-svn: 360648
* gn build: add Hexagon targetDavid L. Jones2019-05-146-0/+248
| | | | | | Differential Revision: https://reviews.llvm.org/D61819 llvm-svn: 360647
* ARMDefines.h: fix -Wimplicit-fallthrough in -DLLVM_ENABLE_ASSERTIONS=OFF buildsFangrui Song2019-05-141-2/+3
| | | | | | | | Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D61844 llvm-svn: 360646
* gn build: add Sparc targetDavid L. Jones2019-05-146-0/+192
| | | | llvm-svn: 360645
* gn build: add Lanai targetDavid L. Jones2019-05-146-0/+190
| | | | llvm-svn: 360644
* [PowerPC][NFC] Fix typos in triplesJinsong Ji2019-05-144-7/+7
| | | | | | Found by bzEq (Kai Luo). llvm-svn: 360643
* [X86] Use X86 instead of X32 as a check prefix in atomic-idempotent.ll. NFCCraig Topper2019-05-141-149/+145
| | | | | | | | | | X32 can refer to a 64-bit ABI that uses 32-bit ints, longs, and pointers. I plan to add gnux32 command lines to this test so this prepares for that. Also remove some check lines that have a prefix that is not in any run lines. llvm-svn: 360642
* LLDB website: Change the title back to "The LLDB Debugger"Adrian Prantl2019-05-142-4/+9
| | | | | | This is what the old homepage also used. llvm-svn: 360641
* [SDAG] fix unused variable warning and unneeded indirection; NFCSanjay Patel2019-05-142-3/+3
| | | | llvm-svn: 360640
OpenPOWER on IntegriCloud