summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ObjC][ARC] Upgrade calls to ARC runtime functions to intrinsic calls ifAkira Hatanaka2019-08-087-16/+150
| | | | | | | | | | | | | | | | | | | | | the bitcode has the arm64 retainAutoreleasedReturnValue marker The ARC middle-end passes stopped optimizing or transforming bitcode that has been compiled with old compilers after we started emitting calls to ARC runtime functions as intrinsic calls instead of normal function calls in the front-end and made changes to teach the ARC middle-end passes about those intrinsics (see r349534). This patch converts calls to ARC runtime functions that are not intrinsic functions to intrinsic function calls if the bitcode has the arm64 retainAutoreleasedReturnValue marker. Checking for the presence of the marker is necessary to make sure we aren't changing ARC function calls that were originally MRR message sends (see r349952). rdar://problem/53280660 Differential Revision: https://reviews.llvm.org/D65902 llvm-svn: 368311
* [lld][WebAssembly] Add optional symbols after input file handlingSam Clegg2019-08-086-24/+35
| | | | | | | | | | | | | | This allows undefined references in input files be resolved by the optional symbols. Previously we were doing this before input file reading which means it was working only for command line symbols references (i.e. -u or --export). Also use addOptionalDataSymbol for __dso_handle and make all optional symbols hidden by default. Differential Revision: https://reviews.llvm.org/D65920 llvm-svn: 368310
* [lldb][NFC] Simplify return in MaybeHandleVariableRaphael Isemann2019-08-081-9/+4
| | | | | | This function anyway returns true, no need to do this extra work. llvm-svn: 368309
* [X86] XFormVExtractWithShuffleIntoLoad - handle shuffle mask scalingSimon Pilgrim2019-08-082-16/+29
| | | | | | | | If the target shuffle mask is from a wider type, attempt to scale the mask so that the extraction can attempt to peek through. Fixes the regression mentioned in rL368307 llvm-svn: 368308
* [X86] SimplifyDemandedVectorElts - attempt to recombine target shuffle using ↵Simon Pilgrim2019-08-086-228/+248
| | | | | | | | | | | | DemandedElts mask If we don't demand all elements, then attempt to combine to a simpler shuffle. At the moment we can only do this if Depth == 0 as combineX86ShufflesRecursively uses Depth to track whether the shuffle has really changed or not - we'll need to change this before we can properly start merging combineX86ShufflesRecursively into SimplifyDemandedVectorElts. The insertps-combine.ll regression is because XFormVExtractWithShuffleIntoLoad can't see through shuffles of different widths - this will be fixed in a follow-up commit. llvm-svn: 368307
* Enable assembly output of local commons for AIXDavid Tenty2019-08-0810-8/+66
| | | | | | | | | | | | | | | | | | | | | Summary: This patch enable assembly output of local commons for AIX using .lcomm directives. Adds a EmitXCOFFLocalCommonSymbol to MCStreamer so we can emit the AIX version of .lcomm assembly directives which include a csect name. Handle the case of BSS locals in PPCAIXAsmPrinter by using EmitXCOFFLocalCommonSymbol. Adds a test for generating .lcomm on AIX Targets. Reviewers: cebowleratibm, hubert.reinterpretcast, Xiangling_L, jasonliu, sfertile Reviewed By: sfertile Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64825 llvm-svn: 368306
* [ARM] Add support for MVE pre and post inc loads and storesDavid Green2019-08-087-275/+423
| | | | | | | | | | | | This adds pre- and post- increment and decrements for MVE loads and stores. It uses the builtin pre and post load/store detection, unlike Neon. Loads are selected with the code in tryT2IndexedLoad, stores are selected with tablegen patterns. The immediates have a +/-7bit range, multiplied by the size of the element. Differential Revision: https://reviews.llvm.org/D63840 llvm-svn: 368305
* [ARM] MVE big endian loads/storesDavid Green2019-08-086-222/+396
| | | | | | | | | | | This adds some missing patterns for big endian loads/stores, allowing unaligned loads/stores to also be selected with an extra VREV, which produces better code than aligning through a stack. Also moves VLDR_P0 to not be LE only, and adjusts some of the tests to show all that working. Differential Revision: https://reviews.llvm.org/D65583 llvm-svn: 368304
* [RISCV] Allow ABI Names in Inline Assembly ConstraintsSam Elliott2019-08-086-34/+4746
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Clang will replace references to registers using ABI names in inline assembly constraints with references to architecture names, but other frontends do not. LLVM uses the regular assembly parser to parse inline asm, so inline assembly strings can contain references to registers using their ABI names. This patch adds support for parsing constraints using either the ABI name or the architectural register name. This means we do not need to implement the ABI name replacement code in every single frontend, especially those like Rust which are a very thin shim on top of LLVM IR's inline asm, and that constraints can more closely match the assembly strings they refer to. Reviewers: asb, simoncook Reviewed By: simoncook Subscribers: hiraditya, rbar, johnrusso, JDevlieghere, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65947 llvm-svn: 368303
* [pstl] Remove stray semicolonLouis Dionne2019-08-081-1/+1
| | | | llvm-svn: 368302
* [FIX][NFC] Update clang sema testDiogo N. Sampaio2019-08-081-1/+1
| | | | | | | | Try to fix Sema test for default alignment for when compiling to ARM, but not to android, due r9427aa2d543b llvm-svn: 368301
* [RISCV] Minimal stack realignment supportSam Elliott2019-08-083-2/+686
| | | | | | | | | | | | | | | | | | | | | Summary: Currently the RISC-V backend does not realign the stack. This can be an issue even for the RV32I/RV64I ABIs (where the stack is 16-byte aligned), though is rare. It will be much more comment with RV32E (though the alignment requirements for common data types remain under-documented...). This patch adds minimal support for stack realignment. It should cope with large realignments. It will error out if the stack needs realignment and variable sized objects are present. It feels like a lot of the code like getFrameIndexReference and determineFrameLayout could be refactored somehow, as right now it feels fiddly and brittle. We also seem to allocate a lot more memory than GCC does for equivalent C code. Reviewers: asb Reviewed By: asb Subscribers: wwei, jrtc27, s.egerton, MaskRay, Jim, lenary, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62007 llvm-svn: 368300
* Implement hh_mm_ss from P1466R3. Reviewed as https://reviews.llvm.org/D65365.Marshall Clow2019-08-0816-6/+896
| | | | llvm-svn: 368299
* [ELF][AArch64] Delete two unused RUN lines from aarch64-movw-tprel.s after ↵Fangrui Song2019-08-081-2/+0
| | | | | | D65882 llvm-svn: 368298
* [FileCheck] Add missing includes in headerThomas Preud'homme2019-08-082-2/+6
| | | | | | | | | | | | Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65778 llvm-svn: 368297
* Add llvm.licm.disable metadataTim Corringham2019-08-085-2/+63
| | | | | | | | | | | | | | For some targets the LICM pass can result in sub-optimal code in some cases where it would be better not to run the pass, but it isn't always possible to suppress the transformations heuristically. Where the front-end has insight into such cases it is beneficial to attach loop metadata to disable the pass - this change adds the llvm.licm.disable metadata to enable that. Differential Revision: https://reviews.llvm.org/D64557 llvm-svn: 368296
* [OPENMP]Add support for analysis of linear variables and step.Alexey Bataev2019-08-0821-53/+252
| | | | | | | | | | | | | | | | | Summary: Added support for basic analysis of the linear variables and linear step expression. Linear loop iteration variables must be excluded from this analysis, only non-loop iteration variables must be analyzed. Reviewers: NoQ Subscribers: guansong, cfe-commits, caomhin, kkwli0 Tags: #clang Differential Revision: https://reviews.llvm.org/D65461 llvm-svn: 368295
* [lldb][CMake] Disable modules in Xcode projectsStefan Granitz2019-08-081-0/+3
| | | | | | | | | | | | | | | | Summary: Apparently, module-enabled builds clash with Xcode's analysis. Reviewers: aprantl, jingham, davide, teemperor Reviewed By: davide Subscribers: mgorny, lldb-commits, #lldb Tags: #lldb Differential Revision: https://reviews.llvm.org/D65874 llvm-svn: 368294
* [ELF][AArch64] Support for movz, movk tprel relocationsPeter Smith2019-08-083-0/+94
| | | | | | | | | | | | | | | | | This patch Implements the R_AARCH64_TLSLE_MOVW_TPREL_G*[_NC]. These are logically the same calculation as the existing TLSLE relocations with the result written back to mov[nz] and movk instructions. A typical code sequence is: movz x0, #:tprel_g2:foo // bits [47:32] of R_TLS with overflow check movk x0, #:tprel_g1_nc:foo // bits [31:16] of R_TLS with no overflow check movk x0, #:tprel_g0_nc:foo // bits [15:0] of R_TLS with no overflow check This type of code sequence is usually used with a large code model. Differential Revision: https://reviews.llvm.org/D65882 Fixes: PR42853 llvm-svn: 368293
* [X86][SSE] matchBinaryPermuteShuffle - split INSERTPS combinesSimon Pilgrim2019-08-083-49/+54
| | | | | | We need to prefer INSERTPS with zeros over SHUFPS, but fallback to INSERTPS if that fails. llvm-svn: 368292
* [clangd] Added semantic highlighting support for primitives.Johan Vikstrom2019-08-085-37/+51
| | | | | | | | | | | | | | | | Summary: Adds a new HighlightingKind "Primitive". Adds a special case for TypeLocs that have an underlying TypePtr that is are builtin types, adding them as primitives. The primary reason for this change is because otherwise typedefs that typedef primitives `typedef int A` would not get highlighted (so in the example `A` would not get any highlightings.) Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65943 llvm-svn: 368291
* [Reassociate] add more tests with negative FP constants; NFCSanjay Patel2019-08-081-0/+332
| | | | llvm-svn: 368290
* ObjectFileELF: Convert a unit test to a lit testPavel Labath2019-08-084-242/+93
| | | | | | It is much easier to test this functionality via lldb-test. llvm-svn: 368289
* [ARM] Set default alignment to 64bitsDiogo N. Sampaio2019-08-083-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | Summary: The maximum alignment used by ARM arch is 64bits, not 128. This could cause overaligned memory access for 128 bit neon vector that have unpredictable behaviour. This fixes: https://bugs.llvm.org/show_bug.cgi?id=42668 Reviewers: ostannard, dmgreen, srhines, danalbert, pirama, peter.smith Reviewed By: pirama, peter.smith Subscribers: phosek, thegameg, thakis, llvm-commits, carwil, peter.smith, javed.absar, kristof.beyls, cfe-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D65000 llvm-svn: 368288
* [clangd] Added an early return from VisitMemberExpr in SemanticHighlighting ↵Johan Vikstrom2019-08-082-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | if underlying MemberDecl is a CXXConversionDecl. Summary: Conversion operators contain invalid MemberLocs which caused SemanticHighlighting to emit a lot of error logs in large files as they can occur fairly often (for example converting StringRef to std string). As the only thing happening was a lot of error logs being emited there doesn't really seem to be any way to test this (no erroneous tokens are added). But emiting as many logs as were being emited is not wanted. This also adds a test to guard against regressions for highlightings disapearing from places where the conversion operators are used as their behaviour differ from the other CXXMethodDecls. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65928 llvm-svn: 368287
* [libc++abi] Fix tests when pstl is enabledLouis Dionne2019-08-082-0/+4
| | | | llvm-svn: 368286
* [pstl] Error out when the backend is left unspecifiedLouis Dionne2019-08-081-3/+1
| | | | | | | | Instead of silently falling back to the serial backend, it's better if we fail loudly when the parallel backend is left unspecified. Since we have a __pstl_config_site header, a backend should always be specified. llvm-svn: 368285
* [pstl] Add a __pstl_config_site header to record the CMake configurationLouis Dionne2019-08-085-7/+36
| | | | | | | | | | | | | This commit adds a __pstl_config_site header that contains the value of macros specified at CMake configuration time. It works similarly to libc++'s __config_site header, except we always include it as a separate file instead of concatenating it to the main configuration header. It is necessary to thread the includes for that header into libc++'s lit configuration, otherwise we'd be requiring an installation step prior to running the test suite. llvm-svn: 368284
* [clangd] Don't include internal gtest header.Haojian Wu2019-08-081-1/+0
| | | | llvm-svn: 368283
* [clangd] Remove a function accidently being added in rL368261.Haojian Wu2019-08-081-20/+0
| | | | llvm-svn: 368282
* Fix check in tools/gold/X86/strip_names.ll regarding unnamed argsBjorn Pettersson2019-08-081-1/+1
| | | | | | | | | After r367755 value numbers are printed for unnamed function arguments. The tools/gold/X86/strip_names.ll was not updated in that commit, so this patch can be seen as a follow up to r367755. llvm-svn: 368281
* [clang-format] fix crash involving invalid preprocessor lineKrasimir Georgiev2019-08-082-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This (invalid) fragment is crashing clang-format: ``` #if 1 int x; #elif int y; #endif ``` The reason being that the parser expects a token after `#elif`, and the subsequent parsing of the next line does not check if `CurrentToken` is null. Reviewers: gribozavr Reviewed By: gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65940 llvm-svn: 368280
* Fix LLDB_CONFIGURATION_DEBUG builds for the GetSymbolVendor removalPavel Labath2019-08-081-6/+2
| | | | | | fix one usage that is ifdefed-out in non-debug builds. llvm-svn: 368279
* [X86][SSE] Add x64 load use test caseSimon Pilgrim2019-08-081-8/+16
| | | | llvm-svn: 368278
* [clangd] Correct the documentation, NFC.Haojian Wu2019-08-081-1/+1
| | | | llvm-svn: 368277
* [TargetLowering] SimplifyDemandedBits - call SimplifyMultipleUseDemandedBits ↵Simon Pilgrim2019-08-0810-171/+163
| | | | | | | | | | | | | | for ISD::EXTRACT_VECTOR_ELT This patch attempts to peek through vectors based on the demanded bits/elt of a particular ISD::EXTRACT_VECTOR_ELT node, allowing us to avoid dependencies on ops that have no impact on the extract. In particular this helps remove some unnecessary scalar->vector->scalar patterns. The wasm shift patterns are annoying - @tlively has indicated that the wasm vector shift codegen are to be refactored in the near-term and isn't considered a major issue. Differential Revision: https://reviews.llvm.org/D65887 llvm-svn: 368276
* [MCA] Remove dependency from InstrBuilder in mca::Context. NFCAndrea Di Biagio2019-08-083-27/+31
| | | | | | InstrBuilder is not required to construct the default pipeline. llvm-svn: 368275
* [MIPS GlobalISel] Select jump_table and brjtPetar Avramovic2019-08-087-1/+1094
| | | | | | | | | G_JUMP_TABLE and G_BRJT appear from translation of switch statement. Select these two instructions for MIPS32, both pic and non-pic. Differential Revision: https://reviews.llvm.org/D65861 llvm-svn: 368274
* [llcm-readobj] - Fix BB after t368272.George Rimar2019-08-081-2/+1
| | | | | | Seems I forgot to update this test case. llvm-svn: 368273
* [yaml2obj/obj2yaml] - Add a basic support for extended section indexes.George Rimar2019-08-0811-29/+428
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases a symbol might have section index == SHN_XINDEX. This is an escape value indicating that the actual section header index is too large to fit in the containing field. Then the SHT_SYMTAB_SHNDX section is used. It contains the 32bit values that stores section indexes. ELF gABI says that there can be multiple SHT_SYMTAB_SHNDX sections, i.e. for example one for .symtab and one for .dynsym (1) https://groups.google.com/forum/#!topic/generic-abi/-XJAV5d8PRg (2) DT_SYMTAB_SHNDX: http://www.sco.com/developers/gabi/latest/ch5.dynamic.html In this patch I am only supporting a single SHT_SYMTAB_SHNDX associated with a .symtab. This is a more or less common case which is used a few tests I saw in LLVM. I decided not to create the SHT_SYMTAB_SHNDX section as "implicit", but implement is like a kind of regular section for now. i.e. tools do not recreate this section or its content, like they do for symbol table sections, for example. That should allow to write all kind of possible broken test cases for our needs and keep the output closer to requested. Differential revision: https://reviews.llvm.org/D65446 llvm-svn: 368272
* Add a missing include to SymbolFilePDBTests.cppPavel Labath2019-08-081-0/+1
| | | | | | This should _really_ fix the pdb unit tests. llvm-svn: 368271
* [Extract] Fixed SemicolonExtractionPolicy for SwitchStmt and SwitchCaseShaurya Gupta2019-08-082-1/+17
| | | | | | | | | | | | Reviewers: arphaman, sammccall Subscribers: dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65883 llvm-svn: 368267
* Remove xcode-specific Config.hPavel Labath2019-08-082-40/+1
| | | | | | | | | | | | | | | | | | Summary: Now that the xcode project is removed, we no longer need/use the hand-maintained Config.h file, as everything is configured through cmake. This patch deletes that file and reverts some of the changes from r300372, which were made to support this use case. Reviewers: sgraenitz, beanz Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D65862 llvm-svn: 368266
* Fix PDB unit tests for the GetSymbolVendor deletionPavel Labath2019-08-081-36/+15
| | | | llvm-svn: 368265
* [ARM] Select VFMASam Tebbs2019-08-082-0/+31
| | | | llvm-svn: 368264
* Remove Module::GetSymbolVendorPavel Labath2019-08-083-63/+42
| | | | | | | | | | | | | | | | | | | | Summary: This patch removes the GetSymbolVendor function, and the various mentions of the SymbolVendor in the Module class. The implementation of GetSymbolVendor is "inlined" into the GetSymbolFile class which I created earlier. After this patch, the SymbolVendor class still exists inside the Module object, but only as an implementation detail -- a fancy holder for the SymbolFile. That will be removed in the next patch. Reviewers: clayborg, JDevlieghere, jingham, jdoerfert Subscribers: jfb, lldb-commits Differential Revision: https://reviews.llvm.org/D65864 llvm-svn: 368263
* [ELF] - An attemp to fix builld bit after r368260George Rimar2019-08-081-1/+3
| | | | | | | | | | | | BB: http://lab.llvm.org:8011/builders/lld-perf-testsuite/builds/17577/steps/build-bin%2Flld/logs/stdio The error is: /home/buildslave/slave_as-bldslv8/lld-perf-testsuite/llvm/include/llvm/Object/ELF.h:67:14: error: 'static' function 'defaultWarningHandler' declared in header file should be declared 'static inline' [-Werror,-Wunneeded-internal-declaration] static Error defaultWarningHandler(const Twine &Msg) { return createError(Msg); } ^ llvm-svn: 368262
* [clangd] Fix implicit template instatiations appearing as topLevelDecls.Johan Vikstrom2019-08-086-13/+163
| | | | | | | | | | | | | | Summary: The parser gives implicit template instantiations to the action's HandleTopLevelDecls callback. This makes semantic highlighting highlight these templated functions multiple times. Fixed by filtering on if a Decl is an implicit function/variable/class instantiation. Also added a testcase to semantic highlighting on this. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65510 llvm-svn: 368261
* [llvm-readobj/libObject] - Introduce a custom warning handler for ↵George Rimar2019-08-086-44/+100
| | | | | | | | | | | | | | | | | | | | `ELFFile<ELFT>` methods. Currently, we have a code duplication in llvm-readobj which was introduced in D63266. The duplication was introduced to allow llvm-readobj to dump the partially broken object. Methods in ELFFile<ELFT> perform a strict validation of the inputs, what is itself good, but not for dumper tools, that might want to dump the information, even if some pieces are broken/unexpected. This patch introduces a warning handler which can be passed to ELFFile<ELFT> methods and can allow skipping the non-critical errors when needed/possible. For demonstration, I removed the duplication from llvm-readobj and implemented a warning using the new custom warning handler. It also deduplicates the strings printed, making the output less verbose. Differential revision: https://reviews.llvm.org/D65515 llvm-svn: 368260
* [diagtool] Use `operator<<(Colors)` to print out colored output.Rui Ueyama2019-08-081-36/+13
| | | | | | | | | | r368131 introduced this new API to print out messages in colors. If the colored output is disabled, `operator<<(Colors)` becomes nop. No functionality change intended. Differential Revision: https://reviews.llvm.org/D65854 llvm-svn: 368259
OpenPOWER on IntegriCloud