- Jan 03, 2020
-
-
Roman Lebedev authored
-
Roman Lebedev authored
-
Ahmed Taei authored
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
-
Nicolas Vasilache authored
-
Jonas Devlieghere authored
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.
-
Roman Lebedev authored
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
-
Roman Lebedev authored
As discussed in https://bugs.llvm.org/show_bug.cgi?id=44448, we can hoist negation out of the pattern.
-
Fangrui Song authored
Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D72061
-
Sam McCall authored
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 ac3f9e48, we would show a (boring) hover card - after ac3f9e48, 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
-
Alexey Bataev authored
If the qualified reduction name is specified and not found, the compiler may crash because of not specified parameter.
-
Nico Weber authored
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
-
Kelvin Li authored
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
-
Johannes Doerfert authored
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.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
An integer isn't allowed in getAlignmentForValue so we need to stop at a ptr2int instruction during exploration.
-
Johannes Doerfert authored
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.
-
Johannes Doerfert authored
-
Tyker authored
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
-
Matt Arsenault authored
This should be looking at the RHS of the add for a constant.
-
Roman Lebedev authored
The fold 'A - (A & (B - 1))' -> 'A & (0 - B)' added in 8dab0a4a 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
-
Roman Lebedev authored
The fold 'A - (A & (B - 1))' -> 'A & (0 - B)' added in 8dab0a4a 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
-
Roman Lebedev authored
-
Roman Lebedev authored
The fold 'A - (A & (B - 1))' -> 'A & (0 - B)' added in 8dab0a4a 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
-
Roman Lebedev authored
The fold 'A - (A & (B - 1))' -> 'A & (0 - B)' added in 8dab0a4a 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
-
Roman Lebedev authored
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
-
Roman Lebedev authored
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
-
Roman Lebedev authored
-
Sam Parker authored
-
serge-sans-paille authored
Differential Revision: https://reviews.llvm.org/D72130
-
serge-sans-paille authored
Correctly declare example dependency. Pipe stderr through FileCheck. Differential Revision: https://reviews.llvm.org/D72130
-
serge-sans-paille authored
s/CHECK-/CHECK Differential Revision: https://reviews.llvm.org/D72130
-
Ankit authored
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
-
Sanjay Patel authored
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
-
Jay Foad authored
-
Jay Foad authored
These have been obsolete since about r221926, when TargetLoweringObjectFile was completely moved from TargetLowering to TargetMachine.
-
Lei Zhang authored
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
-
James Henderson authored
Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D72092
-
James Henderson authored
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
-
Anastasia Stulova authored
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
-
Ilya Biryukov authored
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.
-