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

9744 Commits

Author SHA1 Message Date
Nico Weber
7d651b066b [gn build] Port 1a2b3536efef 2021-02-19 07:23:48 -05:00
Kazu Hirata
6e1c09263f [TableGen] Use ListSeparator (NFC) 2021-02-18 22:46:39 -08:00
Nico Weber
89f39afb65 [gn build] assert that goma_dir and sysroot are set for goma builds 2021-02-18 18:30:26 -05:00
Nico Weber
1f0fc8fadb [gn build] kind of merge f020544601
Fixes check-llvm with a clean build dir.
2021-02-18 16:12:32 -05:00
Nico Weber
5d1a8a5c59 [gn build] try to fix libxml2 include path on mac after 0ec448194e29 2021-02-18 14:40:14 -05:00
Nico Weber
757da1bc62 [gn build] fix mistake in 0ec448194e29 2021-02-18 11:58:19 -05:00
Craig Topper
5c5e25358e [TableGen][SelectionDAG] Improve efficiency of encoding negative immediates for isel's CheckInteger opcode.
CheckInteger uses an int64_t encoded using a variable width encoding
that is optimized for encoding a number with a lot of leading zeros.
Negative numbers have no leading zeros so use the largest encoding
requiring 9 bytes.

I believe its most like we want to check for positive and negative
numbers near 0. -1 is quite common due to its use in the 'not'
idiom.

To optimize for this, we can borrow an idea from the bitcode format
and move the sign bit to bit 0 with the magnitude stored in the
upper bits. This will drastically increase the number of leading
zeros for small magnitudes. Then we can run this value through
VBR encoding.

This gives a small reduction in the table size on all in tree
targets except VE where size increased by about 300 bytes due
to intrinsic ids now requiring 3 bytes instead of 2. Since the
intrinsic enum space is shared by all targets this an unfortunate
consquence of where VE is currently located in the range.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D96317
2021-02-18 08:53:17 -08:00
Nico Weber
6764399355 sysroot.py: add support for darwin
This is a tiny bit messy because compiler-rt needs different sysroots for
macOS, iOS, etc. We want sysroot.py to create something that is a hermetic
representation of all build deps, so it needs to create a directory that
contains all needed SDKs, and these subdirectories are then passed to
cmake which passes each of these _subdirectories_ as different -isysroot
flags while building the runtime libraries.

Differential Revision: https://reviews.llvm.org/D96958
2021-02-18 10:48:18 -05:00
Nico Weber
69f19c9fbe [gn build] add a comment to the goma_dir arg 2021-02-17 19:36:36 -05:00
LLVM GN Syncbot
3e7a312596 [gn build] Port 7397905ab0a0 2021-02-17 23:33:31 +00:00
Nico Weber
db7dbe9e8d [gn build] make WindowsManifestMerger.cpp build fine with sysroot
This already works in the cmake build.

Differential Revision: https://reviews.llvm.org/D96889
2021-02-17 15:03:46 -05:00
Nico Weber
b4b6eeb835 sysroot.py: add support for non-darwin platforms
CMAKE_SYSROOT works fine here, and `sysroot.py make-fake`
borders on trivial here, but I suppose it's still nice
to have a consistent script to set these up across platforms.

And these are the platforms where we can do real sysroot management one
day.

Differential Revision: https://reviews.llvm.org/D96882
2021-02-17 13:57:16 -05:00
LLVM GN Syncbot
1d1e43fa3b [gn build] Port c28622fbf363 2021-02-17 18:30:02 +00:00
Nico Weber
a1fbabfd4c build: Add LLVM_WINSYSROOT to make setting /winsysroot easy on Win
Also add a script for sysroot management. For now, it can only create
fake sysroots that just symlink to local folders. This is useful for
testing.

Differential Revision: https://reviews.llvm.org/D96868
2021-02-17 10:27:25 -05:00
David Zarzycki
4d99d51ea2 [lit] Add "early_tests" config option
With enough cores, the slowest tests can significantly change the total testing time if they happen to run late. With this change, a test suite can improve performance (for high-end systems) by listing just a few of the slowest tests up front.

Reviewed By: jdenny, jhenderson

Differential Revision: https://reviews.llvm.org/D96594
2021-02-17 06:32:04 -05:00
Thomas Preud'homme
b894f8c766 Add lit config for dir with standalone tests
Some test systems do not use lit for test discovery but only for its
substitution and test selection because they use another way of managing
test collections, e.g. CTest. This forces those tests to be invoked with
lit --no-indirectly-run-check. When a mix of lit version is in use, it
requires to detect the availability of that option.

This commit provides a new config option standalone_tests to signal a
directory made of tests meant to run as standalone. When this option is
set, lit skips test discovery and the indirectly run check. It also adds
the missing documentation for --no-indirectly-run-check.

Reviewed By: jdenny

Differential Revision: https://reviews.llvm.org/D94766
2021-02-17 10:38:58 +00:00
Cassie Jones
f638cb4edc [vim] Highlight most common MIR syntax not in LLVM IR
This adds highlighting for MIR instruction opcodes, physical registers,
and MIR types.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D95553
2021-02-17 02:39:03 -05:00
Cassie Jones
7f4b320ea8 [vim] Add initial syntax definition for .mir files
This initial definition handles the yaml container and the embedding of
the inner IRs. As a stopgap, this reuses the LLVM IR syntax highlighting
for the MIR function bodies--even though it's not technically correct,
it produces decent highlighting for a first pass.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D95552
2021-02-17 02:38:16 -05:00
LLVM GN Syncbot
bb770362c3 [gn build] Port 6fd5ccff72ee 2021-02-17 00:53:56 +00:00
LLVM GN Syncbot
b5ada42319 [gn build] Port c761fe77bdca 2021-02-16 22:13:03 +00:00
LLVM GN Syncbot
5272bea13d [gn build] Port ecea7218fb9b 2021-02-16 19:23:52 +00:00
LLVM GN Syncbot
dc45992690 [gn build] Port 310b35304cdf 2021-02-16 19:23:52 +00:00
LLVM GN Syncbot
b4a0a33923 [gn build] Port 40cc63ea6eec 2021-02-16 14:23:58 +00:00
LLVM GN Syncbot
e58b03a0de [gn build] Port 9510b0940265 2021-02-16 09:12:07 +00:00
Mircea Trofin
8e7a42d250 [NFC] Remove spurious ';' on return line in python code 2021-02-15 08:42:02 -08:00
Simon Pilgrim
1d8b1112ab Fix MSVC natvis visualisation of llvm::FixedVectorTyID and ScalableVectorTyID
VectorTyID was replaced with FixedVectorTyID and ScalableVectorTyID
2021-02-15 13:43:31 +00:00
LLVM GN Syncbot
803e1c570b [gn build] Port 5786f64a4ec8 2021-02-15 09:52:10 +00:00
Arlo Siemsen
d4eefe6819 Add ehcont section support
In the future Windows will enable Control-flow Enforcement Technology (CET aka shadow stacks). To protect the path where the context is updated during exception handling, the binary is required to enumerate valid unwind entrypoints in a dedicated section which is validated when the context is being set during exception handling.

This change allows llvm to generate the section that contains the appropriate symbol references in the form expected by the msvc linker.

This feature is enabled through a new module flag, ehcontguard, which was modelled on the cfguard flag.

The change includes a test that when the module flag is enabled the section is correctly generated.

The set of exception continuation information includes returns from exceptional control flow (catchret in llvm).

In order to collect catchret we:
1) Includes an additional flag on machine basic blocks to indicate that the given block is the target of a catchret operation,
2) Introduces a new machine function pass to insert and collect symbols at the start of each block, and
3) Combines these targets with the other EHCont targets that were already being collected.

Change originally authored by Daniel Frampton <dframpto@microsoft.com>

For more details, see MSVC documentation for `/guard:ehcont`
  https://docs.microsoft.com/en-us/cpp/build/reference/guard-enable-eh-continuation-metadata

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D94835
2021-02-15 14:27:12 +08:00
LLVM GN Syncbot
615e1b5852 [gn build] Port 656ead1fb7db 2021-02-14 19:23:24 +00:00
Kazu Hirata
d66c382a33 [TableGen] Use ListSeparator (NFC) 2021-02-13 20:41:36 -08:00
Kazu Hirata
33601fbc90 [TableGen] Use ListSeparator (NFC) 2021-02-12 23:44:30 -08:00
Arthur Eubanks
6bb03a7eef [gn build] Add missing llvm-profgen dependency
Or else a clean build fails with missing Attributes.inc.
2021-02-12 12:44:17 -08:00
LLVM GN Syncbot
5ea384d16f [gn build] Port cb2d2ae56ae3 2021-02-12 18:40:40 +00:00
Lukas Sommer
ca692e8e27 [CodeGen] New pass: Replace vector intrinsics with call to vector library
This patch adds a pass to replace calls to vector intrinsics (i.e., LLVM
intrinsics operating on vector operands) with calls to a vector library.

Currently, calls to LLVM intrinsics are only replaced with calls to vector
libraries when scalar calls to intrinsics are vectorized by the Loop- or
SLP-Vectorizer.

With this pass, it is now possible to replace calls to LLVM intrinsics
already operating on vector operands, e.g., if such code was generated
by MLIR. For the replacement, information from the TargetLibraryInfo,
e.g., as specified via -vector-library is used.

This is a re-try of the original commit 2303e93e66 that was reverted
due to pass manager problems. Other minor changes have also been made.

Differential Revision: https://reviews.llvm.org/D95373
2021-02-12 12:53:27 -05:00
LLVM GN Syncbot
adf90c61ff [gn build] Port ba3ea9c60f0f 2021-02-12 16:56:34 +00:00
Jay Foad
3fbdec87d1 [TableGen][GlobalISel] Allow duplicate RendererFns
Allow different GICustomOperandRenderers to use the same RendererFn.
This avoids the need for targets to define a bunch of identical C++
renderer functions with different names.

Without this fix TableGen would have emitted code that tried to define
the GICR enumeration with duplicate enumerators.

Differential Revision: https://reviews.llvm.org/D96587
2021-02-12 15:05:32 +00:00
Kazu Hirata
01ea295bd7 [TableGen] Use ListSeparator (NFC) 2021-02-11 23:31:27 -08:00
Peter Collingbourne
f547c482fb gn build: Support cross-compiling libunwind for Android.
- Usual cross-compilation fix: s/target_/current_/g

- Define _LIBUNWIND_IS_NATIVE_ONLY to enable unwinding past
  functions with return pointer authentication.

- Android needs two libunwind static libraries: one with symbols exported and
  one without. These both need to be in the same build tree so
  the libunwind_hermetic_static_library configuration option doesn't
  help here. Replace it with build rules that build both libraries.

- Install the libraries in the location that Android expects them to be.

Differential Revision: https://reviews.llvm.org/D96563
2021-02-11 21:47:33 -08:00
Craig Topper
47244a42c7 [TableGen] Make the map in InfoByHwMode protected. NFCI
Switch some for loops to just use the begin()/end() implementations
in the InfoByHwMode struct.

Add a method to insert into the map for the one case that was
modifying the map directly.
2021-02-11 21:16:10 -08:00
Nico Weber
a74bdbb4a4 [gn build] port ed98676fa483 2021-02-11 12:41:29 -05:00
Nico Weber
741d1ffc50 [gn build] Port 7e3b9aba609f 2021-02-11 11:54:51 -05:00
Nico Weber
e16edde8ce [gn build] Port b4993cf54d7f 2021-02-11 07:20:21 -05:00
Kazu Hirata
be876e8742 [TableGen] Use ListSeparator (NFC) 2021-02-10 20:01:20 -08:00
Jameson Nash
adecc4fab7 Renovate CMake files in the llvm-exegesis tool.
This attempts to move all tools over to using `add_llvm_library` for
better consistency. After doing this, I noticed it ended up as nearly a
reimplementation of https://reviews.llvm.org/rL342148, which later got
reverted in r342336 (b09a8c9bd9b819741b38071a7ccd95042ef2643a).

With ccache and ninja on a large core machine (40), I haven't run into
build errors, so I'm hopeful it's better now, though it doesn't seem to
be any different / new.

Reviewed By: stephenneuendorffer

Differential Revision: https://reviews.llvm.org/D90970
2021-02-10 14:22:55 -05:00
Nico Weber
84c12c061a [gn build] (manually) port e89fcbfad6a3 2021-02-10 08:59:07 -05:00
Kazu Hirata
14e0945738 [TableGen] Use ListSeparator (NFC) 2021-02-09 22:14:27 -08:00
LLVM GN Syncbot
2603848e47 [gn build] Port 40c261c41c4c 2021-02-09 09:19:31 +00:00
Kazu Hirata
8735641dcd [TableGen] Use ListSeparator (NFC) 2021-02-08 22:33:51 -08:00
LLVM GN Syncbot
e840206203 [gn build] Port 87104faac433 2021-02-09 01:14:44 +00:00
Craig Topper
f0c5605a2a [TableGen] Use return value from EmitVBRValue instead of calling GetVBRSize on the same value. Consistently use unsigned for child sizes. NFCI
getSize and setSize both use unsigned. So size_t doesn't
increase range here and might get truncated if passed to
setSize.

Also not sure why EmitVBRValue was returning uint64_t, but used
an unsigned to supply the value.
2021-02-08 16:34:35 -08:00