summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Update SSE1 MOVLPSrm and MOVHPSrm isel patterns to ensure loads are ↵Craig Topper2019-07-051-2/+3
| | | | | | | | | | | non-volatile before folding. These patterns use 128-bit loads, but the instructions only load 64-bits. We shouldn't narrow the load if its volatile. Fixes another variant of PR42079 llvm-svn: 365225
* [X86] Remove unnecessary isel pattern for MOVLPSmr.Craig Topper2019-07-051-5/+0
| | | | | | | | | This was identical to a pattern for MOVPQI2QImr with a bitcast as an input. But we should be able to turn MOVPQI2QImr into MOVLPSmr in the execution domain fixup pass so we shouldn't need this. llvm-svn: 365224
* [NFC] A test commit to check the access permission. Removed a blank line.Christudasan Devadasan2019-07-051-1/+0
| | | | llvm-svn: 365223
* [libc++] Do not cleverly link against libc++abi just because it happens to ↵Louis Dionne2019-07-052-14/+1
| | | | | | | | | | | | | | | | | | | | | | be there Summary: Otherwise, when libcxxabi is not an enabled project in the monorepo, we get a link error because we try to link against non-existent cxxabi_shared. More generally, we shouldn't change the behavior of the build based on implicit things like whether a file happens to be at a specific path or not. Reviewers: EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D63883 llvm-svn: 365222
* [docs][llvm-readobj] Add a note to options that do nothing in GNU outputJames Henderson2019-07-052-4/+10
| | | | | | | | | | --section-data, --section-relocations and --section-symbols have no effect for GNU style ouput. This patch changes the docs to point this out, as it has caught me out on a couple of occasions. See also https://bugs.llvm.org/show_bug.cgi?id=42522. llvm-svn: 365221
* [FileCheck] Share variable instance among usesThomas Preud'homme2019-07-053-45/+61
| | | | | | | | | | | | | | | | | | | | Summary: This patch changes expression support to use one instance of FileCheckNumericVariable per numeric variable rather than one per variable and per definition. The current system was only necessary for the last patch of the numeric expression support patch series in order to handle a line using a variable defined earlier on the same line from the input text. However this can be dealt more efficiently. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64229 llvm-svn: 365220
* [FileCheck] Don't diagnose undef vars at parse timeThomas Preud'homme2019-07-053-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Diagnosing use of undefined variables takes place in parseNumericVariableUse() and printSubstitutions() for numeric variables but only takes place in printSubstitutions() for string variables. The reason for the split location of diagnostics is that parsing is not aware of the clearing of variables due to --enable-var-scope and thus use of variables cleared in this way can only be catched by printSubstitutions(). Beyond the code level inconsistency, there is also a user facing inconsistency since diagnostics look different between the two functions. While the diagnostic in printSubstitutions is more verbose, doing the diagnostic there allows to diagnose all undefined variables rather than just the first one and error out. This patch create dummy variable definition when encountering a use of undefined variable so that parsing can proceed and be diagnosed by printSubstitutions() later. Tests that were testing whether parsing fails in such case are thus modified accordingly. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64228 llvm-svn: 365219
* [pstl] Add missing includesLouis Dionne2019-07-0515-1/+24
| | | | llvm-svn: 365218
* [AMDGPU] Added a new metadata for multi grid sync implicit argumentYaxun Liu2019-07-059-6/+1118
| | | | | | | | Patch by Christudasan Devadasan. Differential Revision: https://reviews.llvm.org/D63886 llvm-svn: 365217
* ScheduleDAG: Fix incorrectly killing registers in bundlesMatt Arsenault2019-07-052-6/+47
| | | | | | | | | | When looking for uses/defs to add kill flags, the iterator was double incremented, skipping the first instruction in the bundle. The use register in the first bundle instruction was then incorrectly killed. The "First" instruction should be the BUNDLE itself as the proper reverse iterator endpoint. llvm-svn: 365216
* [ThinLTO] Attempt to recommit r365188 after alignment fixEugene Leviant2019-07-0528-192/+595
| | | | llvm-svn: 365215
* [ARM] MVE patterns for VMVN, VORR and VBICDavid Green2019-07-052-0/+118
| | | | | | | | This add simple Q register forms of bitwise not instructions. Differential Revision: https://reviews.llvm.org/D63983 llvm-svn: 365214
* gn build: Merge r365203Nico Weber2019-07-051-0/+1
| | | | llvm-svn: 365213
* Add a comment explaining why a function existsNico Weber2019-07-051-0/+3
| | | | llvm-svn: 365212
* [AMDGPU] DPP combiner: recognize identities for more opcodesJay Foad2019-07-052-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This allows the DPP combiner to kick in more often. For example the exclusive scan generated by the atomic optimizer for a divergent atomic add used to look like this: v_mov_b32_e32 v3, v1 v_mov_b32_e32 v5, v1 v_mov_b32_e32 v6, v1 v_mov_b32_dpp v3, v2 wave_shr:1 row_mask:0xf bank_mask:0xf s_nop 1 v_add_u32_dpp v4, v3, v3 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:0 v_mov_b32_dpp v5, v3 row_shr:2 row_mask:0xf bank_mask:0xf v_mov_b32_dpp v6, v3 row_shr:3 row_mask:0xf bank_mask:0xf v_add3_u32 v3, v4, v5, v6 v_mov_b32_e32 v4, v1 s_nop 1 v_mov_b32_dpp v4, v3 row_shr:4 row_mask:0xf bank_mask:0xe v_add_u32_e32 v3, v3, v4 v_mov_b32_e32 v4, v1 s_nop 1 v_mov_b32_dpp v4, v3 row_shr:8 row_mask:0xf bank_mask:0xc v_add_u32_e32 v3, v3, v4 v_mov_b32_e32 v4, v1 s_nop 1 v_mov_b32_dpp v4, v3 row_bcast:15 row_mask:0xa bank_mask:0xf v_add_u32_e32 v3, v3, v4 s_nop 1 v_mov_b32_dpp v1, v3 row_bcast:31 row_mask:0xc bank_mask:0xf v_add_u32_e32 v1, v3, v1 v_add_u32_e32 v1, v2, v1 v_readlane_b32 s0, v1, 63 But now most of the dpp movs are combined into adds: v_mov_b32_e32 v3, v1 v_mov_b32_e32 v5, v1 s_nop 0 v_mov_b32_dpp v3, v2 wave_shr:1 row_mask:0xf bank_mask:0xf s_nop 1 v_add_u32_dpp v4, v3, v3 row_shr:1 row_mask:0xf bank_mask:0xf bound_ctrl:0 v_mov_b32_dpp v5, v3 row_shr:2 row_mask:0xf bank_mask:0xf v_mov_b32_dpp v1, v3 row_shr:3 row_mask:0xf bank_mask:0xf v_add3_u32 v1, v4, v5, v1 s_nop 1 v_add_u32_dpp v1, v1, v1 row_shr:4 row_mask:0xf bank_mask:0xe s_nop 1 v_add_u32_dpp v1, v1, v1 row_shr:8 row_mask:0xf bank_mask:0xc s_nop 1 v_add_u32_dpp v1, v1, v1 row_bcast:15 row_mask:0xa bank_mask:0xf s_nop 1 v_add_u32_dpp v1, v1, v1 row_bcast:31 row_mask:0xc bank_mask:0xf v_add_u32_e32 v1, v2, v1 v_readlane_b32 s0, v1, 63 Reviewers: arsenm, vpykhtin Subscribers: kzhuravl, nemanjai, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kbarton, MaskRay, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64207 llvm-svn: 365211
* NFC: Add an explicit return for safety and consistencyHamza Sood2019-07-051-0/+2
| | | | | | | This case implicitly falls-through, which is fine now as it's at the end of the function, but it seems like an accident waiting to happen. llvm-svn: 365210
* Removed the test case added in D63538 due to windows buildbot failuresKristof Umann2019-07-051-38/+0
| | | | llvm-svn: 365209
* [analyzer] Add a debug analyzer config to place an event for each tracked ↵Kristof Umann2019-07-055-7/+68
| | | | | | | | condition Differential Revision: https://reviews.llvm.org/D63642 llvm-svn: 365208
* [analyzer] Track terminator conditions on which a tracked expression dependsKristof Umann2019-07-055-1/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a major part of my GSoC project, aimed to improve the bug reports of the analyzer. TL;DR: Help the analyzer understand that some conditions are important, and should be explained better. If an CFGBlock is a control dependency of a block where an expression value is tracked, explain the condition expression better by tracking it. if (A) // let's explain why we believe A to be true 10 / x; // division by zero This is an experimental feature, and can be enabled by the off-by-default analyzer configuration "track-conditions". In detail: This idea was inspired by the program slicing algorithm. Essentially, two things are used to produce a program slice (a subset of the program relevant to a (statement, variable) pair): data and control dependencies. The bug path (the linear path in the ExplodedGraph that leads from the beginning of the analysis to the error node) enables to analyzer to argue about data dependencies with relative ease. Control dependencies are a different slice of the cake entirely. Just because we reached a branch during symbolic execution, it doesn't mean that that particular branch has any effect on whether the bug would've occured. This means that we can't simply rely on the bug path to gather control dependencies. In previous patches, LLVM's IDFCalculator, which works on a control flow graph rather than the ExplodedGraph was generalized to solve this issue. We use this information to heuristically guess that the value of a tracked expression depends greatly on it's control dependencies, and start tracking them as well. After plenty of evaluations this was seen as great idea, but still lacking refinements (we should have different descriptions about a conditions value), hence it's off-by-default. Differential Revision: https://reviews.llvm.org/D62883 llvm-svn: 365207
* Reverted r365188 due to alignment problems on i686-androidEugene Leviant2019-07-0528-594/+191
| | | | llvm-svn: 365206
* [clangd] Added highlighting for variable references (declrefs)Johan Vikstrom2019-07-052-24/+59
| | | | | | | | | | | | | | Summary: Added highlighting for variable references using VisitDeclRefExpr. Reviewers: hokein, sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64199 llvm-svn: 365205
* [clangd] Deduplicate clang-tidy diagnostic messages.Haojian Wu2019-07-054-230/+48
| | | | | | | | | | | | | | | | | | | | Summary: Clang-tidy checks may emit duplicated messages (clang-tidy tool deduplicate them in its custom diagnostic consumer), and we may show multiple duplicated diagnostics in the UI, which is really bad. This patch makes clangd do the deduplication, and revert the change rL363889. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64127 llvm-svn: 365204
* Scalable Vector IR Type with further LTO fixesGraham Hunter2019-07-0520-39/+397
| | | | | | | | | | | | | | | | | Reintroduces the scalable vector IR type from D32530, after it was reverted a couple of times due to increasing chromium LTO build times. This latest incarnation removes the walk over aggregate types from the verifier entirely, in favor of rejecting scalable vectors in the isValidElementType methods in ArrayType and StructType. This removes the 70% degradation observed with the second repro tarball from PR42210. Reviewers: thakis, hans, rengolin, sdesmalen Reviewed By: sdesmalen Differential Revision: https://reviews.llvm.org/D64079 llvm-svn: 365203
* This reverts r365061 and r365062 (test update)Robert Lougher2019-07-054-189/+12
| | | | | | | | Revision r365061 changed a skip of debug instructions for a skip of meta instructions. This is not safe, as IMPLICIT_DEF is classed as a meta instruction. llvm-svn: 365202
* [RISCV] Support @llvm.readcyclecounter() IntrinsicSam Elliott2019-07-055-1/+135
| | | | | | | | | | | | | | | | | | | | | | | | On RISC-V, the `cycle` CSR holds a 64-bit count of the number of clock cycles executed by the core, from an arbitrary point in the past. This matches the intended semantics of `@llvm.readcyclecounter()`, which we currently leave to the default lowering (to the constant 0). With this patch, we will now correctly lower this intrinsic to the intended semantics, using the user-space instruction `rdcycle`. On 64-bit targets, we can directly lower to this instruction. On 32-bit targets, we need to do more, as `rdcycle` only returns the low 32-bits of the `cycle` CSR. In this case, we perform a custom lowering, based on the PowerPC lowering, using `rdcycleh` to obtain the high 32-bits of the `cycle` CSR. This custom lowering inserts a new basic block which detects overflow in the high 32-bits of the `cycle` CSR during reading (because multiple instructions are required to read). The emitted assembly matches the suggested assembly in the RISC-V specification. Differential Revision: https://reviews.llvm.org/D64125 llvm-svn: 365201
* lld, llvm-dlltool, llvm-lib: Use getAsString() instead of getSpelling() for ↵Nico Weber2019-07-058-17/+19
| | | | | | | | | | | | | | | printing unknown args Since OPT_UNKNOWN args never have any values and consist only of spelling (and are never aliased), this doesn't make any difference in practice, but it's more consistent with Arg's guidance to use getAsString() for diagnostics, and it matches what clang does. Also tweak two tests to use an unknown option that contains '=' for additional coverage while here. (The new tests pass fine with the old code too though.) llvm-svn: 365200
* Revert r365198 as this accidentally commited something thatRobert Lougher2019-07-056-1015/+191
| | | | | | should not have been added. llvm-svn: 365199
* This reverts r365061 and r365062 (test update)Robert Lougher2019-07-056-191/+1015
| | | | | | | | Revision r365061 changed a skip of debug instructions for a skip of meta instructions. This is not safe, as IMPLICIT_DEF is classed as a meta instruction. llvm-svn: 365198
* [analyzer][IDF] Add a control dependency calculator + a new debug checkerKristof Umann2019-07-057-28/+326
| | | | | | | | | | | | | | | | | | | | | | | I intend to improve the analyzer's bug reports by tracking condition expressions. 01 bool b = messyComputation(); 02 int i = 0; 03 if (b) // control dependency of the bug site, let's explain why we assume val 04 // to be true 05 10 / i; // warn: division by zero I'll detail this heuristic in the followup patch, strictly related to this one however: * Create the new ControlDependencyCalculator class that uses llvm::IDFCalculator to (lazily) calculate control dependencies for Clang's CFG. * A new debug checker debug.DumpControlDependencies is added for lit tests * Add unittests Differential Revision: https://reviews.llvm.org/D62619 llvm-svn: 365197
* [RISCV][NFC] Replace hard-coded CSR duplication with symbolic referencesSam Elliott2019-07-054-39/+36
| | | | | | | | | | | | | | | | Reviewers: asb, lenary Reviewed By: asb, lenary Subscribers: MaskRay, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64139 Patch by James Clarke (jrtc27) llvm-svn: 365195
* Fix MSVC/cppcheck Use::Next isn't initialized warning. NFCI.Simon Pilgrim2019-07-051-1/+1
| | | | llvm-svn: 365194
* [llvm-objcopy] Allow strip symtab from executables and DSOsEugene Leviant2019-07-059-89/+50
| | | | | | Differential revision: https://reviews.llvm.org/D61672 llvm-svn: 365193
* [FileCheck] Fix comment in parseNumericVariableUseThomas Preud'homme2019-07-051-6/+6
| | | | | | | | | | | | | | | | | | | | Summary: Comment explaining the interaction between parsing of numeric variable definition and uses in parseNumericVariableUse is stale since it suggests both use and definition parsing is done in the same function. This was the case in a previous version of the patch committed as 71d3f227a790d6cf39d8c6267940e0dc0c237e11 but is no longer the case. This patch updates the comment accordingly. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64227 llvm-svn: 365192
* [FileCheck] Factor some parsing checks outThomas Preud'homme2019-07-052-37/+16
| | | | | | | | | | | | | | | | | Summary: Both callers of parseNumericVariableDefinition() perform the same extra check that no character is found after the variable name. This patch factors out this check into parseNumericVariableDefinition(). Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64226 llvm-svn: 365191
* [FileCheck] Add missing final dot in commentThomas Preud'homme2019-07-051-1/+1
| | | | llvm-svn: 365190
* [NFC] Test commit accessEndre Fulop2019-07-051-1/+1
| | | | llvm-svn: 365189
* [ThinLTO] Attempt to recommit r365040 after caching fixEugene Leviant2019-07-0528-191/+594
| | | | | | | | | | | | | | It's possible that some function can load and store the same variable using the same constant expression: store %Derived* @foo, %Derived** bitcast (%Base** @bar to %Derived**) %42 = load %Derived*, %Derived** bitcast (%Base** @bar to %Derived**) The bitcast expression was mistakenly cached while processing loads, and never examined later when processing store. This caused @bar to be mistakenly treated as read-only variable. See load-store-caching.ll. llvm-svn: 365188
* [docs][llvm-objcopy] Improve some wording.James Henderson2019-07-051-4/+4
| | | | llvm-svn: 365187
* Make joined instances of JoinedOrSeparate flags point to the unaliased args, ↵Nico Weber2019-07-057-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | like all other arg types do This fixes an 8-year-old regression. r105763 made it so that aliases always refer to the unaliased option – but it missed the "joined" branch of JoinedOrSeparate flags. (r162231 then made the Args classes non-virtual, and r169344 moved them from clang to llvm.) Back then, there was no JoinedOrSeparate flag that was an alias, so it wasn't observable. Now /U in CLCompatOptions is a JoinedOrSeparate alias in clang, and warn_slash_u_filename incorrectly used the aliased arg id (using the unaliased one isn't really a regression since that warning checks if the undefined macro contains slash or backslash and only then emits the warning – and no valid use will pass "-Ufoo/bar" or similar). Also, lld has many JoinedOrSeparate aliases, and due to this bug it had to explicitly call `getUnaliasedOption()` in a bunch of places, even though that shouldn't be necessary by design. After this fix in Option, these calls really don't have an effect any more, so remove them. No intended behavior change. (I accidentally fixed this bug while working on PR29106 but then wondered why the warn_slash_u_filename broke. When I figured it out, I thought it would make sense to land this in a separate commit.) Differential Revision: https://reviews.llvm.org/D64156 llvm-svn: 365186
* gn build: Merge r365179Nico Weber2019-07-051-0/+1
| | | | llvm-svn: 365185
* [LLD][ELF] - Update a test after LLVM change.George Rimar2019-07-051-2/+2
| | | | | | Error reporting changed in r365183 llvm-svn: 365184
* [Object/ELF.h] - Improve error reporting.George Rimar2019-07-059-53/+129
| | | | | | | | | | | | | | | | | The errors coming from ELF.h are usually not very useful because they are uninformative. This patch is a first step to improve the situation. I tested this patch with a run of check-llvm and found that few messages are untested. In this patch, I did not add more tests but marked all such cases with a "TODO" comment. For all tested messages I extended the error text to provide more details (see test cases changed). Differential revision: https://reviews.llvm.org/D64014 llvm-svn: 365183
* lld-link: Make /debugtype: option work betterNico Weber2019-07-053-5/+19
| | | | | | | | | | | | | | | | | | | - The code tried to pass false to split()'s KeepEmpty parameter, but instead passed it to MaxSplit. As a result, it would never split on commas. This has been broken since the flag was added in r278056. - The code used getSpelling() for getting the argument's values, but getSpelling() always returns the `/debugtype:` prefix without any values. So if any /debugtype: flag was passed, it always resulted in an "unknown option:" warning. (The warning code then used the correct getValue() for printing the invalid option, so the warning looked kind of like it made sense.) This regressed in r342894. Slightly improve the test coverage of this feature (but since I don't know what this flag actually does, there's still no test for the correct semantics), and add a comment to getSpelling() explaining what it does. llvm-svn: 365182
* Fix a buildbot failure due to the AST's lifetime ending before the testKristof Umann2019-07-051-17/+3
| | | | llvm-svn: 365181
* [X86][SSE] LowerINSERT_VECTOR_ELT - early out for out of range indicesSimon Pilgrim2019-07-052-4/+27
| | | | | | Fixes OSS-Fuzz #15662 llvm-svn: 365180
* [analyzer][Dominators][NFC] Add unit testsKristof Umann2019-07-054-51/+174
| | | | | | Differential Revision: https://reviews.llvm.org/D62611 llvm-svn: 365179
* [ARM] MVE VMOV immediate handlingDavid Green2019-07-058-36/+386
| | | | | | | | | | | | | This adds some handling for VMOVimm, using the same method that NEON uses. We create VMOVIMM/VMVNIMM/VMOVFPIMM nodes based on the immediate, and select them using the now renamed ARMvmovImm/etc. There is also an extra 64bit immediate mode that I have not yet added here. Code by David Sherwood Differential Revision: https://reviews.llvm.org/D63884 llvm-svn: 365178
* [CFG] Add a new function to get the proper condition of a CFGBlockKristof Umann2019-07-053-0/+84
| | | | | | | | | | | | | getTerminatorCondition() returned a condition that may be outside of the block, while the new function returns the proper one: if (A && B && C) {} Return C instead of A && B && C. Differential Revision: https://reviews.llvm.org/D63538 llvm-svn: 365177
* [ARM] MVE fp to int conversionsDavid Green2019-07-053-0/+345
| | | | | | | | This adds the patterns needed for fptosi and sitofp. Differential Revision: https://reviews.llvm.org/D63729 llvm-svn: 365176
* [RISCV] Delete a ctor that is commented out. NFCFangrui Song2019-07-051-2/+0
| | | | llvm-svn: 365175
OpenPOWER on IntegriCloud