1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
Commit Graph

9554 Commits

Author SHA1 Message Date
Kazu Hirata
46ef2cf21f [TableGen] Use llvm::erase_if (NFC) 2020-12-26 12:06:26 -08:00
Nico Weber
fb2ad81e99 clang: Build and run FrontendTests with CLANG_ENABLE_STATIC_ANALYZER=OFF too
They seem to pass fine with the analyzer off, and with this I would've
noticed my last check-clang break locally.
2020-12-23 14:27:09 -05:00
clementval
503c7c65fe [openacc][openmp][NFC] Fix typo in comments 2020-12-22 09:59:50 -05:00
Paul C. Anagnostopoulos
e6292b9b96 [MCInstrDesc] [TableGen] Reduce size of MCOperandInfo instances.
Differential Revision: https://reviews.llvm.org/D93326
2020-12-22 09:44:30 -05:00
Nico Weber
88d23da9ea [gn build] (manually) port b8c37153d5393 2020-12-22 06:35:40 -05:00
Valentin Clement
a8fe3856d0 [openacc] Use TableGen enum for default clause value
Use the TableGen feature to have enum values for clauses.
Next step will be to extend the MLIR part used currently by OpenMP
to use the same enum on the dialect side.

This patch also add function that convert the enum to StringRef to be
used on the dump-parse-tree from flang.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D93576
2020-12-21 15:07:27 -05:00
Jan Svoboda
203781f285 [TableGen] NFC: Rename variables in OptParserEmitter
Switch to the LLVM naming convention.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D93527
2020-12-21 12:36:46 +01:00
Jan Svoboda
7b0c9bd48f [TableGen] NFC: Switch to range-based for loops in OptParserEmitter
This simplifies the code a bit. No functionality change.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D93526
2020-12-21 12:36:46 +01:00
Craig Topper
29f992b269 [TableGen][ARM][X86] Detect combining IntrReadMem and IntrWriteMem.
These properties aren't additive. They are closer to ReadOnly and
WriteOnly. The default is ReadWrite. ReadMem cancels the write property and
WriteMem cancels the read property. Combining them leaves neither.

This patch checks that when we process WriteMem, the Mod flag is
still set. And for ReadMem we check that the Ref flag set still set.

I've updated 2 target intrinsics that were combining these properties.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D93571
2020-12-19 14:56:17 -08:00
LLVM GN Syncbot
fc49d91486 [gn build] Port 195f44278c4 2020-12-19 12:25:56 +00:00
Fangrui Song
b37b65492b [TableGen] Fix D90844 introduced non-determinism due to iteration over a std::map over allocated object pointers
993eaf2d69d8beb97e4695cbd919b927ed1cfe86 (D90844) is still wrong.
The allocated const Record* pointers do not have an order guarantee
so switching from DenseMap to std::map does not help.

ProcModelMapTy = std::map<const Record*, unsigned>

Sort the values instead.
2020-12-18 12:08:16 -08:00
Simon Pilgrim
992f58385f [X86] Avoid std::string creation in RecognizableInstr constructor. NFCI.
The value names in byteFromRec calls are compile time constants - just create StringRef directly instead of via std::string.
2020-12-18 16:00:41 +00:00
LLVM GN Syncbot
594960eb50 [gn build] Port e69e551e0e5 2020-12-18 13:00:09 +00:00
Mircea Trofin
a76e040629 [NFC][utils] Factor remaining APIs under FunctionTestBuilder
Finishing the refactoring started in D93413.

Differential Revision: https://reviews.llvm.org/D93506
2020-12-17 22:13:14 -08:00
Nico Weber
3aa1f027dc [gn build] Link with -Wl,--gdb-index when linking with LLD
For full-debug-info (is_debug=true / symbol_level=2 builds), this makes
linking 15% slower, but gdb startup 1500% faster (for lld: link time
3.9s->4.4s, gdb load time >30s->2s).

For link time, I ran

    bench.py -o {noindex,index}.txt \
        sh -c 'rm out/gn/bin/lld && ninja -C out/gn lld'

and then `ministat noindex.txt index.txt`:

```
x noindex.txt
+ index.txt
    N           Min           Max        Median           Avg        Stddev
x   5      3.784461     4.0200169     3.8452811     3.8754988   0.089902595
+   5       4.32496     4.6058481     4.3361208     4.4141198    0.12288267
Difference at 95.0% confidence
	0.538621 +/- 0.15702
	13.8981% +/- 4.05161%
	(Student's t, pooled s = 0.107663)
```

For gdb load time I loaded the crash in PR48392 with

    gdb -ex r --args ../out/gn/bin/ld64.lld.darwinnew @response.txt

and just stopped the time until the crash got displayed with a stopwatch
a few times. So the speedup there is less precise, but it's so
pronounced that that's ok (loads ~instantly with the patch, takes a very
long time without it).

Only doing this for LLD because I haven't tried it with other linkers.

Differential Revision: https://reviews.llvm.org/D92844
2020-12-17 15:39:00 -05:00
Nico Weber
5a3cb1f76f [gn build] (manually) merge f4c8b8031800 2020-12-17 15:09:51 -05:00
Valentin Clement
328670a855 [openmp] Remove clause from OMPKinds.def and use OMP.td info
Remove the OpenMP clause information from the OMPKinds.def file and use the
information from the new OMP.td file. There is now a single source of truth for the
directives and clauses.

To avoid generate lots of specific small code from tablegen, the macros previously
used in OMPKinds.def are generated almost as identical. This can be polished and
possibly removed in a further patch.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D92955
2020-12-17 14:08:12 -05:00
LLVM GN Syncbot
13f5c4b392 [gn build] Port dae34463e3e 2020-12-17 17:28:45 +00:00
Arthur Eubanks
3dc6698f98 [gn build] Add symbol_level to adjust debug info level
is_debug by default makes symbol_level = 2 and !is_debug means by
default symbol_level = 0.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D92958
2020-12-17 09:20:53 -08:00
Simon Pilgrim
794e749a98 [TableGen] Return const std::string& in InstrMap getName()/getFilterClass() methods. NFCI.
Avoid temp std::string instances - we're never keeping these around, just printing them to streams, converting to StringRef etc.
2020-12-17 15:23:03 +00:00
Simon Pilgrim
b8b1f24100 [TableGen] Make InstrMap::getFilterClass() const. NFCI.
Reported by cppcheck.

I've run clang-format across all the InstrMap accessors as well.
2020-12-17 14:49:58 +00:00
Xiang1 Zhang
7ce08bafea [Debugify] Support checking Machine IR debug info
Add mir-check-debug pass to check MIR-level debug info.

For IR-level, currently, LLVM have debugify + check-debugify to generate
and check debug IR. Much like the IR-level pass debugify, mir-debugify
inserts sequentially increasing line locations to each MachineInstr in a
Module, But there is no equivalent MIR-level check-debugify pass, So now
we support it at "mir-check-debug".

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D91595
2020-12-16 22:17:25 -08:00
Mircea Trofin
f7ea2a809e [NFC] factor update test function test builder as a class
This allows us to have shared logic over multiple test runs, e.g. do we
have unused prefixes, or which function bodies have conflicting outputs
for a prefix appearing in different RUN lines.

This patch is just wrapping existing functionality, and replacing its uses.
A subsequent patch would then fold the current functionality into the newly
introduced class.

Differential Revision: https://reviews.llvm.org/D93413
2020-12-16 21:12:06 -08:00
Xiang1 Zhang
085e55a045 Revert "[Debugify] Support checking Machine IR debug info"
This reverts commit 50aaa8c274910d78d7bf6c929a34fe58b1f45579.
2020-12-16 20:12:33 -08:00
Xiang1 Zhang
d9173ede20 [Debugify] Support checking Machine IR debug info
Add mir-check-debug pass to check MIR-level debug info.

For IR-level, currently, LLVM have debugify + check-debugify to generate
and check debug IR. Much like the IR-level pass debugify, mir-debugify
inserts sequentially increasing line locations to each MachineInstr in a
Module, But there is no equivalent MIR-level check-debugify pass, So now
we support it at "mir-check-debug".

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D91595
2020-12-16 18:04:05 -08:00
Nico Weber
fb6eef330d [gn build] (manually) port ddffcdf0a66 2020-12-16 20:49:56 -05:00
LLVM GN Syncbot
2be8aad619 [gn build] Port ac068e014b2 2020-12-17 00:07:28 +00:00
LLVM GN Syncbot
49d73cacf1 [gn build] Port 6eff12788ee 2020-12-16 17:38:06 +00:00
Paul C. Anagnostopoulos
0f58806903 [TableGen] Slim down the data structures in xxxGenInstrInfo.inc, step 1 2020-12-16 09:57:43 -05:00
LLVM GN Syncbot
f211f158cb [gn build] Port b9c77542e23 2020-12-16 00:03:26 +00:00
Mircea Trofin
a3554dd52a [utils] The func_dict for a prefix may just be empty
Follow up from D92965 - since we try to find failed prefixes
after each RUN line, it's possible the whole list of functions for a
prefix be non-existent, which is fine - this happens when none of the
RUN lines seen so far used the prefix.
2020-12-15 08:48:37 -08:00
Mircea Trofin
03a62f3073 [utils] Fix UpdateTestChecks case where 2 runs differ for last label
Two RUN lines produce outputs that, each, have some common parts and
some different parts. The common parts are checked under label A. The
differing parts are associated to a function and checked under labels B
and C, respectivelly.
When build_function_body_dictionary is called for the first RUN line, it
will attribute the function body to labels A and C. When the second RUN
is passed to build_function_body_dictionary, it sees that the function
body under A is different from what it has. If in this second RUN line,
A were at the end of the prefixes list, A's body is still kept
associated with the first run's function.

When we output the function body (i.e. add_checks), we stop after
emitting for the first prefix matching that function. So we end up with
the wrong function body (first RUN's A-association).

There is no reason to special-case the last label in the prefixes list,
and the fix is to always clear a label association if we find a RUN line
where the body is different.

Differential Revision: https://reviews.llvm.org/D93078
2020-12-15 07:16:54 -08:00
LLVM GN Syncbot
851d64b940 [gn build] Port d2ed9d6b7ec 2020-12-15 03:35:00 +00:00
Nico Weber
f3e89af5f2 Revert "[Debugify] Support checking Machine IR debug info"
This reverts commit c4d2d4337d50bed3cafd564daece1a197005b22b.
Necessary to revert 2a5675f11d3bc803a245c0e.
2020-12-14 22:14:48 -05:00
Xiang1 Zhang
6d8bb495f3 [Debugify] Support checking Machine IR debug info
Add mir-check-debug pass to check MIR-level debug info.

For IR-level, currently, LLVM have debugify + check-debugify to generate
and check debug IR. Much like the IR-level pass debugify, mir-debugify
inserts sequentially increasing line locations to each MachineInstr in a
Module, But there is no equivalent MIR-level check-debugify pass, So now
we support it at "mir-check-debug".

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D91595
2020-12-14 17:53:46 -08:00
Xiang1 Zhang
4721afcdaa Revert "[Debugify] Support checking Machine IR debug info"
This reverts commit 57a3d9ec4a8c1422f07264bed9f12a4ea416707e.
2020-12-14 17:48:49 -08:00
Xiang1 Zhang
437fc18cdb [Debugify] Support checking Machine IR debug info
Add mir-check-debug pass to check MIR-level debug info.

For IR-level, currently, LLVM have debugify + check-debugify to generate
and check debug IR. Much like the IR-level pass debugify, mir-debugify
inserts sequentially increasing line locations to each MachineInstr in a
Module, But there is no equivalent MIR-level check-debugify pass, So now
we support it at "mir-check-debug".

Reviewed By: djtodoro

Differential Revision: https://reviews.llvm.org/D95195
2020-12-14 17:38:01 -08:00
Nico Weber
24b5f0a405 [gn build] (semi-manually) port 19d57b5c42b 2020-12-14 18:23:15 -05:00
Nico Weber
93ca28c075 [gn build] (semi-manually) port 7ad49aec125 2020-12-14 18:22:54 -05:00
Cameron Desrochers
783e812623 [TableGen] Fixed 64-bit filters being sliced to 32 bits in FixedLenDecoderEmitter
When using the FixedLenDecoderEmitter, llvm-tblgen emits tables with (OPC_ExtractField, OPC_ExtractFilterValue) opcode sequences to match the contiguous fixed bits of a given instruction's encoding. This encoding is represented in a 64-bit integer. However, the filter values were represented in a 32-bit integer. As such, instructions with fixed 64-bit encodings resulted in a table with an OPC_ExtractField for all 64 bits, followed by an OPC_ExtractFilterValue containing just the low 32 bits of their encoding, causing the filter never to match.

The exact point at which the slicing occurred was during the map insertion at line 630.

Differential Revision: https://reviews.llvm.org/D92423
2020-12-14 12:42:35 -05:00
Harald van Dijk
90e4a4c68b [UpdateTestChecks] Add --(no-)x86_scrub_sp option.
This makes it possible to use update_llc_test_checks to manage tests
that check for incorrect x86 stack offsets. It does not yet modify any
test to make use of this new option.
2020-12-12 17:11:13 +00:00
LLVM GN Syncbot
3a9d02d48e [gn build] Port b577d2df7bd 2020-12-11 18:37:39 +00:00
LLVM GN Syncbot
05ede53067 [gn build] Port 5663bf201f5 2020-12-11 09:17:05 +00:00
LLVM GN Syncbot
6aedda7e77 [gn build] Port 9b76160e53f 2020-12-11 08:40:54 +00:00
Alexandre Ganea
6c43b14f86 Re-land: [lit] Support running tests on Windows without GnuWin32
Historically, we have told contributors that GnuWin32 is a pre-requisite
because our tests depend on utilities such as sed, grep, diff, and more.
However, Git on Windows includes versions of these utilities in its
installation. Furthermore, GnuWin32 has not been updated in many years.
For these reasons, it makes sense to have the ability to run llvm tests
in a way that is both:

a) Easier on the user (less stuff to install)
b) More up-to-date (The verions that ship with git are at least as
   new, if not newer, than the versions in GnuWin32.
We add support for this here by attempting to detect where Git is
installed using the Windows registry, confirming the existence of
several common Unix tools, and then adding this location to lit's PATH
environment.

Differential Revision: https://reviews.llvm.org/D84380
2020-12-10 21:41:54 -05:00
LLVM GN Syncbot
b446710430 [gn build] Port 705a4c149d8 2020-12-11 01:40:59 +00:00
LLVM GN Syncbot
73613a3596 [gn build] Port 7ead5f5aa38 2020-12-10 23:59:49 +00:00
Nico Weber
23fb61a411 [gn build] fix up arm64 builtin sources a bit
The fp_mode.c removal is done by filter_builtin_sources in the cmake build.
2020-12-10 16:22:48 -05:00
Nico Weber
a0359d324b [gn build] only build iOS builtins with full Xcode
Commandline tools doesn't include the iOS SDK.
2020-12-10 16:22:31 -05:00
Nico Weber
c23af21e45 [gn build] add a missing dependency 2020-12-10 16:22:26 -05:00