summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gn build: Merge 1ad15046dcfLLVM GN Syncbot2019-12-181-0/+3
|
* [Syntax] Use a hash table to search for tokens by their locationIlya Biryukov2019-12-182-9/+50
| | | | | | | | This is both more efficient and avoids corner cases in `SourceManager::isBeforeInTranslationUnit`. The change is trivial and clearly a performance improvement on the hot path of building the syntax tree, so sending without review.
* [Syntax] Uppercase the first letter of the test name. NFCIlya Biryukov2019-12-181-1/+1
| | | | To match naming style of other tests.
* [Syntax] Allow to mutate syntax treesIlya Biryukov2019-12-1813-20/+572
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds facilities to mutate the syntax trees and produce corresponding text replacements. The public interface of the syntax library now includes facilities to: 1. perform type-safe modifications of syntax trees, 2. compute textual replacements to apply the modifications, 3. create syntax trees not backed by the source code. For each of the three, we only add a few example transformations in this patch to illustrate the idea, support for more kinds of nodes and transformations will be done in follow-up patches. The high-level mutation operations are implemented on top of operations that allow to arbitrarily change the trees. They are considered to be implementation details and are not available to the users of the library. Reviewers: sammccall, gribozavr2 Reviewed By: gribozavr2 Subscribers: merge_guards_bot, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64573
* [DebugInfo] Correctly handle salvaged casts and split fragments at ISelstozer2019-12-1811-19/+156
| | | | | | | | | | | | | | | Previously, LLVM had no functional way of performing casts inside of a DIExpression(), which made salvaging cast instructions other than Noop casts impossible. This patch enables the salvaging of casts by using the DW_OP_LLVM_convert operator for SExt and Trunc instructions. There is another issue which is exposed by this fix, in which fragment DIExpressions (which are preserved more readily by this patch) for values that must be split across registers in ISel trigger an assertion, as the 'split' fragments extend beyond the bounds of the fragment DIExpression causing an error. This patch also fixes this issue by checking the fragment status of DIExpressions which are to be split, and dropping fragments that are invalid.
* recommit: [ASTImporter] Friend class decl should not be visible in its contextGabor Marton2019-12-182-41/+91
| | | | | | | | | | | | | | | | | | | Summary: In the past we had to use DeclContext::makeDeclVisibleInContext to make friend declarations available for subsequent lookup calls and this way we could chain (redecl) the structurally equivalent decls. By doing this we created an AST that improperly made declarations visible in some contexts, so the AST was malformed. Since we use the importer specific lookup this is no longer necessary, because with that we can find every previous nodes. Reviewers: balazske, a_sidorin, a.sidorin, shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, teemperor, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71020
* [OpenCL] Add builtin function extension handlingSven van Haastregt2019-12-184-24/+106
| | | | | | | | | | Provide a mechanism to attach OpenCL extension information to builtin functions, so that their use can be restricted according to the extension(s) the builtin is part of. Patch by Pierre Gondois and Sven van Haastregt. Differential Revision: https://reviews.llvm.org/D71476
* [AArch64] Improve codegen of volatile load/store of i128Victor Campos2019-12-185-18/+188
| | | | | | | | | | | | | | | | Summary: Instead of generating two i64 instructions for each load or store of a volatile i128 value (two LDRs or STRs), now emit a single LDP or STP. Reviewers: labrinea, t.p.northover, efriedma Reviewed By: efriedma Subscribers: kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69559
* [AArch64] Enable clustering memory accesses to fixed stack objectsJay Foad2019-12-188-145/+143
| | | | | | | | | | | | | | | | | | Summary: r347747 added support for clustering mem ops with FI base operands including support for fixed stack objects in shouldClusterFI, but apparently this was never tested. This patch fixes shouldClusterFI to work with scaled as well as unscaled load/store instructions, and fixes the ordering of memory ops in MemOpInfo::operator< to ensure that memory addresses always increase, regardless of which direction the stack grows. Subscribers: MatzeB, kristof.beyls, hiraditya, javed.absar, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71334
* [llvm-exegesis][mips] Add lit testMiloš Stojanović2019-12-182-0/+40
| | | | | | Adding a basic lit test for MIPS. Differential Revision: https://reviews.llvm.org/D71605
* [NFC][TTI] Add Alignment for isLegalMasked[Gather/Scatter]Anna Welker2019-12-188-35/+52
| | | | | | | Add an extra parameter so alignment can be taken under consideration in gather/scatter legalization. Differential Revision: https://reviews.llvm.org/D71610
* [cmake] Add llvm-locstats to LLVM_TEST_DEPENDSDavid Stenberg2019-12-181-0/+1
| | | | | | | | | | | | | | | | Summary: Make sure that llvm-locstats is updated before running lit tests even when it's not an explicit target. Reviewers: djtodoro, krisb, spatel Reviewed By: djtodoro Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71611
* [llvm-readobj][test] - Move a comment. NFC.Georgii Rymar2019-12-181-2/+2
| | | | I've forgot to address this review comment.
* [llvm-readob] - Refactor printing of sections flags. NFCI.Georgii Rymar2019-12-181-50/+54
| | | | | | | | This is a natural clean-up after D71462/D71464. It allows to define known section letters used for GNU style in one place. Differential revision: https://reviews.llvm.org/D71591
* [llvm-readobj][test] - Cleanup hash-histogram.testGeorgii Rymar2019-12-181-26/+86
| | | | | | | | | | | | | In this test case we use 3 precompiled objects to test how we print a histogram for an GNU hash section. It does not make sense to use precompiled objects for that. Also we could have 2 tests: one for 32 and another for 64 bits target. This patch does this change. It is not possible to remove these precompiled objects because they are used elsewhere. Differential revision: https://reviews.llvm.org/D71606
* [llvm-readelf] - Change letters used for SHF_ARM_PURECODE and ↵Georgii Rymar2019-12-185-53/+114
| | | | | | | | | | | | SHF_X86_64_LARGE flags. GNU uses `l` for SHF_X86_64_LARGE and `y` for SHF_ARM_PURECODE. Lets follow. To do this I had to refactor and refine how we print the help flags description. It was too generic and inconsistent with GNU readelf. Differential revision: https://reviews.llvm.org/D71464
* [ELF] writePlt, writeIplt: replace parameters gotPltEntryAddr and index with ↵Fangrui Song2019-12-1812-88/+89
| | | | | | | | | | `const Symbol &`. NFC PPC::writeIplt (IPLT code sequence, D71621) needs to access `Symbol`. Reviewed By: grimar, ruiu Differential Revision: https://reviews.llvm.org/D71631
* [llvm-readelf][llvm-readobj] - Reimplement the logic of section flags dumping.Georgii Rymar2019-12-185-33/+214
| | | | | | | | | | | | | | | | | Our logic that dumped the flags was buggy. For LLVM style it dumped SHF_MASKPROC/SHF_MASKOS named constants, though they are not flags, but masks. For GNU style it was just very inconsistent with GNU which has logic that is not straightforward. Imagine we have sh_flags == 0x90000000. SHF_EXCLUDE ("E") has a value of 0x80000000 and SHF_MASKPROC is 0xf0000000. GNU readelf will not print "E" or "Ep" in this case, but will print just "p". It only will print "E" when no other processor flag is set. I had to investigate the GNU source to find the algorithm and now our logic should match it. Differential revision: https://reviews.llvm.org/D71462
* [X86] Add calculation for elements in structures in getting uniform base for ↵Wang, Pengfei2019-12-182-6/+763
| | | | | | | | | | | | | | | the Gather/Scatter intrinsic. Summary: Add calculation for elements in structures in getting uniform base for the Gather/Scatter intrinsic. Reviewers: craig.topper, c-rhodes, RKSimon Subscribers: hiraditya, llvm-commits, annita.zhang, LuoYuanke Tags: #llvm Differential Revision: https://reviews.llvm.org/D71442
* [X86] Add strict fma supportWang, Pengfei2019-12-188-34/+387
| | | | | | | | | | | | Summary: Add strict fma support Reviewers: craig.topper, RKSimon, LiuChen3 Subscribers: hiraditya, llvm-commits, LuoYuanke Tags: #llvm Differential Revision: https://reviews.llvm.org/D71604
* [CFG] Add an option to expand CXXDefaultInitExpr into aggregate initializationGabor Horvath2019-12-176-4/+68
| | | | | | | | | | This is useful for clients that are relying on linearized CFGs for evaluating subexpressions and want the default initializer to be evaluated properly. The upcoming lifetime analysis is using this but it might also be useful for the static analyzer at some point. Differential Revision: https://reviews.llvm.org/D71642
* [unwind] Don't link libpthread and libdl on FuchsiaPetr Hosek2019-12-171-4/+9
| | | | This is a follow up to D71135.
* [ELF] Fix a comment. NFCFangrui Song2019-12-171-1/+1
|
* [docs] Remove `git llvm push` and `git llvm revert` from GettingStartedJustin Bogner2019-12-171-42/+14
| | | | | | These sections aren't accurate since the github move. Differential Revision: https://reviews.llvm.org/D71640
* [PowerPC] Add missing legalization for vector BSWAPNemanja Ivanovic2019-12-176-3/+243
| | | | | | | | We somehow missed doing this when we were working on Power9 exploitation. This just adds the missing legalization and cost for producing the vector intrinsics. Differential revision: https://reviews.llvm.org/D70436
* gn build: Merge e62e760f295LLVM GN Syncbot2019-12-181-6/+0
|
* Temporarily Revert "[gicombiner] Add the MatchDag structure and parse ↵Eric Christopher2019-12-1717-1590/+3
| | | | | | | | | | | | instruction DAG's from the input" and follow-on patches. This is breaking a few build bots and local builds with follow-up already on the patch thread. This reverts commits 390c8baa5440dda8907688d9ef860f6982bd925f and 520e3d66e7257c77f1226185504bbe1cb90afcfa.
* [X86] Manually format some setOperationAction calls to line up arguments to ↵Craig Topper2019-12-171-8/+8
| | | | improve readability. NFC
* [AArch64][GlobalISel]: Fix a crash in GlobalIsel in dealing with 16bit ↵Xiaoqing Wu2019-12-172-1/+38
| | | | | | | | | | | | | | | | uadd.with.overflow. Summary: AArch64 doesn't support uadd.with.overflow.i16 natively. This change adds a legalization rule to convert the 32bit add result to 16bit. This should fix PR43981. Reviewers: arsenm, qcolombet, paquette, aemerson Reviewed By: paquette Subscribers: wdng, rovka, kristof.beyls, hiraditya, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71587
* [FPEnv][LegalizeTypes] Make ScalarizeVecOp_STRICT_FP_ROUND do its own ↵Craig Topper2019-12-171-1/+7
| | | | | | | | | | | | replacements and return SDValue() The caller will assert for nodes with more than 2 results unless we return a null SDValue. I tried to test this by copying an AArch64 test for ScalarizeVecOp_FP_ROUND. While it did hit the assert and this commited fixed that. It also hit a later problem that couldn't be fixed without adding strict FP support to AArch64.
* [AMDGPU] Fixed cost model for packed 16 bit opsStanislav Mekhanoshin2019-12-178-103/+271
| | | | Differential Revision: https://reviews.llvm.org/D71622
* [WebAssembly] Implement SIMD {i8x16,i16x8}.avgr_u instructionsThomas Lively2019-12-173-2/+53
| | | | | | | | | | | | | | | | | Summary: These instructions were added to the spec proposal in https://github.com/WebAssembly/simd/pull/126. Their semantics are equivalent to `(a + b + 1) / 2`. The opcode for the experimental i32x4.dot_i16x8_s is also bumped due to a collision with the i8x16.avgr_u opcode. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71628
* Revert "[ MC ] Match labels to existing fragments even when switching sections."Mitch Phillips2019-12-175-177/+19
| | | | | | | This reverts commit 4272372c571cd33edc77a8844b0a224ad7339138. Caused an MSan buildbot failure. More information available in the patch that introduced the bug: https://reviews.llvm.org/D71368
* [analysis] Discard type qualifiers when casting values retrieved from the Store.Artem Dergachev2019-12-172-4/+66
| | | | | | | | | This canonicalizes the representation of unknown pointer symbols, which reduces the overall confusion in pointer cast representation. Patch by Vince Bridgers! Differential Revision: https://reviews.llvm.org/D70836
* [FPEnv][LegalizeTypes][LegalizeDAG][AArch64] Few fixes/improvements for ↵Craig Topper2019-12-175-2/+73
| | | | | | | | | | | | | | | | legalizing fp<->int conversion nodes. This started with adding a test to support get code coverage on ScalarizeVecOp_UnaryOp_StrictFP by copying an existing AArch64 test and using constrained sitofp/uitofp intrinsics. This found 3 separate issues: -ScalarizeVecOp_UnaryOp_StrictFP needs to do its own replacement because the caller can't handle replacing multiple results. -Missing integer promotion support for sitofp/uitofp -Chain result not always assigned in ExpandLegalINT_TO_FP. Committing them together so I can add the test case.
* [driver][darwin] Use explicit -mlinker-version in the -platform_version testsAlex Lorenz2019-12-174-8/+8
| | | | | | The driver actually adds a default -mlinker-version, based on HOST_LINK_VERSION cmake variable. The tests should be explicit about which version they're using to trigger the right behavior.
* [LoopFusion] Move instructions from FC0.Latch to FC1.Latch.Whitney Tsang2019-12-177-47/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary:This PR move instructions from FC0.Latch bottom up to the beginning of FC1.Latch as long as they are proven safe. To illustrate why this is beneficial, let's consider the following example: Before Fusion: header1: br header2 header2: br header2, latch1 latch1: br header1, preheader3 preheader3: br header3 header3: br header4 header4: br header4, latch3 latch3: br header3, exit3 After Fusion (before this PR): header1: br header2 header2: br header2, latch1 latch1: br header3 header3: br header4 header4: br header4, latch3 latch3: br header1, exit3 Note that preheader3 is removed during fusion before this PR. Notice that we cannot fuse loop2 with loop4 as there exists block latch1 in between. This PR move instructions from latch1 to beginning of latch3, and remove block latch1. LoopFusion is now able to fuse loop nest recursively. After Fusion (after this PR): header1: br header2 header2: br header3 header3: br header4 header4: br header2, latch3 latch3: br header1, exit3 Reviewer: kbarton, jdoerfert, Meinersbur, dmgreen, fhahn, hfinkel, bmahjour, etiotto Reviewed By: kbarton, Meinersbur Subscribers: hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D71165
* [AIX] Avoid unset csect assert for functions defined after their use in TOCDavid Tenty2019-12-172-24/+53
| | | | | | | | | | | | | | | | | Summary: If a function is defined after it appears in a TOC expression, we may try to access an unset containing csect when returning a symbol for the expression. Reviewers: Xiangling_L, DiggerLin, jasonliu, hubert.reinterpretcast Reviewed By: hubert.reinterpretcast Subscribers: hubert.reinterpretcast, wuzish, nemanjai, hiraditya, kbarton, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71125
* AMDGPU/SILoadStoreOptimillzer: Refactor CombineInfo structTom Stellard2019-12-171-241/+216
| | | | | | | | | | | | | | | | | Summary: Modify CombineInfo to only store information about a single instruction. This is a little easier to work with and removes a lot of duplicate initialization code. Reviewers: arsenm, nhaehnle Reviewed By: arsenm, nhaehnle Subscribers: merge_guards_bot, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71045
* Fix buildbot failures after removing REQUIRES-ANYNemanja Ivanovic2019-12-171-10/+3
| | | | | | | It would appear that the removal of this lit feature was incomplete and there is a test case that still tests for this. This patch removes the remaining tests to bring the bots back to green. I would encourage the author to do a post-commit review on this in case there is a more desirable fix.
* [IR] Use a reference in a range-based forMark de Wever2019-12-172-19/+19
| | | | | | | | This avoids unneeded copies when using a range-based for loops. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70870
* [Driver] Avoid copies in range-based for loopsMark de Wever2019-12-172-2/+2
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71527
* [Sema] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-172-2/+2
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71529
* [Frontend] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-171-3/+3
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71530
* Recommit "[DebugInfo] Refactored macro related generation,Sourabh Singh Tomar2019-12-184-19/+94
| | | | | | | | | | | | | | | | | | added a test case for macinfo.dwo emission." This was reverted in caa412090666c10f854322cdc701c1cbf8ed726e, since it was causing an assertion failure on Windows bots. This revision is revised to fix that. Original commit message - [DebugInfo] Refactored macro related generation, added a test case for macinfo.dwo emission. Reviewers: dblaikie, aprantl, jini.susan.george Tags: #debug-info #llvm Differential Revision: https://reviews.llvm.org/D71008
* [perf-training] Change profile file pattern string to use %4m instead of %pXin-Xin Wang2019-12-171-1/+1
| | | | | | | | | | | | | | Summary: With %p, each test file that we're using to generate profile data will make its own profraw file which is around 60 MB in size. If we have a lot of test files, that quickly uses a lot of space. Use %4m instead to share the profraw files used to store the profile data. We use 4 here based on the default value in https://reviews.llvm.org/source/llvm-github/browse/master/llvm/CMakeLists.txt$604 Reviewers: beanz, phosek, xiaobai, smeenai, vsk Reviewed By: vsk Subscribers: vsk, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71585
* [FPEnv] Remove unnecessary rounding mode argument for constrained intrinsicsUlrich Weigand2019-12-1718-416/+245
| | | | | | | | | | | | | | | | | | | The following intrinsics currently carry a rounding mode metadata argument: llvm.experimental.constrained.minnum llvm.experimental.constrained.maxnum llvm.experimental.constrained.ceil llvm.experimental.constrained.floor llvm.experimental.constrained.round llvm.experimental.constrained.trunc This is not useful since the semantics of those intrinsics do not in any way depend on the rounding mode. In similar cases, other constrained intrinsics do not have the rounding mode argument. Remove it here as well. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D71218
* [OPENMP50]Add parsing/sema analysis for nontemporal clause.Alexey Bataev2019-12-1742-66/+1587
| | | | | Add basic support for parsing/sema analysis of the nontemporal clause in simd-based directives.
* [LIBOPENMP][NVPTX]Fix the build error in the runtime.Alexey Bataev2019-12-171-1/+1
|
* [Attributor] H2S fix.Stefan Stipanovic2019-12-172-6/+18
| | | | | | | | | | Summary: Fixing issues that were noticed in D71521 Reviewers: jdoerfert, lebedev.ri, uenoku Subscribers: Differential Revision: https://reviews.llvm.org/D71564
OpenPOWER on IntegriCloud