1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

7526 Commits

Author SHA1 Message Date
David Majnemer
373de821e6 [CodeGen] Add larger vector types for i32 and f32
Some out of tree backend require larger vector type. Since maintaining the changes out of tree is difficult due to the many manual changes needed when adding a new type we are adding it even if no backend currently use it.

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

Patch by Thomas Raoux!

llvm-svn: 365274
2019-07-07 04:47:37 +00:00
Nico Weber
a963a94a23 gn build: Merge r365203
llvm-svn: 365213
2019-07-05 15:14:06 +00:00
Nico Weber
24ec7afabe gn build: Merge r365179
llvm-svn: 365185
2019-07-05 11:34:48 +00:00
Peter Collingbourne
2b7fc385f9 gn build: Merge r365130.
llvm-svn: 365167
2019-07-05 01:11:20 +00:00
Peter Collingbourne
f3e1554185 gn build: Merge r365103.
llvm-svn: 365166
2019-07-05 01:11:18 +00:00
Peter Collingbourne
b5743da917 gn build: Merge r365007.
llvm-svn: 365165
2019-07-05 01:11:16 +00:00
Peter Collingbourne
d71bef0e75 gn build: Merge r365091.
llvm-svn: 365164
2019-07-05 01:11:14 +00:00
Simon Tatham
b8c33a2f38 [TableGen] Allow DAG isel patterns to override default operands.
When a Tablegen instruction description uses `OperandWithDefaultOps`,
isel patterns for that instruction don't have to fill in the default
value for the operand in question. But the flip side is that they
actually //can't// override the defaults even if they want to.

This will be very inconvenient for the Arm backend, when we start
wanting to write isel patterns that generate the many MVE predicated
vector instructions, in the form with predication actually enabled. So
this small Tablegen fix makes it possible to write an isel pattern
either with or without values for a defaulted operand, and have the
default values filled in only if they are not overridden.

If all the defaulted operands come at the end of the instruction's
operand list, there's a natural way to match them up to the arguments
supplied in the pattern: consume pattern arguments until you run out,
then fill in any missing instruction operands with their default
values. But if defaulted and non-defaulted operands are interleaved,
it's less clear what to do. This does happen in existing targets (the
first example I came across was KILLGT, in the AMDGPU/R600 backend),
and of course they expect the previous behaviour (that the default for
those operands is used and a pattern argument is not consumed), so for
backwards compatibility I've stuck with that.

Reviewers: nhaehnle, hfinkel, dmgreen

Subscribers: mehdi_amini, javed.absar, tpr, kristof.beyls, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 365114
2019-07-04 08:43:20 +00:00
Francis Visoiu Mistrih
972459e6ed [Bitcode] Move Bitstream to a separate library
This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/.

This is needed to avoid a circular dependency when using the bitstream
code for parsing optimization remarks.

Since Bitcode uses Core for the IR part:

libLLVMRemarks -> Bitcode -> Core

and Core uses libLLVMRemarks to generate remarks (see
IR/RemarkStreamer.cpp):

Core -> libLLVMRemarks

we need to separate the Bitstream and Bitcode part.

For clang-doc, it seems that it doesn't need the whole bitcode layer, so
I updated the CMake to only use the bitstream part.

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

llvm-svn: 365091
2019-07-03 22:40:07 +00:00
Vitaly Buka
435ba65fb9 Fix GN build
llvm-svn: 364942
2019-07-02 16:08:10 +00:00
Nico Weber
09c8d9930c gn build: Merge r364866
llvm-svn: 364908
2019-07-02 11:20:40 +00:00
Jinsong Ji
94bc407832 [UpdateTestChecks][PowerPC] Avoid empty string when scrubbing loop comments
Summary:
SCRUB_LOOP_COMMENT_RE was introduced in https://reviews.llvm.org/D31285
This works for some loops.

However, we may generate lines with loop comments only.
And since we don't scrub leading white spaces, this will leave an empty
line there, and FileCheck will complain it.

eg: llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll:27:15:
error: found empty check string with prefix 'CHECK:'
; CHECK-NEXT:

This prevented us from using the `update_llc_test_checks.py` for quite some cases.

We should still keep the comment token there, so that we can safely
scrub the loop comment without breaking FileCheck.

Reviewers: timshen, hfinkel, lebedev.ri, RKSimon

Subscribers: nemanjai, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 364775
2019-07-01 14:37:48 +00:00
Andrew Ng
5c70cae542 [benchmark] Disable CMake get_git_version
Disabled CMake get_git_version as it is meaningless for this in-tree
build, and hardcoded a null version.

Not using get_git_version avoids a refresh of the git index that is
executed by get_git_version. Refreshing the index can take a
considerable amount of time if the index needs to be refreshed
(particularly with the mono repo). This situation can arise when
building shared source on a host in VMs.

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

llvm-svn: 364742
2019-07-01 10:58:20 +00:00
Mike Spertus
226db54424 Clean up MSVC visualization of LLVM pointer types
Create separate natvis ptr and int views for PointerIntPair.
These are convenient in watch Windows and will be used by 
Clang visualizers to be checked in shortly

Also, removed deref views as the MSVC na format has
done the same thing natively since MSVC2013.

llvm-svn: 364723
2019-06-30 21:54:34 +00:00
Jinsong Ji
d8b5b763b2 [UpdateChecks] Add support for armv7-apple-darwin
armv7-apple-darwin was not supported well, the script can't generate
checks.

https://reviews.llvm.org/D60601/new/#inline-568671

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

llvm-svn: 364668
2019-06-28 18:07:19 +00:00
Reid Kleckner
eeac50f7f8 [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.*
These lit configuration files are really Python source code. Using the
.py file extension helps editors and tools use the correct language
mode. LLVM and Clang already use this convention for lit configuration,
this change simply applies it to all of compiler-rt.

Reviewers: vitalybuka, dberris

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

llvm-svn: 364591
2019-06-27 20:56:04 +00:00
Vitaly Buka
0f648b5b0c [GN] Update build file
llvm-svn: 364583
2019-06-27 19:55:22 +00:00
Vitaly Buka
8f240244c0 [GN] Set exit code to 1 if changes are needed
llvm-svn: 364582
2019-06-27 19:55:21 +00:00
Nico Weber
56e3e24e15 gn build: Follow-up to r364491 "[GN] Update build files"
- Merge r364427 (GSYM lib) more: It was missing the new unit test
  (as pointed out by llvm/utils/gn/build/sync_source_lists_from_cmake.py),
  and it had some superfluous deps not present in the cmake build.

- Merge r364474 (clang DependencyScanning lib) more: The deps didn't
  quite match cmake.

llvm-svn: 364501
2019-06-27 06:08:57 +00:00
Vitaly Buka
b124a6f641 [GN] Fix check-llvm
llvm-svn: 364493
2019-06-27 01:35:47 +00:00
Vitaly Buka
e36b0ead66 [GN] Update build files
llvm-svn: 364491
2019-06-27 01:34:19 +00:00
Jinsong Ji
567b20e96f [UpdateTestChecks][NFC] Remove entries with same prefix
Matching is 'lossy', triples with same prefix can be dropped.

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

llvm-svn: 364471
2019-06-26 20:35:19 +00:00
Clement Courbet
32162cf4ab Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."
Breaks sanitizers:
    libFuzzer :: cxxstring.test
    libFuzzer :: memcmp.test
    libFuzzer :: recommended-dictionary.test
    libFuzzer :: strcmp.test
    libFuzzer :: value-profile-mem.test
    libFuzzer :: value-profile-strcmp.test

llvm-svn: 364416
2019-06-26 12:13:13 +00:00
Clement Courbet
147c7c78fd [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline.
This allows later passes (in particular InstCombine) to optimize more
cases.

One that's important to us is `memcmp(p, q, constant) < 0` and memcmp(p, q, constant) > 0.

llvm-svn: 364412
2019-06-26 11:50:18 +00:00
Nico Weber
6ef9079baa gn build: Merge r364387
llvm-svn: 364411
2019-06-26 11:44:54 +00:00
Nico Weber
567eeeb5cb gn build: Merge r364386
llvm-svn: 364409
2019-06-26 11:35:28 +00:00
Nico Weber
c32aa991f5 gn build: Merge r364389
llvm-svn: 364408
2019-06-26 11:33:56 +00:00
Peter Collingbourne
0a5233631d gn build: Merge r364288.
llvm-svn: 364374
2019-06-26 01:52:22 +00:00
Erich Keane
dfe596f79b Teach TableGen Intrin Emitter to handle LLVMPointerType<llvm_any_ty>
r363233 rewrote a bunch of the Intrin Emitter code, however the new
function to update the arg codes did not properly consider a pointer to
an any.  This patch adds that logic.

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

llvm-svn: 364364
2019-06-26 00:08:22 +00:00
Jinsong Ji
17dfc77db2 [PowerPC][UpdateTestChecks] powerpc- triple support
There are quite some old testcases with powerpc- triple,
we should add this triple support so that we can update them with script.

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

llvm-svn: 364213
2019-06-24 18:00:34 +00:00
Petr Hosek
2d4cc0324c [GN] Generation failure caused by trailing space in file name
When I executed gn.py gen out/gn I got the following error:

ERROR at //compiler-rt/lib/builtins/BUILD.gn:162:7: Only source, header, and object files belong in the sources of a static_library. //compiler-rt/lib/builtins/emutls.c  is not one of the valid types.
      "emutls.c ",
      ^----------
See //compiler-rt/lib/BUILD.gn:3:5: which caused the file to be included.
    "//compiler-rt/lib/builtins",
    ^---------------------------
It turns out to be that the latest gn doesn't accept ill-format file name. And the emutls.c above has a trailing space.
Remove the trailing space should work.

Patch By: myhsu
Differential Revision: https://reviews.llvm.org/D63449

llvm-svn: 364162
2019-06-23 23:12:10 +00:00
Peter Collingbourne
db30d3db90 gn build: Merge r364046.
llvm-svn: 364116
2019-06-22 00:03:53 +00:00
Vitaly Buka
dd00882728 [GN] Fix check-clang by disabling plugins
We can't link Analysis/plugins without -fPIC

llvm-svn: 364016
2019-06-21 09:54:32 +00:00
Vitaly Buka
74d422f345 [GN] Put libcxx include into the same place as cmake to fix Driver/print-file-name.c test
llvm-svn: 364015
2019-06-21 09:54:31 +00:00
Vitaly Buka
a8a4c789d1 [GN] Fix build
llvm-svn: 364004
2019-06-21 02:15:07 +00:00
Nico Weber
43fce14f4a gn build: Merge r363948
llvm-svn: 363960
2019-06-20 18:18:40 +00:00
Philip Reames
8f81953d2f [Util] Add a helper script for converting -print-before-all output into a file based equivelent
Simple little utility which takes a opt logfile generated with "opt -print-before-all -print-module-scope -o /dev/null <args> 2&>1", and splits into a series of individual "chunk-X.ll" files. The intended purpose is to help automate one step in failure reduction.

The imagined workflow is:

    New crasher bug reported against clang or other frontend
    Frontend run with -emit-llvm equivalent and manually confirmed that opt -O2 <emit.ll> crashes
    Run this splitter script
    Manually map pass name to invocation command (next on the to automate list)
    Run bugpoint on last chunk file + manual command

I chose to dump every chunk rather than only the last since miscompile debugging frequently requires either manual step by step reduction, or cross feeding IR into different compiler versions. Not an immediate target, but there may be applications.

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

llvm-svn: 363884
2019-06-19 22:05:47 +00:00
Peter Collingbourne
c5718594b4 gn build: Merge r363757.
llvm-svn: 363865
2019-06-19 19:11:23 +00:00
Peter Collingbourne
ab2c5fbe14 gn build: Merge r363848.
llvm-svn: 363864
2019-06-19 19:11:14 +00:00
Peter Collingbourne
ca689c2a08 gn build: Merge r363846.
llvm-svn: 363863
2019-06-19 19:11:05 +00:00
Peter Collingbourne
6e889c81f7 gn build: Merge r363794.
llvm-svn: 363862
2019-06-19 19:10:56 +00:00
Peter Collingbourne
8456358650 gn build: Merge r363680.
llvm-svn: 363861
2019-06-19 19:10:47 +00:00
Peter Collingbourne
a3871004ab gn build: Merge r363712.
llvm-svn: 363860
2019-06-19 19:10:38 +00:00
Daniel Sanders
0aa9e9e230 Re-commit r363744: [tblgen][disasm] Allow multiple encodings to disassemble to the same instruction
It seems macOS lets you have ArrayRef<const X> even though this is apparently
forbidden by the language standard (Thanks MSVC++ for the clear error message).
Removed the problematic const's to fix this.

(It also seems I'm not receiving buildbot emails anymore and I'm trying to find
 out why. In the mean time I'll be polling lab.llvm.org to hopefully see if/when
 failures occur)

llvm-svn: 363753
2019-06-18 23:34:46 +00:00
Jordan Rupprecht
5f50076bbf Revert [tblgen][disasm] Allow multiple encodings to disassemble to the same instruction
This reverts r363744 (git commit 9b2252123d1e79d2b3594097a9d9cc60072b83d9)

This breaks many buildbots, e.g. http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/203/steps/build%20stage%201/logs/stdio

llvm-svn: 363747
2019-06-18 22:21:31 +00:00
Daniel Sanders
532a61be1c [tblgen][disasm] Allow multiple encodings to disassemble to the same instruction
Summary:
Add an AdditionalEncoding class which can be used to define additional encodings
for a given instruction. This causes the disassembler to add an additional
encoding to its matching tables that map to the specified instruction.

Usage:
  def ADD1 : Instruction {
    bits<8> Reg;
    bits<32> Inst;

    let Size = 4;
    let Inst{0-7} = Reg;
    let Inst{8-14} = 0;
    let Inst{15} = 1; // Continuation bit
    let Inst{16-31} = 0;
    ...
  }
  def : AdditionalEncoding<ADD1> {
    bits<8> Reg;
    bits<16> Inst; // You can also have bits<32> and it will still be a 16-bit encoding
    let Size = 2;
    let Inst{0-3} = 0;
    let Inst{4-7} = Reg;
    let Inst{8-15} = 0;
    ...
  }
with those definitions, llvm-mc will successfully disassemble both of these:
  0x01 0x00
  0x10 0x80 0x00 0x00
to:
  ADD1 r1

Depends on D52366

Reviewers: bogner, charukcs

Reviewed By: bogner

Subscribers: nlguillemot, nhaehnle, llvm-commits

Tags: #llvm

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

llvm-svn: 363744
2019-06-18 21:56:04 +00:00
Adrian McCarthy
e357098006 Fix some lit test ResourceWarnings on Windows
When running LLDB lit tests on Windows, the system selects a debug version
of Python, which was issuing lots of ResourceWarnings about files that
weren't closed.  There are two kinds of them, and each test triggered one
of each.

This patch fixes one kind by ensuring TestRunner explicitly close the
temporary files created for routing stderr.  This is important on Windows
but has no net effect on Posix systems.

The remaining ResourceWarnings are more elusive; the bug may lie in
the Python library subprocess.py, and it may be Windows-specific.

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

llvm-svn: 363700
2019-06-18 16:36:57 +00:00
Nico Weber
106284874f gn build: Merge r363658
llvm-svn: 363673
2019-06-18 12:29:04 +00:00
Nico Weber
a55cae1e66 gn build: Merge r363649
This reverts commit "gn build: Merge r363626" because r363626
was reverted in r363649.

llvm-svn: 363672
2019-06-18 12:26:31 +00:00
Diogo N. Sampaio
66545ae9c9 [NFC] Improve triple match of scripts that update tests
Summary:
The prior behavior of the triple matcher would stop
in the first matched triple. It was not possible to
create specific matches for sub-sets of a triple
(e.g aarch64-apple-darwin would never be used after
aarch64 was matched).

This patch:
1) Allows that specialized triples take priority,
considering that the string lenght of the triple
indentifies how specialized a triple is. If two
triples of same lenght match, the one matched first
prevails, preserving the old behavior.

2) Remove 20 duplicated triples of arm, thumb,
aarch64 options with same arguments, matching
the common prefix (aarch64, arm, thumb) of them.

3) Creates three new function matching regexes and
five triple options for arm64-apple-ios,
(arm|thumb)-apple-ios and thumb(v5)?-macho

Reviewers: lebedev.ri, RKSimon, MaskRay, gbedwell

Reviewed By: MaskRay

Subscribers: javed.absar, kristof.beyls, llvm-commits, carwil

Tags: #llvm

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

llvm-svn: 363656
2019-06-18 10:04:36 +00:00