summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [mlir][Linalg] NFC - Hotfix GenericLoopNestBuilder compilation error ↵Nicolas Vasilache2020-01-031-4/+6
| | | | | | | | | | (-fpermissive) This should fix the error: ``` mlir/include/mlir/Dialect/Linalg/Utils/Utils.h:72:3: error: from definition of 'template<class LoopTy> mlir::edsc::GenericLoopNestRangeBuilder<LoopTy>::GenericLoopNestRangeBuilder(llvm::ArrayRef<mlir::edsc::ValueHandle*>, llvm::ArrayRef<mlir::Value>)' [-fpermissive] GenericLoopNestRangeBuilder(ArrayRef<edsc::ValueHandle *> ivs, ```
* Move tail call disabling code to target independent codeReid Kleckner2020-01-0312-43/+54
| | | | | | | | | | | | | | | | | When the "disable-tail-calls" attribute was added, checks were added for it in various backends. Now this code has proliferated, and it is something the target is responsible for checking. Move that responsibility back to the ISels (fast, global, and SD). There's no major functionality change, except for targets that never implemented this check. This LLVM attribute was originally added in d9699bc7bdf0362173fcd256690f61a4d47429c2 (2015). Reviewers: echristo, MaskRay Differential Revision: https://reviews.llvm.org/D72118
* Remove outdated svn/git information from hacking pageAlexander Lanin2020-01-031-24/+2
| | | | | | | | | The patch files section is redundant to https://llvm.org/docs/GettingStarted.html. There is nothing clang specific here. We are talking about a monorepo after all. While it may seem nice to have one single clang page which explains everything, it's not: It doesn't cover the topics in sufficient depth, it's redundant to other pages and it's hard to keep it up to date as we see with the svn instructions.
* [NFC][InstCombine] '(Op1 & С) - Op1' -> '-(Op1 & ~C)' fold (PR44427)Roman Lebedev2020-01-033-10/+19
| | | | | | | | | | | | | | | | | | | This decreases use count of Op1, potentially allows us to further hoist said 'neg' later on, and results in marginally better X86 codegen. Name: (Op1 & С) - Op1 -> -(Op1 & ~C) %o = and i64 %Op1, C1 %r = sub i64 %o, %Op1 => %n = and i64 %Op1, ~C1 %r = sub i64 0, %n https://rise4fun.com/Alive/rwgA https://godbolt.org/z/R_RMfM https://bugs.llvm.org/show_bug.cgi?id=44427
* [NFC][InstCombine] '(Op1 & С) - Op1' pattern tests (PR44427)Roman Lebedev2020-01-031-0/+98
|
* [NFC][InstCombine] Autogenerate and2.ll checklinesRoman Lebedev2020-01-031-19/+19
|
* [mlir][linalg] Lower linalg to affine loopsAhmed Taei2020-01-034-2/+94
| | | | | | | | | | | | Reviewers: nicolasvasilache Reviewed By: nicolasvasilache Subscribers: mgester, lucyrfox, merge_guards_bot, AlexEichenberger, mravishankar, ftynse, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D72094
* [mlir][Vector] NFC - Add documentation for the VectorOps dialect.Nicolas Vasilache2020-01-031-7/+486
|
* [DWARF] Don't assume optional always has a value.Jonas Devlieghere2020-01-031-1/+4
| | | | | | | | When getting the file name form the line table prologue we assume that a valid string form value can always be extracted as a string. If you look at the implementation of DWARFormValue this is not necessarily true. I hit this assertion from LLDB when I create a "dummy" DWARFContext that was missing the string section.
* [NFC][InstCombine] '(X & (- Y)) - X' -> '- (X & (Y - 1))' fold (PR44448)Roman Lebedev2020-01-032-12/+22
| | | | | | | | | | | | | | | | | | | | | Name: (X & (- Y)) - X -> - (X & (Y - 1)) (PR44448) %negy = sub i8 0, %y %unbiasedx = and i8 %negy, %x %r = sub i8 %unbiasedx, %x => %ymask = add i8 %y, -1 %xmasked = and i8 %ymask, %x %r = sub i8 0, %xmasked https://rise4fun.com/Alive/OIpla This decreases use count of %x, may allow us to later hoist said negation even further, and results in marginally nicer X86 codegen. See https://bugs.llvm.org/show_bug.cgi?id=44448 https://reviews.llvm.org/D71499
* [NFC][InstCombine] '(X & (- Y)) - X' pattern tests (PR44448)Roman Lebedev2020-01-031-0/+158
| | | | | As discussed in https://bugs.llvm.org/show_bug.cgi?id=44448, we can hoist negation out of the pattern.
* [AArch64][test] Merge arm64-$i.ll Linux tests into $i.llFangrui Song2020-01-039-1694/+64
| | | | | | Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D72061
* [clangd] targetDecl() returns only NamedDecls.Sam McCall2020-01-036-48/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: While it's perfectly reasonable for non-named decls such as static_assert to resolve to themselves: - nothing else ever resolves to them - features based on references (hover, highlight, find refs etc) tend to be uninteresting where only trivial references are possible - returning NamedDecl is a more convenient API (we cast to it in many places) - this aligns closer to findExplicitReferences/explicitReferenceTargets This fixes a crash in explicitReferenceTargets: if the target is a non-named decl then there's an invalid unchecked cast to NamedDecl. In practice this means when hovering over e.g. a static_assert: - before ac3f9e4842, we would show a (boring) hover card - after ac3f9e4842, we would crash - after this patch, we will show nothing Reviewers: kadircet, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72163
* [OPENMP]Fix crash on error message for declare reduction.Alexey Bataev2020-01-032-3/+4
| | | | | If the qualified reduction name is specified and not found, the compiler may crash because of not specified parameter.
* [clang-format/java] format multiple qualified annotations on one declaration ↵Nico Weber2020-01-032-1/+9
| | | | | | | | | | | | | | | | | | | | | better Before: class Foo { @CommandLineFlags .Add @Features.foo public void test() {} } Now: class Foo { @Features.foo @CommandLineFlags.Add public void test() { } } See also https://crbug.com/1034115
* [OpenMP] diagnose zero-length array section in the depend clauseKelvin Li2020-01-0316-20/+35
| | | | | | | The OpenMP specification disallows having zero-length array sections in the depend clause (OpenMP 5.0 2.17.11). Differential Revision: https://reviews.llvm.org/D71969
* [Attributor][FIX] Allow dead users of rewritten functionJohannes Doerfert2020-01-032-13/+70
| | | | | | | If we replace a function with a new one because we rewrite the signature, dead users may still refer to the old version. With this patch we reuse the code that deals with dead functions, which the old versions are, to avoid problems.
* [Attributor][NFC] Unify the way we delete dead functionsJohannes Doerfert2020-01-031-13/+14
|
* [Attributor][FIX] Don't crash on ptr2int/int2ptr instructionsJohannes Doerfert2020-01-032-1/+12
| | | | | An integer isn't allowed in getAlignmentForValue so we need to stop at a ptr2int instruction during exploration.
* [Attributor][FIX] Do not derive nonnull and dereferenceable w/o accessJohannes Doerfert2020-01-035-18/+23
| | | | | | | An inbounds GEP results in poison if the value is not "inbounds", not in UB. We accidentally derived nonnull and dereferenceable from these inbounds GEPs even in the absence of accesses that would make the poison to UB.
* [Attributor][FIX] Return CHANGED once a pessimistic fixpoint is reached.Johannes Doerfert2020-01-032-1/+51
|
* [Diagnostic] Fixed add ftabstop to -Wmisleading-indentationTyker2020-01-032-5/+121
| | | | | | | | | | | | | | | | | Summary: this allow much better support of codebases like the linux kernel that mix tabs and spaces. -ftabstop=//Width// allow specifying how large tabs are considered to be. Reviewers: xbolva00, aaron.ballman, rsmith Reviewed By: aaron.ballman Subscribers: mstorsjo, cfe-commits, jyknight, riccibruno, rsmith, nathanchance Tags: #clang Differential Revision: https://reviews.llvm.org/D71037
* AMDGPU/GlobalISel: Fix off by one in operand indexMatt Arsenault2020-01-034-120/+82
| | | | This should be looking at the RHS of the add for a constant.
* [DAGCombiner][X86][AArch64] Generalize `A-(A&B)`->`A&(~B)` fold (PR44448)Roman Lebedev2020-01-035-103/+138
| | | | | | | | | | | | | | | | | | | | | | | The fold 'A - (A & (B - 1))' -> 'A & (0 - B)' added in 8dab0a4a7d691f2704f1079538e0ef29548db159 is too specific. It should/can just be 'A - (A & B)' -> 'A & (~B)' Even if we don't manage to fold `~` into B, we have likely formed `ANDN` node. Also, this way there's less similar-but-duplicate folds. Name: X - (X & Y) -> X & (~Y) %o = and i32 %X, %Y %r = sub i32 %X, %o => %n = xor i32 %Y, -1 %r = and i32 %X, %n https://rise4fun.com/Alive/kOUl See https://bugs.llvm.org/show_bug.cgi?id=44448 https://reviews.llvm.org/D71499
* [NFC][X86][AArch64] Add 'A - (A & B)' pattern tests (PR44448)Roman Lebedev2020-01-032-0/+297
| | | | | | | | | | | | | | | | | | | The fold 'A - (A & (B - 1))' -> 'A & (0 - B)' added in 8dab0a4a7d691f2704f1079538e0ef29548db159 is too specific. It should just be 'A - (A & B)' -> 'A & (~B)' Name: X - (X & Y) -> X & (~Y) %o = and i32 %X, %Y %r = sub i32 %X, %o => %n = xor i32 %Y, -1 %r = and i32 %X, %n https://rise4fun.com/Alive/kOUl See https://bugs.llvm.org/show_bug.cgi?id=44448 https://reviews.llvm.org/D71499
* [NFC][X86] Add BMI runlines to align-down.ll testRoman Lebedev2020-01-031-2/+4
|
* [DAGCombiner] `~(add X, -1)` -> `neg X` foldRoman Lebedev2020-01-032-20/+24
| | | | | | | | | | | | | | | The fold 'A - (A & (B - 1))' -> 'A & (0 - B)' added in 8dab0a4a7d691f2704f1079538e0ef29548db159 is too specific. It should just be 'A - (A & B)' -> 'A & (~B)', but we currently fail to sink that '~' into `(B - 1)`. Name: ~(X - 1) -> (0 - X) %o = add i32 %X, -1 %r = xor i32 %o, -1 => %r = sub i32 0, %X https://rise4fun.com/Alive/rjU
* [NFC][DAGCombine][X86] '~(X - 1)' pattern testsRoman Lebedev2020-01-031-0/+120
| | | | | | | | | | | | | | | The fold 'A - (A & (B - 1))' -> 'A & (0 - B)' added in 8dab0a4a7d691f2704f1079538e0ef29548db159 is too specific. It should just be 'A - (A & B)' -> 'A & (~B)', but we currently fail to sink that '~' into `(B - 1)`. Name: ~(X - 1) -> (0 - X) %o = add i32 %X, -1 %r = xor i32 %o, -1 => %r = sub i32 0, %X https://rise4fun.com/Alive/rjU
* [DAGCombine][X86][Thumb2/LowOverheadLoops] `A - (A & C)` -> `A & (~C)` fold ↵Roman Lebedev2020-01-035-60/+43
| | | | | | | | | | | | | | | | | | | | | (PR44448) While we do manage to fold integer-typed IR in middle-end, we can't do that for the main motivational case of pointers. There is @llvm.ptrmask() intrinsic which may or may not be helpful, but i'm not sure it is fully considered canonical yet, not everything is fully aware of it likely. Name: PR44448 ptr - (ptr & C) -> ptr & (~C) %bias = and i32 %ptr, C %r = sub i32 %ptr, %bias => %r = and i32 %ptr, ~C See https://bugs.llvm.org/show_bug.cgi?id=44448 https://reviews.llvm.org/D71499
* [NFC][DAGCombine][X86] Tests for 'A - (A & C)' pattern (PR44448)Roman Lebedev2020-01-031-0/+169
| | | | | | | | | | | | | | | Name: PR44448 ptr - (ptr & C) -> ptr & (~C) %bias = and i32 %ptr, C %r = sub i32 %ptr, %bias => %r = and i32 %ptr, ~C The main motivational pattern involes pointer-typed values, so this transform can't really be done in middle-end. See https://bugs.llvm.org/show_bug.cgi?id=44448 https://reviews.llvm.org/D71499
* [NFC][DAGCombine] Clarify comment for 'A - (A & (B - 1))' foldRoman Lebedev2020-01-031-1/+1
|
* [ARM][NFC] Update MIR testSam Parker2020-01-031-23/+40
|
* Use llvm_canonicalize_cmake_booleans where intendedserge-sans-paille2020-01-032-4/+2
| | | | Differential Revision: https://reviews.llvm.org/D72130
* Fix compiler extension testingserge-sans-paille2020-01-032-1/+2
| | | | | | Correctly declare example dependency. Pipe stderr through FileCheck. Differential Revision: https://reviews.llvm.org/D72130
* Fix typo in compiler extension testingserge-sans-paille2020-01-033-3/+3
| | | | | | s/CHECK-/CHECK Differential Revision: https://reviews.llvm.org/D72130
* Fix for a dangling point bug in DeadStoreElimination passAnkit2020-01-032-17/+80
| | | | | | | | | | | | | | The patch makes sure that the LastThrowing pointer does not point to any instruction deleted by call to DeleteDeadInstruction. While iterating through the instructions the pass maintains a pointer to the lastThrowing Instruction. A call to deleteDeadInstruction deletes a dead store and other instructions feeding the original dead instruction which also become dead. The instruction pointed by the lastThrowing pointer could also be deleted by the call to DeleteDeadInstruction and thus it becomes a dangling pointer. Because of this, we see an error in the next iteration. In the patch, we maintain a list of throwing instructions encountered previously and use the last non deleted throwing instruction from the container. Reviewers: fhahn, bcahoon, efriedma Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D65326
* [InstCombine] replace undef elements in vector constant when doing icmp ↵Sanjay Patel2020-01-036-10/+27
| | | | | | | | | | | | | | folds (PR44383) As shown in P44383: https://bugs.llvm.org/show_bug.cgi?id=44383 ...we can't safely propagate a vector constant through this icmp fold if that vector constant contains undefined elements. We know that each defined element of the constant is safe though, so find the first of those and replicate it into the formerly undef lanes. Differential Revision: https://reviews.llvm.org/D72101
* Fix typo "psuedo" in commentsJay Foad2020-01-035-6/+6
|
* [TargetLowering] Remove comments referring to TLOFJay Foad2020-01-031-2/+0
| | | | | | These have been obsolete since about r221926, when TargetLoweringObjectFile was completely moved from TargetLowering to TargetMachine.
* [mlir][spirv] Fix shader ABI attribute prefix and add verificationLei Zhang2020-01-038-41/+219
| | | | | | | | | | This commit fixes shader ABI attributes to use `spv.` as the prefix so that they match the dialect's namespace. This enables us to add verification hooks in the SPIR-V dialect to verify them. Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D72062
* [test][ELF] Use CHECK-NEXT to properly verify error messagesJames Henderson2020-01-031-34/+36
| | | | | | Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D72092
* [DebugInfo] Remove redundant checks for past-the-end of prologueJames Henderson2020-01-032-35/+16
| | | | | | | | | | | | | | The V5 directory and filename tables had checks in to make sure we hadn't read past the end of the line table prologue. Since previous changes to the data extractor class ensure we never read past the end, these checks are now redundant, so this patch removes them. There is still a check to show that the whole prologue remains within the prologue length. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D71768
* [OpenCL] Add link to C++ for OpenCL documentationAnastasia Stulova2020-01-032-281/+36
| | | | | | | | | Remove description of language mode from the language extensions and add a link to pdf document. Tags: #clang Differential Revision: https://reviews.llvm.org/D72076
* [Syntax] Build spanning SimpleDecalration for classes, structs, etcIlya Biryukov2020-01-032-21/+70
| | | | | | | When they are free-standing, e.g. `struct X;` or `struct X {};`. Although this complicates the common case (of free-standing class declarations), this ensures the less common case (e.g. `struct X {} a;`) are handled uniformly and produce similar syntax trees.
* [test][llvm-dwarfdump] Use --implicit-check-not to simplify test checksJames Henderson2020-01-031-11/+5
| | | | | | | | | This removes the need to duplicate the LASTONLY check pattern and the last part of the NONFATAL pattern in the modified test. Reviewed By: MaskRay, JDevlieghere Differential Revision: https://reviews.llvm.org/D71757
* [test][llvm-dwarfdump] Normalise contents and checks for line tablesJames Henderson2020-01-032-60/+86
| | | | | | | | | | | | | The line tables in debug_line_malformed.s had contents that varied more than was necessary for the testing, making it harder to follow what was important. This patch normalises them so that they all share more-or-less the same body. Additionally, it makes the testing for what was printed more consistent, to show that the right parts of the line table prologue and body are/are not parsed and printed. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D71755
* [test][llvm-dwarfdump] Add missing checks for table dumpingJames Henderson2020-01-031-1/+15
| | | | | | | | | | | | | | | Some of the tables in debug_line_malformed.s were not being checked in the NONFATAL checks in debug_line_invalid.test (only the warnings coming from them were being checked). This made the test harder to follow. Additionally, a later change will change the way the errors are handled such that more of the line table will be printed. That will require checks for these tables (or something equivalent) so that the difference in behaviour can be observed. This patch adds checks for the three tables that were missing checks. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D71753
* [DAGCombine][X86][AArch64] 'A - (A & (B - 1))' -> 'A & (0 - B)' fold (PR44448)Roman Lebedev2020-01-033-55/+54
| | | | | | | | | | | | | | | | | | | | | | | While we do manage to fold integer-typed IR in middle-end, we can't do that for the main motivational case of pointers. There is @llvm.ptrmask() intrinsic which may or may not be helpful, but i'm not sure it is fully considered canonical yet, not everything is fully aware of it likely. https://rise4fun.com/Alive/ZVdp Name: ptr - (ptr & (alignment-1)) -> ptr & (0 - alignment) %mask = add i64 %alignment, -1 %bias = and i64 %ptr, %mask %r = sub i64 %ptr, %bias => %highbitmask = sub i64 0, %alignment %r = and i64 %ptr, %highbitmask See https://bugs.llvm.org/show_bug.cgi?id=44448 https://reviews.llvm.org/D71499
* [NFC][DAGCombine][X86][AArch64] Tests for 'A - (A & (B - 1))' pattern (PR44448)Roman Lebedev2020-01-032-0/+424
| | | | | | | | | | | | | | | | | | | https://rise4fun.com/Alive/ZVdp Name: ptr - (ptr & (alignment-1)) -> ptr & (0 - alignment) %mask = add i64 %alignment, -1 %bias = and i64 %ptr, %mask %r = sub i64 %ptr, %bias => %highbitmask = sub i64 0, %alignment %r = and i64 %ptr, %highbitmask The main motivational pattern involes pointer-typed values, so this transform can't really be done in middle-end. See https://bugs.llvm.org/show_bug.cgi?id=44448 https://reviews.llvm.org/D71499
* [lldb][NFC] Remove forward declaration for non-existent type clang::Action ↵Raphael Isemann2020-01-033-7/+2
| | | | | | | and delete references to it There is no clang::Action anymore so our forward decl for it and the obsolete pointer in the ASTStructExtractor can both go (that code anyway didn't do anything).
OpenPOWER on IntegriCloud