summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Syntax] Assert invariants on tree structure and fix a bug in mutationsIlya Biryukov2020-01-145-9/+62
| | | | | | | | Add checks for some structural invariants when building and mutating the syntax trees. Fix a bug failing the invariants after mutations: the parent of nodes added into the tree was null.
* [clang-tidy] Match InitListExpr in modernize-use-default-member-initMalcolm Parsons2020-01-142-33/+33
| | | | | | | | | | | | | | | | | | Summary: modernize-use-default-member-init wasn't warning about redundant initialisers when the initialiser was an InitListExpr. Add initListExpr to the matcher. Fixes: PR44439 Reviewers: aaron.ballman, alexfh, JonasToth Reviewed By: aaron.ballman Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72691
* Revert "[DBG][LIVEDEBUGVALUES][NFC] Add Targeted LiveDebugValues Behaviour ↵Tom Weaver2020-01-1422-1546/+0
| | | | | | Tests." This reverts commit 35787e3a062a4a21c145137552d20cb1169c74fc.
* [AArch64] Fix save register pairing for Windows AAPCSSanne Wouda2020-01-142-4/+51
| | | | | | | | | | | | | | | | | | | | | | Summary: On Windows, when a function does not have an unwind table (for example, EH filtering funclets), we don't correctly pair FP and LR to form the frame record in all circumstances. Fix this by invalidating a pair when the second register is FP when compiling for Windows, even when CFI is not needed. Fixes PR44271 introduced by D65653. Reviewers: efriedma, sdesmalen, rovka, rengolin, t.p.northover, thegameg, greened Reviewed By: rengolin Subscribers: kristof.beyls, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71754
* Revert "Recommit "[GlobalOpt] Pass DTU to removeUnreachableBlocks instead of ↵Florian Hahn2020-01-141-3/+7
| | | | | | | | | | | recomputing."" This reverts commit a03d7b0f24b65d69721dbbbc871df0629efcf774. As discussed in D68298, this causes a compile-time regression, in case the DTs requested are not used elsewhere in GlobalOpt. We should only get the DTs if they are available here, but this seems not possible with the legacy pass manager from a module pass.
* [OpenCL] Add MSAA sharing extension builtin functionsSven van Haastregt2020-01-141-0/+37
| | | | | | | Add the MSAA sharing builtin functions from the OpenCL Extension Specification. Patch by Pierre Gondois and Sven van Haastregt.
* [DBG][LIVEDEBUGVALUES][NFC] Add Targeted LiveDebugValues Behaviour Tests.Tom Weaver2020-01-1422-0/+1546
| | | | | | | | | Adds 22 distinct tests that exercise the live-debug-values passes expected behaviour. reviewers: aprantl, vsk Differential revision: https://reviews.llvm.org/D72515
* [AIX] ExternalSymbolSDNode loweringXiangling Liao2020-01-143-24/+250
| | | | | | | | For memcpy/memset/memmove etc., replace ExternalSymbolSDNode with a MCSymbolSDNode, which have a prefix dot before function name as entry point symbol. Differential Revision: https://reviews.llvm.org/D70718
* [lldb/DWARF] Move location list sections into DWARFContextPavel Labath2020-01-1412-19/+70
| | | | | | These are the last sections not managed by the DWARFContext object. I also introduce separate SectionType enums for dwo section variants, as this is necessary for proper handling of single-file split dwarf.
* [llvm-readobj][llvm-readelf][test] - Add a few more dynamic section tests.Georgii Rymar2020-01-142-196/+716
| | | | | | | | | | | | This adds a few more tests for dynamic section. We only had tests for simple unknown values for 64-bits target, in this patch I've added OS specific and processor specific tags. Also it tests both 32 and 64-bits targets now. It will help to fix the formatting issues we have and diagnose a possible new ones. Differential revision: https://reviews.llvm.org/D71896
* Fix "pointer is null" static analyzer warning. NFCI.Simon Pilgrim2020-01-141-1/+2
| | | | Remove Ctx null test as clang static analyzer assumes that this can fail - replace it with an assertion as the pointer is always dereferenced below.
* Fix "pointer is null" static analyzer warnings. NFCI.Simon Pilgrim2020-01-141-1/+1
| | | | Use cast<> instead of cast_or_null<> since the pointers are always dereferenced and cast<> will perform the null assertion for us.
* Remove duplicate variable. NFCI.Simon Pilgrim2020-01-141-1/+0
|
* Merge isa<> and getAs<> calls to fix "pointer is null" static analyzer ↵Simon Pilgrim2020-01-141-6/+5
| | | | warnings. NFCI.
* Fix "pointer is null" static analyzer warnings. NFCI.Simon Pilgrim2020-01-141-4/+2
| | | | Use castAs<> instead of getAs<> since the pointer is dereferenced immediately below and castAs will perform the null assertion for us.
* Fix "null pointer passed to nonnull argument" clang static analyzer ↵Simon Pilgrim2020-01-141-3/+3
| | | | | | warnings. NFCI. Assert that the memcpy arguments are valid.
* Expression eval lookup speedup by not returning methods in ↵Levon Ter-Grigoryan2020-01-144-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | ManualDWARFIndex::GetFunctions Summary: This change is connected with https://reviews.llvm.org/D69843 In large codebases, we sometimes see Module::FindFunctions (when called from ClangExpressionDeclMap::FindExternalVisibleDecls) returning huge amounts of functions. In current fix I trying to return only function_fullnames from ManualDWARFIndex::GetFunctions when eFunctionNameTypeFull is passed as argument. Reviewers: labath, jarin, aprantl Reviewed By: labath Subscribers: shafik, clayborg, teemperor, arphaman, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70846
* AArch64: fix bitcode upgrade of @llvm.neon.addp.Tim Northover2020-01-143-4/+21
| | | | | | | | We were upgrading it to faddp, but a version taking two type parameters instead of one. This then got upgraded a second time to the version with just one parameter, but occasionally (for reasons I don't understand) this unusual two-stage process corrupted a use-list, leading to a crash when the two faddp declarations didn't match.
* [InstSimplify] add tests for vector select; NFCSanjay Patel2020-01-142-12/+29
|
* [TableGen] Update editor modes for new keywords.Simon Tatham2020-01-144-3/+8
| | | | | | | | | | | | | | | | | | | | Summary: D71407 and D71474 added new keywords to the Tablegen language: `defvar`, `if`, `then` and `else`. This commit updates the various editor modes to highlight them appropriately. Some of the modes also didn't include `defset`, so I've added that too while I was there. Reviewers: MaskRay, lebedev.ri, plotfi Reviewed By: lebedev.ri Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72693
* [lldb][NFC] Make name parameter in AddMethodToCXXRecordType a StringRefRaphael Isemann2020-01-142-14/+11
|
* [FPEnv] Add some comments to IRBuilder.hUlrich Weigand2020-01-141-0/+6
| | | | | As requested via post-commit comment for D71467, this adds comments documenting CreateFCmp vs. CreateFCmpS to the header file.
* [RISCV][NFC] Deduplicate Atomic Intrinsic DefinitionsSam Elliott2020-01-141-45/+45
| | | | | | | | | | | | | | | | | Summary: This is a slight cleanup, to use multiclasses to avoid the duplication between the different atomic intrinsic definitions. The produced intrinsics are unchanged, they're just generated in a more succinct way. Reviewers: asb, luismarques, jrtc27 Reviewed By: luismarques, jrtc27 Subscribers: Jim, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, jfb, PkmX, jocewei, psnobl, benna, s.egerton, pzheng, sameer.abuasal, apazos, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71777
* [FPEnv] Fix chain handling regression after 04a8696Ulrich Weigand2020-01-143-37/+92
| | | | | | | | | | | | | | | | | | | Code in getRoot made the assumption that every node in PendingLoads must always itself have a dependency on the current DAG root node. After the changes in 04a8696, it turns out that this assumption no longer holds true, causing wrong codegen in some cases (e.g. stores after constrained FP intrinsics might get deleted). To fix this, we now need to make sure that the TokenFactor created by getRoot always includes the previous root, if there is no implicit dependency already present. The original getControlRoot code already has exactly this check, so this patch simply reuses that code now for getRoot as well. This fixes the regression. NFC if no constrained FP intrinsic is present.
* Make helper functions static or move them into anonymous namespaces. NFC.Benjamin Kramer2020-01-1435-93/+134
|
* [unittests] Fix "comparison of integers of different signs" warningsMiloš Stojanović2020-01-142-6/+5
| | | | | | | | A warning is sent because `std::distance()` returns a signed type so `CmpHelperEQ()` gets instantiated into a function that compares differently signed arguments. Differential Revision: https://reviews.llvm.org/D72632
* [ARM,MVE] Use the new Tablegen `defvar` and `if` statements.Simon Tatham2020-01-142-284/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This cleans up a lot of ugly `foreach` bodges that I've been using to work around the lack of those two language features. Now they both exist, I can make then all into something more legible! In particular, in the common pattern in `ARMInstrMVE.td` where a multiclass defines an `Instruction` instance plus one or more `Pat` that select it, I've used a `defvar` to wrap `!cast<Instruction>(NAME)` so that the patterns themselves become a little more legible. Replacing a `foreach` with a `defvar` removes a level of block structure, so several pieces of code have their indentation changed by this patch. Best viewed with whitespace ignored. NFC: the output of `llvm-tblgen -print-records` on the two affected Tablegen sources is exactly identical before and after this change, so there should be no effect at all on any of the other generated files. Reviewers: MarkMurrayARM, miyuki Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, hiraditya, dmgreen, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D72690
* [lldb/Expression] Improve interpreter error message with a non-running targetMed Ismail Bennani2020-01-142-6/+7
| | | | | | | | | | | | | | | | | | When trying to interpret an expression with a function call, if the process hasn't been launched, the expression fails to be interpreted and the user gets the following error message: ```error: Can't run the expression locally``` This message doesn't explain why the expression failed to be interpreted, that's why this patch improves the error message that is displayed when trying to run an expression while no process is running. rdar://11991708 Differential Revision: https://reviews.llvm.org/D72510 Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
* [ARM][LowOverheadLoops] Allow all MVE instrs.Sam Parker2020-01-144-23/+512
| | | | | | | | | | | | | | We have a whitelist of instructions that we allow when tail predicating, since these are trivial ones that we've deemed need no special handling. Now change ARMLowOverheadLoops to allow the non-trivial instructions if they're contained within a valid VPT block. Since a valid block is one that is predicated upon the VCTP so we know that these non-trivial instructions will still behave as expected once the implicit predication is used instead. This also fixes a previous test failure. Differential Revision: https://reviews.llvm.org/D72509
* Fix "MIParser::getIRValue(unsigned int)’ defined but not used" warning. NFCI.Simon Pilgrim2020-01-141-6/+0
|
* [SelectionDAG] ComputeKnownBits - merge getValidMinimumShiftAmountConstant() ↵Simon Pilgrim2020-01-142-13/+14
| | | | | | and generic ISD::SHL handling. As mentioned by @nikic on rGef5debac4302, we can merge the guaranteed bottom zero bits from the shifted value, and then, if a min shift amount is known, zero out the bottom bits as well.
* [ARM][LowOverheadLoops] Change predicate inspectionSam Parker2020-01-142-26/+257
| | | | | | | | | | Use the already provided helper function to get the operand type so that we can detect whether the vpr is being used as a predicate or not. Also use existing helpers to get the predicate indices when we converting the vpt blocks. This enables us to support both types of vpr predicate operand. Differential Revision: https://reviews.llvm.org/D72504
* [ARM][Thumb2] Fix ADD/SUB invalid writes to SPDiogo Sampaio2020-01-1426-148/+749
| | | | | | | | | | | | | | | | | | | | Summary: This patch fixes pr23772 [ARM] r226200 can emit illegal thumb2 instruction: "sub sp, r12, #80". The violation was that SUB and ADD (reg, immediate) instructions can only write to SP if the source register is also SP. So the above instructions was unpredictable. To enforce that the instruction t2(ADD|SUB)ri does not write to SP we now enforce the destination register to be rGPR (That exclude PC and SP). Different than the ARM specification, that defines one instruction that can read from SP, and one that can't, here we inserted one that can't write to SP, and other that can only write to SP as to reuse most of the hard-coded size optimizations. When performing this change, it uncovered that emitting Thumb2 Reg plus Immediate could not emit all variants of ADD SP, SP #imm instructions before so it was refactored to be able to. (see test/CodeGen/Thumb2/mve-stacksplot.mir where we use a subw sp, sp, Imm12 variant ) It also uncovered a disassembly issue of adr.w instructions, that were only written as SUBW instructions (see llvm/test/MC/Disassembler/ARM/thumb2.txt). Reviewers: eli.friedman, dmgreen, carwil, olista01, efriedma, andreadb Reviewed By: efriedma Subscribers: gbedwell, john.brawn, efriedma, ostannard, kristof.beyls, hiraditya, dmgreen, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70680
* [X86][SSE] Add add(shl(and(x,c1),c2),c3) test case with non-uniform shift valueSimon Pilgrim2020-01-141-0/+37
| | | | As mentioned by @nikic on rGef5debac4302, we should merge the guaranteed top zero bits from the shifted value and min shift amount code so they can both set the high bits to zero.
* [SelectionDAG] ComputeKnownBits - merge getValidMinimumShiftAmountConstant() ↵Simon Pilgrim2020-01-143-14/+12
| | | | | | | | and generic ISD::SRL handling. As mentioned by @nikic on rGef5debac4302 (although that was just about SHL), we can merge the guaranteed top zero bits from the shifted value, and then, if a min shift amount is known, zero out the top bits as well. SHL tests / handling will be added in a follow up patch.
* [ARM][MVE] Disallow VPSEL for tail predicationSam Parker2020-01-147-4/+1199
| | | | | | | | | | | | | | | | | | | Due to the current way that we collect predicated instructions, we can't easily handle vpsel in tail predicated loops. There are a couple of issues: 1) It will use the VPR as a predicate operand, but doesn't have to be instead a VPT block, which means we can assert while building up the VPT block because we don't find another VPST to being a new one. 2) VPSEL still requires a VPR operand even after tail predicating, which means we can't remove it unless there is another instruction, such as vcmp, that can provide the VPR def. The first issue should be a relatively simple fix in the logic of the LowOverheadLoops pass, whereas the second will require us to represent the 'implicit' tail predication with an explicit value. Differential Revision: https://reviews.llvm.org/D72629
* [mlir] Fix translation of splat constants to LLVM IRAlex Zinenko2020-01-142-1/+36
| | | | | | | | | | | | | | | | Summary: When converting splat constants for nested sequential LLVM IR types wrapped in MLIR, the constant conversion was erroneously assuming it was always possible to recursively construct a constant of a sequential type given only one value. Instead, wait until all sequential types are unpacked recursively before constructing a scalar constant and wrapping it into the surrounding sequential type. Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72688
* [RISCV] Fix ILP32D lowering for double+double/double+int return typesJames Clarke2020-01-142-5/+39
| | | | | | | | | | | | | | | | | | Summary: Previously, since these aggregates are > 2*XLen, Clang would think they were being returned indirectly and thus would decrease the number of available GPRs available by 1. For long argument lists this could lead to a struct argument incorrectly being passed indirectly. Reviewers: asb, lenary Reviewed By: asb, lenary Subscribers: luismarques, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, sameer.abuasal, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69590
* [mlir] Create a gpu.module operation for the GPU Dialect.Tres Popp2020-01-1424-140/+235
| | | | | | | | | | | | | | | | | Summary: This is based on the use of code constantly checking for an attribute on a model and instead represents the distinct operaion with a different op. Instead, this op can be used to provide better filtering. Reviewers: herhut, mravishankar, antiagainst, rriddle Reviewed By: herhut, antiagainst, rriddle Subscribers: liufengdb, aartbik, jholewinski, mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72336
* [lldb][NFC] Cleanup ClangASTContext::CompleteTagDeclarationDefinitionRaphael Isemann2020-01-141-57/+52
| | | | | | | | | Makes this function exit early instead of nesting if statements. Also removed all the if (tag_type->getDecl()) checks. If we created a TagType with a nullptr as a Decl then Clang would have already deferenced that nullptr during TagType creation so there is no point in gracefully handling a nullptr here.
* [mlir] Ran git-clang-format.Adrian2020-01-141-2/+2
| | | | | Summary: I forgot to ran git-clang-format before committing.
* [mlir] Add loop.parallel, loop.reduce and loop.reduce.return operations.Adrian Kuegel2020-01-144-4/+536
| | | | | | | | | | Summary: These operations can be used to specify a loop nest with a body that can contain reductions. The iteration space can be iterated in any order. RFC: https://groups.google.com/a/tensorflow.org/d/topic/mlir/pwtSgiKFPis/discussion Differential Revision: https://reviews.llvm.org/D72394
* [ARM][MVE] Masked gathers from base + vector of offsetsAnna Welker2020-01-148-121/+1138
| | | | | | | | Enables the masked gather pass to create a masked gather loading from a base and vector of offsets. This also enables v8i16 and v16i8 gather loads. Differential Revision: https://reviews.llvm.org/D72330
* [Target] Fix uninitialized value in 10c11e4e2d05cf0e8f8251f50d84ce77eb1e9b8dSam McCall2020-01-141-1/+1
|
* [TableGen] Introduce an if/then/else statement.Simon Tatham2020-01-147-13/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This allows you to make some of the defs in a multiclass or `foreach` conditional on an expression computed from the parameters or iteration variables. It was already possible to simulate an if statement using a `foreach` with a dummy iteration variable and a list constructed using `!if` so that it had length 0 or 1 depending on the condition, e.g. foreach unusedIterationVar = !if(condition, [1], []<int>) in { ... } But this syntax is nicer to read, and also more convenient because it allows an else clause. To avoid upheaval in the implementation, I've implemented `if` as pure syntactic sugar on the `foreach` implementation: internally, `ParseIf` actually does construct exactly the kind of foreach shown above (and another reversed one for the else clause if present). Reviewers: nhaehnle, hfinkel Reviewed By: hfinkel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71474
* [TableGen] Introduce a `defvar` statement.Simon Tatham2020-01-146-10/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This allows you to define a global or local variable to an arbitrary value, and refer to it in subsequent definitions. The main use I anticipate for this is if you have to compute some difficult function of the parameters of a multiclass, and then use it many times. For example: multiclass Foo<int i, string s> { defvar op = !cast<BaseClass>("whatnot_" # s # "_" # i); def myRecord { dag a = (op this, (op that, the other), (op x, y, z)); int b = op.subfield; } def myOtherRecord<"template params including", op>; } There are a couple of ways to do this already, but they're not really satisfactory. You can replace `defvar x = y` with a loop over a singleton list, `foreach x = [y] in { ... }` - but that's unintuitive to someone who hasn't seen that workaround idiom before, and requires an extra pair of braces that you often didn't really want. Or you can define a nested pair of multiclasses, with the inner one taking `x` as a template parameter, and the outer one instantiating it just once with the desired value of `x` computed from its other parameters - but that makes it awkward to sequentially compute each value based on the previous ones. I think `defvar` makes things considerably easier. You can also use `defvar` at the top level, where it inserts globals into the same map used by `defset`. That allows you to define global constants without having to make a dummy record for them to live in: defvar MAX_BUFSIZE = 512; // previously: // def Dummy { int MAX_BUFSIZE = 512; } // and then refer to Dummy.MAX_BUFSIZE everywhere Reviewers: nhaehnle, hfinkel Reviewed By: hfinkel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71407
* [clang-tidy] Ignore implicit casts in modernize-use-default-member-initMalcolm Parsons2020-01-142-5/+5
| | | | | | | | | | | | | | | | | | Summary: Initialising a pointer from nullptr involves an implicit cast. Ignore it after getting initialiser from InitListExpr. Fixes: PR44440 Reviewers: aaron.ballman, alexfh, JonasToth Reviewed By: JonasToth Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72630
* [llvm-readobj][test] - Fix grammar in comments.Georgii Rymar2020-01-142-2/+2
| | | | This addresses post commit review comments for D71766.
* [AMDGPU] Model distance to instruction in bundleStanislav Mekhanoshin2020-01-142-5/+61
| | | | | | | This change allows to model the height of the instruction within a bundle for latency adjustment purposes. Differential Revision: https://reviews.llvm.org/D72669
* [libcxx] [test] Add casts to avoid signed/unsigned mismatch warnings on MSVC++Billy Robert O'Neal III2020-01-143-3/+3
| | | | A bug was filed that these warnings should not be emitted as DevCom-883961. ( https://developercommunity.visualstudio.com/content/problem/883961/c4389-signedunsigned-mismatch-should-not-be-emitte.html )
OpenPOWER on IntegriCloud