1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
Commit Graph

8105 Commits

Author SHA1 Message Date
Kristof Beyls
dd6caf357c find_interesting_reviews.py: avoid crash on non-ascii data. 2019-11-08 14:51:36 +00:00
LLVM GN Syncbot
c74c2064a9 gn build: Merge 0dc0572b48e 2019-11-08 14:31:11 +00:00
LLVM GN Syncbot
e6acdc66c8 gn build: Merge 25ee861372f 2019-11-07 22:43:50 +00:00
Simon Pilgrim
9604d663fd AsmWriterOperand - fix uninitialized variable warning. NFCI. 2019-11-07 16:56:15 +00:00
Nico Weber
9d9d0f8396 Revert "gn build: (manually) merge b5913e6d2f"
This reverts commit c52efdc52cef2597a1d21595a9685e2f798025b8,
because b5913e6d2f got reverted.
2019-11-06 20:52:29 -05:00
Matt Arsenault
bb02da34a0 TableGen: Remove assert that pattern results match input number
AMDGPU has some atomic instructions that do not return the previous
result, and can only be selected if there are no uses. The source
pattern will only match if the use is empty, so it should be safe to
discard the result.
2019-11-06 16:06:37 -08:00
Nico Weber
2f60cbb6e9 gn build: (manually) merge b5913e6d2f 2019-11-06 18:26:56 -05:00
Joel E. Denny
7fc52c9da6 [lit] Protect full test suite from FILECHECK_OPTS
lit's test suite calls lit multiple times for various sample test
suites.  `FILECHECK_OPTS` is safe for FileCheck calls in lit's test
suite.  It's not safe for FileCheck calls in the sample test suites,
whose output affects the results of lit's test suite.

Without this patch, only one such sample test suite is protected from
`FILECHECK_OPTS`, and currently `shtest-shell.py` breaks with
`FILECHECK_OPTS=-vv`.  Moreover, it's hard to predict the future,
especially false passes.  Thus, this patch protects all existing and
future sample test suites from `FILECHECK_OPTS` (and the deprecated
`FILECHECK_DUMP_INPUT_ON_FAILURE`).

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D65156
2019-11-06 16:25:25 -05:00
Simon Pilgrim
45791378ea CodeGenInstruction - fix uninitialized variable warnings. NFCI. 2019-11-06 17:04:21 +00:00
Simon Pilgrim
f134f16f11 X86FoldTablesEmitter - fix static analyzer potential invalid iterator warning. NFCI. 2019-11-06 13:31:00 +00:00
LLVM GN Syncbot
fa9d8e37f8 gn build: Merge 24130d661ed 2019-11-06 08:29:28 +00:00
Volodymyr Sapsai
2d616bdac4 Revert "[analyzer] Add test directory for scan-build."
This reverts commit 0aba69eb1a01c44185009f50cc633e3c648e9950 with
subsequent changes to test files.

It caused test failures on GreenDragon, e.g.,
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/
2019-11-05 14:03:36 -08:00
Julian Lettner
0752aef3ee Revert "[lit] Better/earlier errors when no tests are executed"
This reverts commit d8f2bff75126c6dde694ad245f9807fa12ad5630.
2019-11-05 12:10:43 -08:00
Joel E. Denny
729f23e751 [lit] Fix not calling internal commands
Without this patch, when using lit's internal shell, if `not` on a lit
RUN line calls `env`, `diff`, or any of the other in-process shell
builtins that lit implements, lit accidentally searches for the latter
as an external executable.  What's worse is that works fine when a
developer is testing on a platform where those executables are
available and behave as expected, but it then breaks on other
platforms.

`not` seems useful for some builtins, such as `diff`, so this patch
supports such uses.  `not --crash` does not seem useful for builtins,
so this patch diagnoses such uses.  In all cases, this patch ensures
shell builtins are found behind any sequence of `env` and `not`
commands.

`not` calling `env` calling an external command appears useful when
the `env` and external command are part of a lit substitution, as in
D65156.  This patch supports that by looking through any sequence of
`env` and `not` commands, building the environment from the `env`s,
and storing the `not`s.  The `not`s are then added back to the command
line without the `env`s to execute externally.  This avoids the need
to replicate the `not` implementation, in particular the `--crash`
option, in lit.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D66531
2019-11-05 14:09:21 -05:00
jmolloy
548ef37194 [DFAPacketizer] Allow up to 64 functional units
Summary:
To drive the automaton we used a uint64_t as an action type. This
contained the transition's resource requirements as a conjunction:

  (a OR b) AND (b OR c)

We encoded this conjunction as a sequence of four 16-bit bitmasks.
This limited the number of addressable functional units to 16, which
is quite low and has bitten many people in the past.

Instead, the DFAEmitter now generates a lookup table from InstrItinerary
class (index of the ItinData inside the ProcItineraries) to an internal
action index which is essentially a dense embedding of the conjunctive
form. Because we never materialize the conjunctive form, we no longer
have the 16 FU restriction.

In this patch we limit to 64 functional units due to using a uint64_t
bitmask in the DFAEmitter. Now that we've decoupled these representations
we can increase this in future.

Reviewers: ThomasRaoux, kparzysz, majnemer

Reviewed By: ThomasRaoux

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69110
2019-11-05 15:41:42 +00:00
Devin Coughlin
902d726973 [analyzer] Add test directory for scan-build.
The static analyzer's scan-build script is critical infrastructure but
is not well tested. To start to address this, add a new test directory under
tests/Analysis for scan-build lit tests and seed it with several tests. The
goal is that future scan-build changes will be accompanied by corresponding
tests.

Differential Revision: https://reviews.llvm.org/D69781
2019-11-04 20:26:35 -08:00
Julian Lettner
b26b6f0aa3 [lit] Move measurement of testing time out of Run.execute 2019-11-04 10:16:24 -08:00
Julian Lettner
726e2ac362 [lit] Better/earlier errors when no tests are executed
Fail early, when we discover no tests at all, or filter out all of them.
2019-11-04 10:16:24 -08:00
LLVM GN Syncbot
23303b3019 gn build: Merge 40d0d4e2335 2019-11-04 17:20:23 +00:00
Nico Weber
148929db9f gn build: (manually) merge 51b4b17eb
Also reverts r353980 since that duplicated the GenAsmMatcher target for
AArch64. Instead use visiblity.
2019-11-04 09:51:41 -05:00
Nico Weber
8912b9c60d gn build: run "gn format" 2019-11-04 09:50:16 -05:00
Nico Weber
c83c0227fd gn build: add deps, see discussion on D69130 2019-11-04 09:22:12 -05:00
Nico Weber
83efdf102e gn build: (manually) merge 3a399c09 / add76dd3c 2019-11-03 12:52:54 -05:00
Simon Pilgrim
02298af81b Stop static analyzer warnings about using bitwise operators on booleans. NFCI.
Call each of the rebase_if() calls separately.
2019-11-02 22:40:04 +00:00
Simon Pilgrim
9c641d37b8 MatchTableRecord::emit - fix boolean operator precedence warnings from PVS Studio. NFCI.
Make it clear that (Flags & MTRF_????) should resolve to a boolean.
2019-11-02 21:04:07 +00:00
Dávid Bolvanský
197accdae6 Revert "[Codegen] Both sides of '&&' are same; fixed"
This reverts commit edb42dccfafb2c0d25d19175c49d016a7c2e0b13. Buildbot timeouts.
2019-11-02 19:02:33 +01:00
Dávid Bolvanský
7d756df5a7 [Codegen] Both sides of '&&' are same; fixed
Summary:
Found by PVS Studio

Not familiar with this code; no testcase.

Reviewers: craig.topper, RKSimon

Reviewed By: RKSimon

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69741
2019-11-02 16:43:16 +01:00
Joel E. Denny
723914170d [lit] Fix internal env calling env
Without this patch, when using lit's internal shell, if `env` on a lit
RUN line calls `env`, lit accidentally searches for the latter as an
external executable.  What's worse is that works fine when a developer
is testing on a platform where `env` is available and behaves as
expected, but it then breaks on other platforms.

`env` calling `env` can make sense if one such `env` is within a lit
substitution, as in D65156 and D65121.  This patch ensures that lit
executes both as internal commands.

Reviewed By: probinson, mgorny, rnk

Differential Revision: https://reviews.llvm.org/D65697
2019-11-01 14:08:52 -04:00
Johannes Doerfert
904ec54f8e [Utils] Hide the default behavior change of D68819 under a flag
With D69701, the options used when running the script on a file will be
recorded and reused on a rerun. This allows us to hide new features
behind flags, starting with the "define" that was introduced in D68819.
2019-11-01 11:34:00 -05:00
LLVM GN Syncbot
edf77d410d gn build: Merge d36a0333102 2019-11-01 15:17:32 +00:00
Roman Tereshin
a86792ba95 [GlobalISel] Match table opt: fix a bug in matching num of operands
If there is a dag node with a variable number of operands that has at
least N operands (for some non-negative N), and multiple patterns with
that node with different number of operands, we would drop the number of
operands check in patterns with N operands, presumably because it's
guaranteed in such case that none of the per-operand checks will access
the operand list out-of-bounds.

Except semantically the check is about having exactly N operands, not at
least N operands, and a backend might rely on it to disambiguate
different patterns.

In this patch we change the condition on emitting the number of operands
check from "the instruction is not guaranteed to have at least as many
operands as are checked by the pattern being matched" to "the
instruction is not guaranteed to have a specific number of operands".

We're relying (still) on the rest of the CodeGenPatterns mechanics to
validate that the pattern itself doesn't try to access more operands
than there is in the instruction in cases when the instruction does have
fixed number of operands, and on the machine verifier to validate at
runtime that particular MIs like that satisfy the constraint as well.

Reviewers: dsanders, qcolombet

Reviewed By: qcolombet

Subscribers: arsenm, rovka, Petar.Avramovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69653
2019-11-01 01:57:48 -07:00
Simon Atanasyan
63c8773887 [utils] Reflow asm check generation to tolerate blank lines
This change introduces two fixes. The second fix allows to generate
a test to check the first fix.

- Output `CHECK-EMPTY` prefix for an empty line in ASM output. Before that
  fix `update_llc_test_checks.py` incorrectly emits `CHECK-NEXT: <space>`
  prefix.
- Fix the `ASM_FUNCTION_MIPS_RE` regex to stop on a real function
  epilogue not on an inline assembler prologue and include inline
  assembler code into a test.

Differential Revision: https://reviews.llvm.org/D47192
2019-11-01 09:42:48 +03:00
Matt Arsenault
e736d60a93 Fix update_mir_test_checks after 3598b8100 2019-10-31 20:08:28 -07:00
LLVM GN Syncbot
8d6ff505c0 gn build: Merge e72e59e9028 2019-10-31 23:15:09 +00:00
Peter Collingbourne
71aebd8c16 gn build: Add support for cross-compiling the builtins and profile runtimes for Android aarch64 and arm.
Differential Revision: https://reviews.llvm.org/D69681
2019-10-31 15:47:20 -07:00
Alex Richardson
48c9bf1f95 [update_cc_test_checks.py] Pass the builtin include dir to clang
Summary:
This is required to update tests that make use of builtin headers. To fix
this use the same command expansion as lit does for %clang_cc1. I tested
this by updating clang/test/CodeGen/arm-mve-intrinsics/scalar-shifts.c.
%clang_cc1 will now expand to `clang -cc1 -internal-isystem
$LLVM_BUILD/lib/clang/$VERSION/include -nostdsysteminc`.

Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: kristof.beyls, dmgreen, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69611
2019-10-31 21:18:33 +00:00
Peter Collingbourne
2bf23c7e0e gn build: s/target_/current_/g in compiler-rt/lib/{builtins,profile}.
Fixes stage2 cross compilation.

Differential Revision: https://reviews.llvm.org/D69680
2019-10-31 14:03:39 -07:00
Nico Weber
aeb961875a Revert "gn build: (manually) merge ec66603ac7"
This reverts commit df899f2272330ef42739500b2f7f25d17d2c8dcb.
Looks like ec66603ac7 was reverted recently.
2019-10-31 16:30:01 -04:00
Nico Weber
6c6e80f196 gn build: (manually) merge ec66603ac7 2019-10-31 16:28:50 -04:00
Johannes Doerfert
649bdfef2e [Utils][FIX] Unbreak update_XXX_test_checks after 3598b810029d
The users of build_function_body_dictionary and add_checks need to be
adjusted after the changes in UpdateTestChecks/common.py.
2019-10-31 13:43:27 -05:00
Julian Lettner
bf5dfd5af4 [lit] Extract Display.print_header function 2019-10-31 11:43:20 -07:00
Julian Lettner
a7dbaf3c9c [lit] Always print newline before test time/summary
Slightly decreases the time I need to parse the test summary.
2019-10-31 11:43:20 -07:00
Joel E. Denny
02f7cc6f6f [lit] Fix internal env calling other internal commands
Without this patch, when using lit's internal shell, if `env` on a lit
RUN line calls `cd`, `mkdir`, or any of the other in-process shell
builtins that lit implements, lit accidentally searches for the latter
as an external executable.

This patch puts such builtins in a map so that boilerplate for them
need be implemented only once.  This patch moves that handling after
processing of `env` so that `env` calling such a builtin can be
detected.  Finally, because such calls appear to be useless, this
patch takes the safe approach of diagnosing them rather than
supporting them.

Reviewed By: probinson, mgorny, rnk

Differential Revision: https://reviews.llvm.org/D66506
2019-10-31 14:37:51 -04:00
Julian Lettner
2b77dc62da [lit] Rename ProgressDisplay -> Display 2019-10-31 10:23:19 -07:00
Nico Weber
f068cde8d0 gn build: (manually) merge cd24a00 more 2019-10-31 09:12:53 -04:00
Nico Weber
d518f5c9d0 gn build: (manually) merge b32bae6f760 2019-10-31 07:38:21 -04:00
Johannes Doerfert
16ae1f547b [Utils] Allow update_test_checks to check function information
Summary:
This adds a switch to the update_test_checks that triggers arguments and
other function annotations, e.g., personality, to be present in the
check line. If not set, the behavior should be the same as before.
If arguments are recorded, their names are scrubbed from the IR to allow
merging.

This patch includes D68153.

Reviewers: lebedev.ri, greened, spatel, xbolva00, RKSimon, mehdi_amini

Subscribers: bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68819
2019-10-30 20:40:42 -05:00
Reid Kleckner
d6b52c4d18 [lit] Add missing import
Apparently llvm-lit.py does not execute this path
2019-10-30 16:32:28 -07:00
Reid Kleckner
fbcf20e723 [lit] Silence warning about importing the resource module on Windows
lit was printing this warning on every test run on Windows, and that is
not necessary.
2019-10-30 16:11:16 -07:00
LLVM GN Syncbot
40640b50a0 gn build: Merge 33a745e6fe7 2019-10-30 22:28:00 +00:00