summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [cmake] Add openmp to LLVM_ALL_PROJECTSShoaib Meenai2019-02-061-1/+1
| | | | | | It'll get ignored in LLVM_ENABLE_PROJECTS after r353148 otherwise. llvm-svn: 353343
* [MinGW] Add --insert-timestamp as complement to the --no-insert-timestamp optionMartin Storsjo2019-02-063-1/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D57808 llvm-svn: 353342
* [libObject][NFC] Include filename in error messageJordan Rupprecht2019-02-061-1/+1
| | | | llvm-svn: 353341
* Correct "varaible" typo in commentEd Maste2019-02-061-1/+1
| | | | llvm-svn: 353340
* [LICM/MSSA] Add promotion to scalars by building an AliasSetTracker with ↵Alina Sbirlea2019-02-068-56/+164
| | | | | | | | | | | | | | | | | | | | | | | | MemorySSA. Summary: Experimentally we found that promotion to scalars carries less benefits than sinking and hoisting in LICM. When using MemorySSA, we build an AliasSetTracker on demand in order to reuse the current infrastructure. We only build it if less than AccessCapForMSSAPromotion exist in the loop, a cap that is by default set to 250. This value ensures there are no runtime regressions, and there are small compile time gains for pathological cases. A much lower value (20) was found to yield a single regression in the llvm-test-suite and much higher benefits for compile times. Conservatively we set the current cap to a high value, but we will explore lowering it when MemorySSA is enabled by default. Reviewers: sanjoy, chandlerc Subscribers: nemanjai, jlebar, Prazek, george.burgess.iv, jfb, jsji, llvm-commits Differential Revision: https://reviews.llvm.org/D56625 llvm-svn: 353339
* [DAG] Immediately cleanup unused nodes from extend-based combines.Nirav Dave2019-02-061-2/+7
| | | | llvm-svn: 353338
* [COFF, ARM64] Add ARM64 support for MS intrinsic _fastfailTom Tan2019-02-062-3/+5
| | | | | | | | | | The MSDN document was also updated to reflect this, but it probably will take a few days to show in below link. https://docs.microsoft.com/en-us/cpp/intrinsics/fastfail Differential Revision: https://reviews.llvm.org/D57631 llvm-svn: 353337
* Move IR flag handling directly into builder calls for cases translated from ↵Michael Berg2019-02-063-43/+50
| | | | | | | | | | | | | | Instructions in GlobalIsel Reviewers: aditya_nandakumar, volkan Reviewed By: aditya_nandakumar Subscribers: rovka, kristof.beyls, volkan, Petar.Avramovic Differential Revision: https://reviews.llvm.org/D57630 llvm-svn: 353336
* [AliasSetTracker] Pass MustAlias to addPointer more often.Alina Sbirlea2019-02-062-26/+40
| | | | | | | | | | | | | | | Summary: Pass the alias info to addPointer when available. Will save an alias() call for must sets when adding a known Must or May alias. [Part of a series of cleanup patches] Reviewers: reames, mkazantsev Subscribers: sanjoy, jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D56613 llvm-svn: 353335
* [X86] Change the CPU on the test case for pr40529.ll to really show the bug. NFCCraig Topper2019-02-061-4/+4
| | | | llvm-svn: 353334
* [X86][DAG] Avoid creating dangling bitcast.Nirav Dave2019-02-061-1/+2
| | | | | | | | combineExtractWithShuffle may leave a dangling bitcast which may prevent further optimization in later passes. Avoid constructing it unless it is used. llvm-svn: 353333
* [x86] add tests for horizontal ops (PR38971, PR33758); NFCSanjay Patel2019-02-062-0/+342
| | | | llvm-svn: 353332
* Remove a small header that is used only by one file. NFC.Rui Ueyama2019-02-062-35/+11
| | | | llvm-svn: 353331
* [SystemZ] Improved handling of the @llvm.ctlz intrinsic.Jonas Paulsson2019-02-063-0/+109
| | | | | | | | | | | | | | Since SystemZ supports counting of leading zeros with the FLOGR instruction, isCheapToSpeculateCtlz() should return true, which it now does. ISD::CTLZ_ZERO_UNDEF i32 is now handled the same way as ISD::CTLZ is, which is needed since promotion to i64 is required and CTLZ_ZERO_UNDEF is only expanded to CTLZ if it is Legal or Custom. Review: Ulrich Weigand https://reviews.llvm.org/D57710 llvm-svn: 353330
* build: Remove the cmake check for malloc.h.Peter Collingbourne2019-02-064-10/+1
| | | | | | | | | | | As far as I can tell, malloc.h is only being used here to provide a definition of mallinfo (malloc itself is declared in stdlib.h via cstdlib). We already have a macro for whether mallinfo is available, so switch to using that instead. Differential Revision: https://reviews.llvm.org/D57807 llvm-svn: 353329
* [clang-tidy] modernize-avoid-c-arrays: avoid main function (PR40604)Roman Lebedev2019-02-064-1/+50
| | | | | | | | | | | | | | | | | | | | | Summary: The check should ignore the main function, the program entry point. It is not possible to use `std::array<>` for the `argv`. The alternative is to use `char** argv`. Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=40604 | PR40604 ]] Reviewers: JonasToth, aaron.ballman Reviewed By: aaron.ballman Subscribers: xazax.hun, hans, cfe-commits Tags: #clang-tools-extra, #clang Differential Revision: https://reviews.llvm.org/D57787 llvm-svn: 353327
* Add SBReproducer to Xcode projectJonas Devlieghere2019-02-061-0/+6
| | | | llvm-svn: 353326
* [SystemZ] Wait with VGBM selection until after DAGCombine2.Jonas Paulsson2019-02-068-119/+101
| | | | | | | | | | | | | | | | | Don't lower BUILD_VECTORs to BYTE_MASK, but instead expose the BUILD_VECTORs to the DAGCombiner and select them to VGBM in Select(). This allows the DAGCombiner to understand the constant vector values. For floating point, only all-zeros vectors are now generated with VGBM, as it turned out to be somewhat complicated to handle any arbitrary constants, while in practice this is very rare and hardly needed. The SystemZ ISD opcodes z_byte_mask, z_vzero and z_vones have been removed. Review: Ulrich Weigand https://reviews.llvm.org/D57152 llvm-svn: 353325
* [Reproducers] SBReproducer framework: Capture & ReplayJonas Devlieghere2019-02-068-10/+830
| | | | | | | | | | | | | This is part two of the reproducer instrumentation framework. It contains the code to capture and replay function calls. The main user of this framework will be the SB API layer. For all the details refer to the RFC on the mailing list: http://lists.llvm.org/pipermail/lldb-dev/2019-January/014530.html Differential revision: https://reviews.llvm.org/D56322 llvm-svn: 353324
* Add comment.Rui Ueyama2019-02-061-1/+14
| | | | llvm-svn: 353323
* [opt-viewer] Add --filter option to select remarks for displaying.Florian Hahn2019-02-067-9/+631
| | | | | | | | | | | | | | | | | This allows limiting the displayed remarks to the ones with names matching the filter (regular) expression. Generating html pages for a larger project with optimization remarks can result in a huge HTML documents and using --filter allows to focus on a set of interesting remarks. Reviewers: hfinkel, anemet, thegameg, serge-sans-paille Reviewed By: anemet Differential Revision: https://reviews.llvm.org/D57827 llvm-svn: 353322
* Revert "[libc++] Only add dylib-related features when using the system's libc++"Louis Dionne2019-02-061-1/+1
| | | | | | This reverts r353319, which broke our internal CI. llvm-svn: 353321
* Test commit. NFCPatrick Lyster2019-02-061-1/+1
| | | | llvm-svn: 353320
* [libc++] Only add dylib-related features when using the system's libc++Louis Dionne2019-02-061-1/+1
| | | | | | | | | | | | Otherwise, when testing trunk libc++ on an older system, lit will think that the dylib features are disabled. Ideally, we'd have a notion of running the tests with/without a deployment target (or, equivalently, a deployment target representing trunk where everything is as recent as can be). Since we always have a deployment target right now (which defaults to the current system), we only enable those features when we're going to also be testing with the system libc++. llvm-svn: 353319
* Switch to cantFail(), since it does the same assertion.Stephen Hines2019-02-061-6/+5
| | | | | | | | | | | | Reviewers: cfe-commits, lhames Reviewed By: lhames Subscribers: hintonda, klimek, pirama Differential Revision: https://reviews.llvm.org/D36806 llvm-svn: 353318
* [SelectionDAG] Cleanup some code comments. NFCBjorn Pettersson2019-02-061-4/+4
| | | | | | | | | | Don't repeat the function name in some doxygen comments. (Just a minor cleanup, while testing to push from the git monorepo setup.) llvm-svn: 353317
* [GlobalISel][NFC] Gardening: Factor out code for simple unary intrinsicsJessica Paquette2019-02-062-78/+69
| | | | | | | | | | | | | There was a lot of repeated code wrt unary math intrinsics in translateKnownIntrinsic. This factors out the repeated MIRBuilder code into two functions: translateSimpleUnaryIntrinsic and getSimpleUnaryIntrinsicOpcode. This simplifies adding simple unary intrinsics, since after this, all you have to do is add the mapping to SimpleUnaryIntrinsicOpcodes. Differential Revision: https://reviews.llvm.org/D57774 llvm-svn: 353316
* [yaml2obj]Allow number for ELF symbol typeJames Henderson2019-02-063-0/+66
| | | | | | | | | | | | | yaml2obj previously only recognised standard STT_* names, and didn't allow arbitrary numbers. This change allows the user to specify a number for the type instead. It also adds a test to verify the existing behaviour for obj2yaml for unkown symbol types. Reviewed by: grimar Differential Revision: https://reviews.llvm.org/D57822 llvm-svn: 353315
* Support R_X86_64_PC8 and R_X86_64_PC16.Rui Ueyama2019-02-062-0/+25
| | | | | | | | They are defined by the x86-64 ELF ABI standard. Differential Revision: https://reviews.llvm.org/D57799 llvm-svn: 353314
* [InstCombine] X | C == C --> (X & ~C) == 0Sanjay Patel2019-02-062-17/+26
| | | | | | | | | | We should canonicalize to one of these forms, and compare-with-zero could be more conducive to follow-on transforms. This also leads to generally better codegen as shown in PR40611: https://bugs.llvm.org/show_bug.cgi?id=40611 llvm-svn: 353313
* [InstCombine] add tests for PR40611 and regenerate checks; NFCSanjay Patel2019-02-061-294/+349
| | | | | | Lots of unrelated diffs here from the newer version of the script. llvm-svn: 353312
* Add a specialization for '__unwrap_iter' to handle const interators. This ↵Marshall Clow2019-02-061-0/+12
| | | | | | enables the 'memmove' optimization for std::copy, etc. llvm-svn: 353311
* [clangd] Add type boost to fuzzy find in Dex.Eric Liu2019-02-067-50/+97
| | | | | | | | | | | | | | | | | | Summary: No noticeable impact on code completions overall except some improvement on cross-namespace completion. Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57815 llvm-svn: 353310
* [clangd] Bump vscode-clangd v0.0.11Haojian Wu2019-02-061-1/+1
| | | | | | | CHANGELOG: - activate the extension on ObjC files. llvm-svn: 353309
* AArch64: enforce even/odd register pairs for CASP instructions.Tim Northover2019-02-063-6/+25
| | | | | | | | ARMv8.1a CASP instructions need the first of the pair to be an even register (otherwise the encoding is unallocated). We enforced this during assembly, but not CodeGen before. llvm-svn: 353308
* [InlineAsm][X86] Add backend support for X86 flag output parameters.Nirav Dave2019-02-066-12/+1050
| | | | | | | Allow custom handling of inline assembly output parameters and add X86 flag parameter support. llvm-svn: 353307
* [clangd] Format tweak's replacements.Haojian Wu2019-02-069-13/+81
| | | | llvm-svn: 353306
* [SelectionDAGBuilder] Refactor Inline Asm output check. NFCI.Nirav Dave2019-02-061-13/+26
| | | | llvm-svn: 353305
* [SystemZ] Do not return INT_MIN from strcmp/memcmpUlrich Weigand2019-02-066-163/+129
| | | | | | | | | | | | | | | | | | | The IPM sequence currently generated to compute the strcmp/memcmp result will return INT_MIN for the "less than zero" case. While this is in compliance with the standard, strictly speaking, it turns out that common applications cannot handle this, e.g. because they negate a comparison result in order to implement reverse compares. This patch changes code to use a different sequence that will result in -2 for the "less than zero" case (same as GCC). However, this requires that the two source operands of the compare instructions are inverted, which breaks the optimization in removeIPMBasedCompare. Therefore, I've removed this (and all of optimizeCompareInstr), and replaced it with a mostly equivalent optimization in combineCCMask at the DAGcombine level. llvm-svn: 353304
* AArch64: annotate atomics with dropped acquire semantics when printing.Tim Northover2019-02-064-62/+240
| | | | | | | | | | | A quirk of the v8.1a spec is that when the writeback regiser for an atomic read-modify-write instruction is wzr/xzr, the instruction no longer enforces acquire ordering. However, it's still written with the misleading 'a' mnemonic. So this adds an annotation when disassembling such instructions, mentioning the change. llvm-svn: 353303
* [x86] vectorize cast ops in lowering to avoid register file transfersSanjay Patel2019-02-064-41/+127
| | | | | | | | | | | | | | | The proposal in D56796 may cross the line because we're trying to avoid vectorization transforms in generic DAG combining. So this is an alternate, later, x86-specific translation of that patch. There are several potential follow-ups to enhance this: 1. Allow extraction from non-zero element index. 2. Peek through extends of smaller width integers. 3. Support x86-specific conversion opcodes like X86ISD::CVTSI2P Differential Revision: https://reviews.llvm.org/D56864 llvm-svn: 353302
* [MCA] Speedup ResourceManager queries. NFCIAndrea Di Biagio2019-02-061-8/+9
| | | | | | | | | | | | | When a resource unit R is released, the ResourceManager notifies groups that contain R. Before this patch, the logic in method ResourceManager::release() implemented a potentially slow iterative search of dependent groups on the entire set of processor resources. This patch replaces that logic with a simpler (and often faster) lookup on array `Resource2Groups`. This patch gives an average speedup of ~3-4% (observed on a release build when testing for target btver2). No functional change intended. llvm-svn: 353301
* Recommit r353293 "[LLD][ELF] - Set DF_STATIC_TLS flag for i386 target."George Rimar2019-02-0611-71/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the following changes: 1) Compilation fix: std::atomic<bool> HasStaticTlsModel = false; -> std::atomic<bool> HasStaticTlsModel{false}; 2) Adjusted the comment in code. Initial commit message: DF_STATIC_TLS flag indicates that the shared object or executable contains code using a static thread-local storage scheme. Patch checks if IE/LE relocations were used to check if the code uses a static model. If so it sets the DF_STATIC_TLS flag. Differential revision: https://reviews.llvm.org/D57749 ---- Modified : /lld/trunk/ELF/Arch/X86.cpp Modified : /lld/trunk/ELF/Config.h Modified : /lld/trunk/ELF/SyntheticSections.cpp Added : /lld/trunk/test/ELF/Inputs/i386-static-tls-model1.s Added : /lld/trunk/test/ELF/Inputs/i386-static-tls-model2.s Added : /lld/trunk/test/ELF/Inputs/i386-static-tls-model3.s Added : /lld/trunk/test/ELF/Inputs/i386-static-tls-model4.s Added : /lld/trunk/test/ELF/i386-static-tls-model.s Modified : /lld/trunk/test/ELF/i386-tls-ie-shared.s Modified : /lld/trunk/test/ELF/tls-dynamic-i686.s Modified : /lld/trunk/test/ELF/tls-opt-iele-i686-nopic.s llvm-svn: 353299
* gn build: Merge r353265, r353237Nico Weber2019-02-065-2/+3
| | | | llvm-svn: 353298
* Revert r353293 "[LLD][ELF] - Set DF_STATIC_TLS flag for i386 target."George Rimar2019-02-0611-140/+71
| | | | | | | | | | | | It broke BB: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/43450 http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/27891 Error is: tools/lld/ELF/Config.h:84:41: error: copying member subobject of type 'std::atomic<bool>' invokes deleted constructor std::atomic<bool> HasStaticTlsModel = false; llvm-svn: 353297
* [clangd] Update dev dependencies of clangd-vscodeIlya Biryukov2019-02-063-5/+2031
| | | | | | | | | | | | | | | | | | | | | | Summary: The version bumps are a result of running `npm audit`, which found 3 security issues in previous versions of our dependencies. Also add 'package-lock.json' to the repo, it's a common practice to check in those files into the repository to get consistent versions of dependencies when running on different machines. Reviewers: hokein Reviewed By: hokein Subscribers: dschuff, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57814 llvm-svn: 353296
* [clangd] Enable clangd on Objective-C in VSCodeIlya Biryukov2019-02-061-1/+3
| | | | | | | | | | | | | | | | Summary: Thanks to Andreas Ostermeyer for raising this on the mailing list. Reviewers: hokein Reviewed By: hokein Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57813 llvm-svn: 353295
* Attempt to fix buildbot after r353289Eugene Leviant2019-02-063-3/+3
| | | | llvm-svn: 353294
* [LLD][ELF] - Set DF_STATIC_TLS flag for i386 target.George Rimar2019-02-0611-71/+140
| | | | | | | | | | | | DF_STATIC_TLS flag indicates that the shared object or executable contains code using a static thread-local storage scheme. Patch checks if IE/LE relocations were used to check if the code uses a static model. If so it sets the DF_STATIC_TLS flag. Differential revision: https://reviews.llvm.org/D57749 llvm-svn: 353293
* [DAGCombine][NFC] GatherAllAliases should take a LSBaseSDNode.Clement Courbet2019-02-061-8/+8
| | | | | | | GatherAllAliases only makes sense for LSBaseSDNode. Enforce it with static typing instead of runtime cast. llvm-svn: 353291
OpenPOWER on IntegriCloud