Commit Graph

338581 Commits

Author SHA1 Message Date
Craig Topper 05a4cf2636 [X86] Autogenerate complete checks. NFC 2020-01-03 17:18:18 -08:00
Francis Visoiu Mistrih c8ab40ca0e [Remarks] Warn if a remark file is not found when processing static archives
Static archives contain object files which contain sections pointing to
external remark files.

When static archives are shipped without the remark files, dsymutil
shouldn't generate an error.

Instead, generate a warning to inform the user that remarks for that
library won't be available in the .dSYM.
2020-01-03 17:02:10 -08:00
Davide Italiano 6c87623615 [UserExpression] Clean up `return` after `else`. 2020-01-03 16:52:10 -08:00
Daniel Sanders 77d4b5f5fe [gicombiner] Correct 64f1bb5cd2 to account for MSVC's %p format 2020-01-03 16:51:28 -08:00
Tyker c4766cadcb [Diagnostic] Add test for previous b4b904e19b 2020-01-04 01:41:21 +01:00
LLVM GN Syncbot a61a6323dd [gn build] Port 64f1bb5cd2 2020-01-04 00:24:04 +00:00
Daniel Sanders 64f1bb5cd2 [gicombiner] Add GIMatchTree and use it for the code generation
Summary:
GIMatchTree's job is to build a decision tree by zipping all the
GIMatchDag's together.

Each DAG is added to the tree builder as a leaf and partitioners are used
to subdivide each node until there are no more partitioners to apply. At
this point, the code generator is responsible for testing any untested
predicates and following any unvisited traversals (there shouldn't be any
of the latter as the getVRegDef partitioner handles them all).

Note that the leaves don't always fit into partitions cleanly and the
partitions may overlap as a result. This is resolved by cloning the leaf
into every partition it belongs to. One example of this is a rule that can
match one of N opcodes. The leaf for this rule would end up in N partitions
when processed by the opcode partitioner. A similar example is the
getVRegDef partitioner where having rules (add $a, $b), and (add ($a, $b), $c)
will result in the former being in the partition for successfully
following the vreg-def and failing to do so as it doesn't care which
happens.

Depends on D69151

Reviewers: bogner, volkan

Reviewed By: volkan

Subscribers: lkail, mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69152
2020-01-03 16:23:23 -08:00
Stella Laurenzo 7d82d20f37 Add missing mlir-headers target and add tablegen'd deps to it.
Summary:
Prior to this, "ninja install-mlir-headers" failed with an error indicating
the missing target. Verified that from a clean build, the installed
headers include generated files.

Subscribers: mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72045
2020-01-03 16:04:40 -08:00
Gabor Horvath 0458e63d28 [fuchsia] Enable Clang Static Analyzer
Differential Revision: https://reviews.llvm.org/D72188
2020-01-03 15:49:32 -08:00
Stanislav Mekhanoshin 4aa7fb7752 [AMDGPU] Revert scheduling to reduce spilling
We can revert region schedule if new schedule decreases occupancy.
However, if we already have only one wave we would accept any new
schedule even if it blows up register pressure. Such schedule may
result in quite heavy spilling which can be avoided if we reject
this new schedule.

Differential Revision: https://reviews.llvm.org/D72181
2020-01-03 15:20:21 -08:00
Jonas Devlieghere d2b19d455d [lldb/Utility] YAML validation should be orthogonal to packet semantics.
It's not up to YAML to validate the semantics of the GDB remote packet
struct. This is especially wrong here as there's nothing that says that
the amount of bytes transmitted  matches the packet payload size.
2020-01-03 14:23:42 -08:00
Jonas Devlieghere 320b43c39f [lldb/Docs] Include the man page on the website 2020-01-03 13:59:19 -08:00
Jinsong Ji 1d7990228f [PowerPC][LoopVectorize] Add tests for fp128 and fp16
Add two tests to reg-usage.ll
2020-01-03 21:39:29 +00:00
Daniel Sanders 1dbc486457 [globalisel] Fix another mismatch between %d and the RuleID type 2020-01-03 13:36:24 -08:00
Jonas Devlieghere 6e6b6a5754 [lldb/Docs] Include how to generate the man page 2020-01-03 13:34:35 -08:00
Jonas Toth 48ee04033c [clang-tidy] fix linkage with clangSema for FixitHintUtils, undo previous wrong fix 2020-01-03 22:32:10 +01:00
Alexandre Ganea e19188af0a [mlir] Compilation fix: use LLVM_ATTRIBUTE_UNUSED following 6656e961c0
Differential Revision: https://reviews.llvm.org/D72124
2020-01-03 16:31:33 -05:00
River Riddle 0d9ca98c1a [mlir] Fix indexed_accessor_range to properly forward the derived class.
Summary: This fixes the return value of helper methods on the base range class.

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D72127
2020-01-03 13:30:18 -08:00
Matt Arsenault 21309eafde GlobalISel: Add type argument to getRegBankFromRegClass
AMDGPU can't unambiguously go back from the selected instruction
register class to the register bank without knowing if this was used
in a boolean context.
2020-01-03 16:25:10 -05:00
Ayke van Laethem 555fc92a85
[bindings/go] Add Subprogram method
This method allows getting the subprogram metadata object from a
function value.

Differential Revision: https://reviews.llvm.org/D71528
2020-01-03 22:17:46 +01:00
Michael Liao 3566c75ca8 [amdgpu] Skip non-instruction values in CF user tracing.
Summary:
- CF users won't be non-instruction values. Skip them to save the
  compilation time. It's especially true when there are multiple
  functions in that module, where, says, a constant may be used in most
  functions. The current CF user tracing adds significant overhead.

Reviewers: alex-t, rampitec

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72174
2020-01-03 16:02:47 -05:00
Jonas Toth fed2a5033a [clang-tidy] quickfix: add -fno-delayed-template-parsing as default argument for runCheckOnCode unit-tests to unbreak windows 2020-01-03 22:02:11 +01:00
Jonas Toth 05ebaa62e0 [clang-tidy] fix broken linking for AddConstTest with adding clangSema as dependency (DeclSpec) 2020-01-03 21:55:51 +01:00
Stefan Gränitz c7191d3acd [NFC][ORC] Fix typos and whitespaces in comments 2020-01-03 21:54:03 +01:00
LLVM GN Syncbot a308cc6b82 [gn build] Port 9861a8538c 2020-01-03 20:30:09 +00:00
Jonas Paulsson c0f1eac008 [SystemZ] Don't allow CL option -mpacked-stack with -mbackchain.
-mpacked-stack is currently not supported with -mbackchain, so this should
result in a compilation error message instead of being silently ignored.

Review: Ulrich Weigand
2020-01-03 12:26:54 -08:00
Matt Arsenault 089e1ee172 AMDGPU: Add gfx9 run lines to a testcase 2020-01-03 15:25:50 -05:00
Matt Arsenault 9861a8538c AMDGPU/GlobalISel: Add new utils file
There are some things that are shareable between the legalizer,
regbankselect, and the selector that don't have an obvious place to
go.
2020-01-03 15:25:50 -05:00
Matt Arsenault 92ff017a85 AMDGPU: Only allow regs for s_movrel_{b32|b64}
This would incorrectly allowing folding immediates. These currently
aren't selectable, but will be from GlobalISel soon.
2020-01-03 15:25:49 -05:00
Lei Zhang 5d5d5838ce [mlir] Enhance classof() checks in StructsGen
Previously we only check that each field is of the correct
mlir::Attribute subclass. This commit enhances to also consider
the attribute's types, by leveraging the constraints already
encoded in TableGen attribute definitions.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D72162
2020-01-03 15:13:16 -05:00
Nicolas Vasilache 786f51dca0 [mlir][Linalg] NFC - Post-commit format fix 2020-01-03 15:10:45 -05:00
Nicolas Vasilache 447dafdfc9 [mlir][Linalg] NFC - Hotfix GenericLoopNestBuilder compilation error on older gcc (-fpermissive)
This fixes 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,
```

This was tested independently on a Docker image with gcc-5 by jpienaar@
2020-01-03 15:09:23 -05:00
Lei Zhang 1570084d33 [mlir][spirv] Fix ADDITIONAL_HEADER_DIRS for SPIR-V libraries
SPIRV/ headers live under mlir/Dialect/.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D72141
2020-01-03 15:06:09 -05:00
Sanjay Patel ca7fdd41bd [DAGCombiner] fix miscompile in translating (X & undef) to shuffle
See PR42982 for more context:
https://bugs.llvm.org/show_bug.cgi?id=42982
2020-01-03 14:58:49 -05:00
Craig Topper 7cdc60c3db [LegalizeVectorOps] Pass the post-UpdateNodeOperands version of Op to ExpandLoad/ExpandStore
UpdateNodeOperands might CSE to another existing node. So we should make sure we're legalizing that node otherwise we might fail to hook up the operands properly. I've moved the result registration up to the caller to avoid having to pass both Result and Op into the functions where it might be confusing which is which.

This address 2 other issues pointed out in D71861.

Differential Revision: https://reviews.llvm.org/D72021
2020-01-03 11:53:08 -08:00
Sanjay Patel 32ccafd0f2 [x86] add test for miscompile in XformToShuffleWithZero(); NFC 2020-01-03 14:49:25 -05:00
LLVM GN Syncbot 264637f0b8 [gn build] Port cf48101200 2020-01-03 19:41:47 +00:00
Craig Topper 2875cc6b29 [X86] Improve for v2i32->v2f64 uint_to_fp
This uses an alternative implementation of this conversion derived
from our v2i32->v2f32 handling. We can zero extend the v2i32 to
v2i64, or it with the bit representation of 2.0^52 which will give
us 2.0^52 plus the 32-bit integer since double's mantissa is 52 bits.
Then we just need to subtract 2.0^52 as a double and let the floating
point unit normalize the remaining bits into a valid double.

This is less instructions then our previous code, but does require
a port 5 shuffle for the zero extend or unpack.

Differential Revision: https://reviews.llvm.org/D71945
2020-01-03 11:39:08 -08:00
Jonas Toth cf48101200 [clang-tidy] implement utility-function to add 'const' to variables
Summary:
This patch extends the already existing facility to add 'const' to variables
to be more flexible and correct. The previous version did not consider pointers
as value AND pointee. For future automatic introduction for const-correctness
this shortcoming needs to be fixed.
It always allows configuration where the 'const' token is inserted, either on
the left side (if possible) or the right side.
It adds many unit-tests to the utility-function that did not exist before, as
the function was implicitly tested through clang-tidy checks. These
tests were not changed, as the API is still compatible.

Reviewers: aaron.ballman, hokein, alexfh, shuaiwang, lebedev.ri

Reviewed By: aaron.ballman

Subscribers: jdoerfert, mgorny, xazax.hun, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D54395
2020-01-03 20:37:47 +01:00
Nicolas Vasilache aaaf6c4560 [mlir][Linalg] NFC - Hotfix GenericLoopNestBuilder compilation error (-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,
```
2020-01-03 14:30:35 -05:00
Reid Kleckner 9c2b72821b Move tail call disabling code to target independent code
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
d9699bc7bd (2015).

Reviewers: echristo, MaskRay

Differential Revision: https://reviews.llvm.org/D72118
2020-01-03 11:27:41 -08:00
Alexander Lanin e5a56f2d50 Remove outdated svn/git information from hacking page
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.
2020-01-03 14:13:40 -05:00
Roman Lebedev 7973aa05f6
[NFC][InstCombine] '(Op1 & С) - Op1' -> '-(Op1 & ~C)' fold (PR44427)
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
2020-01-03 21:25:48 +03:00
Roman Lebedev 6f922dbbea
[NFC][InstCombine] '(Op1 & С) - Op1' pattern tests (PR44427) 2020-01-03 21:25:48 +03:00
Roman Lebedev 9b750cc6ba
[NFC][InstCombine] Autogenerate and2.ll checklines 2020-01-03 21:25:48 +03:00
Ahmed Taei 14ee51581a [mlir][linalg] Lower linalg to affine loops
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
2020-01-03 13:21:10 -05:00
Nicolas Vasilache a932f033a3 [mlir][Vector] NFC - Add documentation for the VectorOps dialect. 2020-01-03 13:14:24 -05:00
Jonas Devlieghere c75aac42a6 [DWARF] Don't assume optional always has a value.
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.
2020-01-03 09:53:44 -08:00
Roman Lebedev cc0216bedb
[NFC][InstCombine] '(X & (- Y)) - X' -> '- (X & (Y - 1))' fold (PR44448)
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
2020-01-03 20:27:29 +03:00
Roman Lebedev b87a351182
[NFC][InstCombine] '(X & (- Y)) - X' pattern tests (PR44448)
As discussed in https://bugs.llvm.org/show_bug.cgi?id=44448,
we can hoist negation out of the pattern.
2020-01-03 20:27:17 +03:00