1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
Commit Graph

7438 Commits

Author SHA1 Message Date
Nico Weber
208d53836a gn build: Merge r362685
llvm-svn: 362719
2019-06-06 16:55:05 +00:00
Ilya Biryukov
0ef6b523dd gn build: Add new tidy checks to gn files
The checks were added in r362673 and r362672.

llvm-svn: 362709
2019-06-06 14:51:55 +00:00
Ulrich Weigand
fba10ebb96 Allow target to handle STRICT floating-point nodes
The ISD::STRICT_ nodes used to implement the constrained floating-point
intrinsics are currently never passed to the target back-end, which makes
it impossible to handle them correctly (e.g. mark instructions are depending
on a floating-point status and control register, or mark instructions as
possibly trapping).

This patch allows the target to use setOperationAction to switch the action
on ISD::STRICT_ nodes to Legal. If this is done, the SelectionDAG common code
will stop converting the STRICT nodes to regular floating-point nodes, but
instead pass the STRICT nodes to the target using normal SelectionDAG
matching rules.

To avoid having the back-end duplicate all the floating-point instruction
patterns to handle both strict and non-strict variants, we make the MI
codegen explicitly aware of the floating-point exceptions by introducing
two new concepts:

- A new MCID flag "mayRaiseFPException" that the target should set on any
  instruction that possibly can raise FP exception according to the
  architecture definition.
- A new MI flag FPExcept that CodeGen/SelectionDAG will set on any MI
  instruction resulting from expansion of any constrained FP intrinsic.

Any MI instruction that is *both* marked as mayRaiseFPException *and*
FPExcept then needs to be considered as raising exceptions by MI-level
codegen (e.g. scheduling).

Setting those two new flags is straightforward. The mayRaiseFPException
flag is simply set via TableGen by marking all relevant instruction
patterns in the .td files.

The FPExcept flag is set in SDNodeFlags when creating the STRICT_ nodes
in the SelectionDAG, and gets inherited in the MachineSDNode nodes created
from it during instruction selection. The flag is then transfered to an
MIFlag when creating the MI from the MachineSDNode. This is handled just
like fast-math flags like no-nans are handled today.

This patch includes both common code changes required to implement the
new features, and the SystemZ implementation.

Reviewed By: andrew.w.kaylor

Differential Revision: https://reviews.llvm.org/D55506

llvm-svn: 362663
2019-06-05 22:33:10 +00:00
Roman Lebedev
169313ec4b UpdateTestChecks: hexagon support
Summary:
These tests are being affected by an upcoming patch,
so having an understandable (autogenerated) diff is helpful.

This target, again, prefers `-march`:
```
llvm/test/CodeGen/Hexagon$ grep -r triple | wc -l
467
llvm/test/CodeGen/Hexagon$ grep -r march | wc -l
1167
```

Reviewers: RKSimon, kparzysz

Reviewed By: kparzysz

Subscribers: xbolva00, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62867

llvm-svn: 362605
2019-06-05 14:08:01 +00:00
Nico Weber
4e860add7f gn build: Merge r362578
llvm-svn: 362598
2019-06-05 12:05:54 +00:00
Nico Weber
5407c02e4b svn propset svn:executable on utils/prepare-code-coverage-artifact.py
llvm-svn: 362561
2019-06-04 23:35:07 +00:00
Nico Weber
83cb36265f gn build: Merge r362459
llvm-svn: 362498
2019-06-04 13:42:45 +00:00
Peter Collingbourne
0ace03cc0e gn build: Merge r361896.
llvm-svn: 362445
2019-06-03 20:40:07 +00:00
Nico Weber
d34a24ff8e gn build: Merge r362371
llvm-svn: 362433
2019-06-03 18:29:00 +00:00
Nico Weber
eed1fe011e gn build: Merge r362352
llvm-svn: 362428
2019-06-03 18:13:29 +00:00
Mikael Holmen
ddff06cdd7 [TableGen] Fix std::array initializer to avoid warnings with older tool chains. NFC
A std::array is implemented as a template with an array inside a struct.
Older versions of clang, like 3.6, require an extra set of curly braces
around std::array initializations to avoid warnings.

The C++ language was changed regarding this by CWG 1270. So more modern
tool chains does not complain even if leaving out one level of braces.

llvm-svn: 362360
2019-06-03 06:38:01 +00:00
Mike Spertus
752a16bcdf Update MSVC Visualizer to reflect new variadic PointerUnion
This changed updates the MSVC Visualizer to work with the recent change
of PointerUnion into a variadic template. As an extra bonus, we
fix some bit rot in the SmallPtrSet visualizer as well

llvm-svn: 362345
2019-06-02 23:33:32 +00:00
Craig Topper
56f4fa247d [X86] Make the X86FoldTablesEmitter functional again. Fix the spacing in the output to make it easier to diff.
Fix a few other formatting issues in the manual table. And remove some
old FIXMEs.

llvm-svn: 362287
2019-06-01 06:20:55 +00:00
Simon Pilgrim
828a13e476 [UpdateTestChecks] Add support for -march=r600 to match existing -march=amdgcn support
llvm-svn: 362228
2019-05-31 15:05:06 +00:00
Nico Weber
9f2de13cb7 gn build: Merge r362160
llvm-svn: 362223
2019-05-31 12:07:05 +00:00
Nico Weber
aceb52b7fd gn build: Merge r362196
llvm-svn: 362222
2019-05-31 11:52:59 +00:00
Nico Weber
cd278170e0 gn build: Merge r362190
llvm-svn: 362221
2019-05-31 11:51:42 +00:00
Sjoerd Meijer
ba322fceb7 Follow up and fix for rL362064
Fix the misleadingly indentation introduced in rL362064. This will get rid of
the compiler warning, and it was actually a bug. This change will be used and
tested in D62669.

llvm-svn: 362211
2019-05-31 08:39:34 +00:00
Pengfei Wang
d1fdadc458 [X86] Add VP2INTERSECT instructions
Support Intel AVX512 VP2INTERSECT instructions in llvm

Patch by Xiang Zhang (xiangzhangllvm)

Differential Revision: https://reviews.llvm.org/D62366

llvm-svn: 362188
2019-05-31 02:50:41 +00:00
Sjoerd Meijer
e852d6fa9b [TableGen] AsmMatcher: allow repeated input operands
If an assembly instruction has to mention an input operand name twice,
for example the MVE VMOV instruction that accesses two lanes of the
same vector by writing 'vmov r1, r2, q0[3], q0[1]', then the obvious
way to write its AsmString is to include the same operand (here $Qd)
twice. But this causes the AsmMatcher generator to omit that
instruction completely from the match table, on the basis that the
generator isn't clever enough to deal with the duplication.

But you need to have _some_ way of dealing with an instruction like
this - and in this case, where the mnemonic is shared with many other
instructions that the AsmMatcher does handle, it would be very painful
to take it out of the AsmMatcher system completely.

A nicer way is to add a custom AsmMatchConverter routine, and let that
deal with the problem if the autogenerated converter can't. But that
doesn't work, because TableGen leaves the instruction out of its table
_even_ if you provide a custom converter.

Solution: this change, which makes TableGen relax the restriction on
duplicated operands in the case where there's a custom converter.

Patch by: Simon Tatham

Differential Revision: https://reviews.llvm.org/D60695

llvm-svn: 362066
2019-05-30 07:38:09 +00:00
Sjoerd Meijer
e1301bfbc7 [TableGen] New default operand "undef_tied_input"
This is a new special identifier which you can use as a default in
OperandWithDefaultOps. The idea is that you use it for an input
operand of an instruction that's tied to an output operand, and its
semantics are that (in the default case) the input operand's value is
not used at all.

The detailed effect is that when instruction selection emits the
instruction in the form of a pre-regalloc MachineInstr, it creates an
IMPLICIT_DEF node to use as that input.

If you're creating an MCInst with explicit register names, then the
right handling would be to set the input operand to the same register
as the output one (honouring the tie) and to add the 'undef' flag
indicating that that register is deemed to acquire a new don't-care
definition just before we read it. But I haven't done that in this
commit, because there was no need to - no Tablegen backend seems to
autogenerate default fields in an MCInst.

Patch by: Simon Tatham

Differential Revision: https://reviews.llvm.org/D60696

llvm-svn: 362064
2019-05-30 07:30:37 +00:00
Roman Lebedev
bf24ab9e18 UpdateTestChecks: Lanai triple support
Summary:
The assembly structure most resembles the SPARC pattern:
```
        .globl  f6                      ! -- Begin function f6
        .p2align        2
        .type   f6,@function
f6:                                     ! @f6
        .cfi_startproc
! %bb.0:
        st      %fp, [--%sp]
<...>
        ld      -8[%fp], %fp
.Lfunc_end0:
        .size   f6, .Lfunc_end0-f6
        .cfi_endproc
                                        ! -- End function
```
Test being affected by upcoming patch, so regenerate it.

Reviewers: RKSimon, jpienaar

Reviewed By: RKSimon

Subscribers: jyknight, fedor.sergeev, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62545

llvm-svn: 362019
2019-05-29 20:03:00 +00:00
Nico Weber
55d79c5578 gn build: Make it possible to build with coverage information
Differential Revision: https://reviews.llvm.org/D62508

llvm-svn: 362018
2019-05-29 20:00:36 +00:00
Stella Stamenova
edb99e597f lit: modernize the lit configuration for the lit tests
Summary: This also normalizes the config feature that represents the windows platform to "system-windows" as opposed to having both "windows" and "system-windows"

Reviewers: asmith, probinson

Subscribers: delcypher, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61798

llvm-svn: 361998
2019-05-29 18:07:39 +00:00
Nico Weber
edf3d01d6d gn build: Merge r361953
llvm-svn: 361961
2019-05-29 14:15:35 +00:00
David Blaikie
12a22606f9 Fix GDB pretty printer for Optional after r354246
llvm-svn: 361870
2019-05-28 20:22:16 +00:00
Ilya Biryukov
61a121470a gn build: make clangd depend on clang resource headers
Summary:
clangd needs them to function properly, even though they are not
strictly required for the build.

Reviewers: thakis

Reviewed By: thakis

Subscribers: MaskRay, jkorous, arphaman, llvm-commits, kadircet

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62480

llvm-svn: 361828
2019-05-28 14:23:00 +00:00
Nico Weber
e2f61e4247 gn build: Merge r361664
llvm-svn: 361722
2019-05-26 13:06:48 +00:00
Nico Weber
5518a4a213 Rename clangToolingRefactor to clangToolingRefactoring for consistency with its directory
See "[cfe-dev] The name of clang/lib/Tooling/Refactoring".

Differential Revision: https://reviews.llvm.org/D62420

llvm-svn: 361684
2019-05-25 00:27:19 +00:00
Nico Weber
22843bc3fb gn build: Merge r361607
llvm-svn: 361640
2019-05-24 14:24:25 +00:00
Roman Lebedev
2ed3460f1d UpdateTestChecks: ppc32 triple support
Summary:
Appears identical to powerpc64{,le}.
Regenerate test that is being affected by upcoming patch.

Reviewers: RKSimon

Reviewed By: RKSimon

Subscribers: nemanjai, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62339

llvm-svn: 361543
2019-05-23 19:54:41 +00:00
Roman Lebedev
6db0591e88 [NFC] UpdateTestChecks: asm.py: fix whitespace issue
llvm-svn: 361538
2019-05-23 19:15:05 +00:00
Jordan Rupprecht
4106506993 [git] Be more specific when looking for llvm-svn
Summary:
A commit may, for some reason, have `llvm-svn:` in it multiple times. It may even take up the whole line and look identical to what gets added automatically when svn commits land in github.

To workaround this, make changes to both lookups:

1) When doing the git -> svn lookup, make sure to go through the whole message, and:
 a) Only look for llvm-svn starting at the beginning of the line (excluding the whitespace that `git log` adds).
 b) Take the last one (at the end of the commit message), if there are multiple matches.

2) When doing the svn -> git lookup, look through a sizeable but still reasonably small number of git commits (10k, about 4-5 months right now), and:
 a) Only consider commits with the '^llvm-svn: NNNNNN' we expect, and
 b) Only consider those that also follow the same git -> svn matching above. (Error if it's not exactly one commit).

Reviewers: jyknight

Reviewed By: jyknight

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60017

llvm-svn: 361532
2019-05-23 18:43:19 +00:00
Roman Lebedev
bf13037243 UpdateTestChecks: -march=mips/-march=mipsel is mips triple.
Again, a mixture of march and triple, with majority being march:

llvm/test/CodeGen/Mips$ grep -ri triple | wc -l
818
llvm/test/CodeGen/Mips$ grep -ri march | wc -l
1457

llvm-svn: 361521
2019-05-23 18:08:00 +00:00
Nico Weber
f7d33f967e gn build: Merge r361418 more
llvm-svn: 361520
2019-05-23 18:01:16 +00:00
Nico Weber
89d96c0ab3 gn build: Merge r361487
llvm-svn: 361498
2019-05-23 13:59:44 +00:00
Peter Collingbourne
fab26129e7 gn build: Merge r361418.
llvm-svn: 361449
2019-05-23 00:31:55 +00:00
Thomas Preud'homme
8959c7cf6c FileCheck: Improve FileCheck variable terminology
Summary:
Terminology introduced by [[#]] blocks is confusing and does not
integrate well with existing terminology.

First, variables referred by [[]] blocks are called "pattern variables"
while the text a CHECK directive needs to match is called a "CHECK
pattern". This is inconsistent with variables in [[#]] blocks since
[[#]] blocks are also found in CHECK pattern yet those variables are
called "numeric variable".

Second, the replacing of both [[]] and [[#]] blocks by the value of the
variable or expression they contain is represented by a
FileCheckPatternSubstitution class. The naming refers to being a
substitution in a CHECK pattern but could be wrongly understood as being
a substitution of a pattern variable.

Third and lastly, comments use "numeric expression" to refer both to the
[[#]] blocks as well as to the numeric expressions these blocks contain
which get evaluated at match time.

This patch solves these confusions by
- calling variables in [[]] and [[#]] blocks as string and numeric
  variables respectively;
- referring to [[]] and [[#]] as substitution *blocks*, with the former
  being a string substitution block and the latter a numeric
  substitution block;
- calling [[]] and [[#]] blocks to be replaced by the value of a
  variable or expression they contain a substitution (as opposed to
  definition when these blocks are used to defined a variable), with the
  former being a string substitution and the latter a numeric
  substitution;
- renaming the FileCheckPatternSubstitution as a FileCheckSubstitution
  class with FileCheckStringSubstitution and
  FileCheckNumericSubstitution subclasses;
- restricting the use of "numeric expression" to refer to the expression
  that is evaluated in a numeric substitution.

While numeric substitution blocks only support numeric substitutions of
numeric expressions at the moment there are plans to augment numeric
substitution blocks to support numeric definitions as well as both a
numeric definition and numeric substitution in the same numeric
substitution block.

Reviewers: jhenderson, jdenny, probinson, arichardson

Subscribers: hiraditya, arichardson, probinson, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62146

llvm-svn: 361445
2019-05-23 00:10:14 +00:00
Nico Weber
25ef8bb74a gn build: Fix check-clangd target after r359825
llvm-svn: 361419
2019-05-22 19:03:45 +00:00
Ilya Biryukov
1fab3c1330 Reland r361148 with a fix to the buildbot failure.
Reverted in r361377.
Also reland the '.gn' files (reverted in r361389).

llvm-svn: 361391
2019-05-22 14:44:45 +00:00
Nico Weber
3df408c83e gn build: Merge r361377
llvm-svn: 361389
2019-05-22 14:31:22 +00:00
Roman Lebedev
a7cac55c64 UpdateTestChecks: sparc march handling
Summary:
Another target that prefers to use `-march` in tests
```
llvm/test/CodeGen/SPARC$ grep -ri mtriple | wc -l
25
llvm/test/CodeGen/SPARC$ grep -ri march | wc -l
165
```

This test is being affected by a further patch,
so regenerate it to better visualize the changes

Reviewers: RKSimon, dcederman, gberry

Reviewed By: RKSimon

Subscribers: jyknight, fedor.sergeev, jrtc27, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62242

llvm-svn: 361381
2019-05-22 13:04:34 +00:00
Dan Gohman
17703faffc [WebAssembly] Add the signature for the new llround builtin function
r360889 added new llround builtin functions. This patch adds their
signatures for the WebAssembly backend.

It also adds wasm32 support to utils/update_llc_test_checks.py, since
that's the script other targets are using for their testcases for this
feature.

Differential Revision: https://reviews.llvm.org/D62207

llvm-svn: 361327
2019-05-21 23:06:34 +00:00
Nico Weber
2866d8d07b gn build: Merge r361264
llvm-svn: 361267
2019-05-21 14:41:27 +00:00
Nico Weber
05840794be gn build: Run git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
llvm-svn: 361262
2019-05-21 14:22:38 +00:00
Nico Weber
85b5d381a7 gn build: Merge r361252
llvm-svn: 361260
2019-05-21 14:20:46 +00:00
Nico Weber
3fe4ef39d8 gn build: Merge r361233
llvm-svn: 361259
2019-05-21 14:10:55 +00:00
Nico Weber
33739a26c1 Try to fix build with older gccs after r361152
Also merge the cmake change there to the gn build.

llvm-svn: 361209
2019-05-21 00:27:26 +00:00
Nico Weber
e8e4bbe863 gn build: Merge r361148
llvm-svn: 361191
2019-05-20 19:33:32 +00:00
Pete Couperus
b885b98121 [TableGen] - Type comparison LE should be LT or equal.
Differential Revision: https://reviews.llvm.org/D61705

llvm-svn: 361183
2019-05-20 18:09:37 +00:00