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

9351 Commits

Author SHA1 Message Date
Valentin Clement
683b5fd7b1 [openmp][openacc][NFC] Simplify access and validation of DirectiveBase information
This patch adds some helper in the DirectiveLanguage wrapper to initialize it from
the RecordKeeper and validate the records. This simplify arguments in lots of function
since only the DirectiveLanguge is passed.

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D90358
2020-11-03 11:13:06 -05:00
LLVM GN Syncbot
f3c13cd376 [gn build] Port 1667d23e585 2020-11-03 13:58:51 +00:00
Nico Weber
ae77e74525 [gn build] (manually) port 1af3cb5424d 2020-11-03 08:58:23 -05:00
Sam McCall
870b03306d [clangd] Fix check-clangd with no clang built
- pass required=False to use_clang(), as we don't need it
- fix required=False (which was unused and rotted):
  - make derived substitutions conditional on it
  - add a feature so we can disable tests that need it
- conditionally disable our one test that depends on %resource_dir.
  This doesn't seem right from first principles, but isn't a big deal.

Differential Revision: https://reviews.llvm.org/D90528
2020-11-02 21:10:43 +01:00
LLVM GN Syncbot
3fae7c2ab5 [gn build] Port c17da8676a0 2020-11-02 18:32:12 +00:00
Nico Weber
386c41e2e2 [gn build] Run git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format 2020-11-02 10:49:54 -05:00
Nico Weber
ed2dff4f4d [gn build] (manually) port c6eaa14e11 2020-11-02 10:43:38 -05:00
Nico Weber
f30ddf1336 [gn build] (manually) port 76a168bce01 better 2020-11-02 10:14:58 -05:00
Evgeny Leviant
6daa076b36 [TableGen][SchedModels] Fix read/write variant substitution
Patch fixes case when sched class has write and read variants belonging
to different processor models.

Differential revision: https://reviews.llvm.org/D89777
2020-11-02 17:39:04 +03:00
Nico Weber
63eb68a1b7 [gn build] (manually) port 76a168bce01 2020-11-02 09:22:44 -05:00
LLVM GN Syncbot
8b5751e5aa [gn build] Port 756f5978410 2020-10-31 05:19:04 +00:00
Mircea Trofin
3afc00f390 [FileCheck] Report missing prefixes when more than one is provided.
If more than a prefix is provided - e.g. --check-prefixes=CHECK,FOO - we
don't report if (say) FOO is never used. This may lead to a gap in our
test coverage.

This patch introduces a new option, --allow-unused-prefixes. It
currently is set to true, keeping today's behavior. After we explicitly
set it in tests where this behavior was actually intentional, we will
switch it to false by default.

Differential Revision: https://reviews.llvm.org/D90281
2020-10-30 12:39:29 -07:00
LLVM GN Syncbot
46e2484ccc [gn build] Port ac49500cd04 2020-10-30 19:18:17 +00:00
LLVM GN Syncbot
944684f022 [gn build] Port 940d0a310dc 2020-10-30 18:08:01 +00:00
LLVM GN Syncbot
2f3cec0d0b [gn build] Port 84e8257937e 2020-10-30 17:54:57 +00:00
Nico Weber
5eee0feeab [gn build] port e58660750e76
Made necessary by c479e0c99459e4, which requires std::timespec
to exist, which it only does in c++17 and later.
2020-10-30 13:49:27 -04:00
serge-sans-paille
9755b5cd4d [lit] Ship and bundle license for lit package
lit is bundled independently from LLVM in at least one location
(https://pypi.org/project/lit/), it's easier to state its license locally.

Differential Revision: https://reviews.llvm.org/D90136
2020-10-30 15:34:00 +01:00
LLVM GN Syncbot
c4068d104f [gn build] Port 00090a2b826 2020-10-30 02:36:24 +00:00
Marcel Hlopko
d70c0f894f Remove HAVE_VCS_VERSION_INC, not needed
This preprocessor define was meant to be used to conditionally include VCSVersion.inc. However, the define was always set, and it was the content of the header that was conditionally generated. Therefore HAVE_VCS_VERSION_INC should be cleaned up.

Reviewed By: gribozavr2, MaskRay

Differential Revision: https://reviews.llvm.org/D84623
2020-10-29 13:09:05 -07:00
Peter Collingbourne
215544881e gn build: Define HWASAN_WITH_INTERCEPTORS=1 for hwasan_new_delete.cpp as well. 2020-10-28 15:42:07 -07:00
Jay Foad
84f5fe8d70 [TableGen] Treat reg as isolated in reg$foo (but not in ${foo}reg)
D9844 fixed a problem where the ss suffix in the AsmString "cmp${cc}ss"
was recognised as the X86 SS register, by only recognising a token as a
register name if it is "isolated", i.e. surrounded by separator
characters.

In the AMDGPU backend there are many operands like $clamp which expand
to an optional string " clamp" including the preceding space, so we want
to have AsmStrings including sequences like "vcc$clamp" where vcc is a
register name.

This patch relaxes the rules for an isolated token, to say that it's OK
if the token is immediately followed by a '$'.

Differential Revision: https://reviews.llvm.org/D90315
2020-10-28 21:39:39 +00:00
LLVM GN Syncbot
140ee27fee [gn build] Port 23ed570af1c 2020-10-28 20:46:36 +00:00
Valentin Clement
9b83f369c4 [openmp][openacc] Check for duplicate clauses for directive
Check for duplicate clauses associated with directive. Clauses can appear only once
in the 4 lists associated with each directive (allowedClauses, allowedOnceClauses,
allowedExclusiveClauses, requiredClauses). Duplicates were already present (removed with this
patch) or were introduce in new patches by mistake (D89861).

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D90241
2020-10-28 15:12:38 -04:00
Thomas Lively
04b9d0883f [WebAssembly] Prototype extending multiplication SIMD instructions
As proposed in https://github.com/WebAssembly/simd/pull/376. This commit
implements new builtin functions and intrinsics for these instructions, but does
not yet add them to wasm_simd128.h because they have not yet been merged to the
proposal. These are the first instructions with opcodes greater than 0xff, so
this commit updates the MC layer and disassembler to handle that correctly.

Differential Revision: https://reviews.llvm.org/D90253
2020-10-28 09:38:59 -07:00
LLVM GN Syncbot
ee39116789 [gn build] Port 23c8da25ef7 2020-10-28 13:16:58 +00:00
LLVM GN Syncbot
c157783fc3 [gn build] Port 47369e194a4 2020-10-28 12:31:40 +00:00
LLVM GN Syncbot
1a919179a5 [gn build] Port e025d09b216 2020-10-27 19:40:30 +00:00
LLVM GN Syncbot
c5ea71af15 [gn build] Port ce6900c6cb5 2020-10-27 19:40:29 +00:00
LLVM GN Syncbot
05d3fe531a [gn build] Port 46c3d5cb05d 2020-10-27 18:08:19 +00:00
LLVM GN Syncbot
3188a13350 [gn build] Port 850325348ae 2020-10-27 12:17:41 +00:00
Aaron Puchert
ec700eefc9 Add release tarballs for libclc
Fixes PR47917.

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D90100
2020-10-26 20:33:24 +01:00
LLVM GN Syncbot
6d69d5bffc [gn build] Port 61bc18de0b2 2020-10-26 08:07:25 +00:00
Nathan Ridge
2f0a524fbb [clangd] Add a TestWorkspace utility
TestWorkspace allows easily writing tests involving multiple
files that can have inclusion relationships between them.

BackgroundIndexTest.RelationsMultiFile is refactored to use
TestWorkspace, and moved to FileIndexTest as it no longer
depends on BackgroundIndex.

Differential Revision: https://reviews.llvm.org/D89297
2020-10-24 20:15:17 -04:00
Arthur Eubanks
d924016b11 [gn build] Add missing comma 2020-10-23 12:01:23 -07:00
Nick Desaulniers
e95a065d26 [IR] add fn attr for no_stack_protector; prevent inlining on mismatch
It's currently ambiguous in IR whether the source language explicitly
did not want a stack a stack protector (in C, via function attribute
no_stack_protector) or doesn't care for any given function.

It's common for code that manipulates the stack via inline assembly or
that has to set up its own stack canary (such as the Linux kernel) would
like to avoid stack protectors in certain functions. In this case, we've
been bitten by numerous bugs where a callee with a stack protector is
inlined into an __attribute__((__no_stack_protector__)) caller, which
generally breaks the caller's assumptions about not having a stack
protector. LTO exacerbates the issue.

While developers can avoid this by putting all no_stack_protector
functions in one translation unit together and compiling those with
-fno-stack-protector, it's generally not very ergonomic or as
ergonomic as a function attribute, and still doesn't work for LTO. See also:
https://lore.kernel.org/linux-pm/20200915172658.1432732-1-rkir@google.com/
https://lore.kernel.org/lkml/20200918201436.2932360-30-samitolvanen@google.com/T/#u

Typically, when inlining a callee into a caller, the caller will be
upgraded in its level of stack protection (see adjustCallerSSPLevel()).
By adding an explicit attribute in the IR when the function attribute is
used in the source language, we can now identify such cases and prevent
inlining.  Block inlining when the callee and caller differ in the case that one
contains `nossp` when the other has `ssp`, `sspstrong`, or `sspreq`.

Fixes pr/47479.

Reviewed By: void

Differential Revision: https://reviews.llvm.org/D87956
2020-10-23 11:55:39 -07:00
Amara Emerson
a5ff88d2db [AArch64][GlobalISel] Introduce a new post-isel optimization pass.
There are two optimizations here:

1. Consider the following code:
 FCMPSrr %0, %1, implicit-def $nzcv
 %sel1:gpr32 = CSELWr %_, %_, 12, implicit $nzcv
 %sub:gpr32 = SUBSWrr %_, %_, implicit-def $nzcv
 FCMPSrr %0, %1, implicit-def $nzcv
 %sel2:gpr32 = CSELWr %_, %_, 12, implicit $nzcv
This kind of code where we have 2 FCMPs each feeding a CSEL can happen
when we have a single IR fcmp being used by two selects. During selection,
to ensure that there can be no clobbering of nzcv between the fcmp and the
csel, we have to generate an fcmp immediately before each csel is
selected.

However, often we can essentially CSE these together later in MachineCSE.
This doesn't work though if there are unrelated flag-setting instructions
in between the two FCMPs. In this case, the SUBS defines NZCV
but it doesn't have any users, being overwritten by the second FCMP.

Our solution here is to try to convert flag setting operations between
a interval of identical FCMPs, so that CSE will be able to eliminate one.

2. SelectionDAG imported patterns for arithmetic ops currently select the
flag-setting ops for CSE reasons, and add the implicit-def $nzcv operand
to those instructions. However if those impdef operands are not marked as
dead, the peephole optimizations are not able to optimize them into non-flag
setting variants. The optimization here is to find these dead imp-defs and
mark them as such.

This pass is only enabled when optimizations are enabled.

Differential Revision: https://reviews.llvm.org/D89415
2020-10-23 10:18:36 -07:00
LLVM GN Syncbot
df8c67668f [gn build] Port dbbc4f4e226 2020-10-23 17:06:41 +00:00
Alex Orlov
41781efce1 Added utility to launch tests on a target remotely.
Runs an executable on a remote host.
This is meant to be used as an executor when running the LLVM and the Libraries tests on a target.

Reviewed By: vvereschaka

Differential Revision: https://reviews.llvm.org/D89349
2020-10-23 20:52:30 +04:00
LLVM GN Syncbot
5b19aaf8b1 [gn build] Port 00255f41929 2020-10-23 16:19:55 +00:00
Paulo Matos
f7fc888024 [WebAssembly] Implementation of (most) table instructions
Implementation of instructions table.get, table.set, table.grow,
table.size, table.fill, table.copy.

Missing instructions are table.init and elem.drop as they deal with
element sections which are not yet implemented.

Added more tests to tables.s

Differential Revision: https://reviews.llvm.org/D89797
2020-10-23 08:42:54 -07:00
Nico Weber
45a7f324f8 [gn build] port 48e4b0f (__config_site revert)
This reverts commit b3ca53e14274642274be8fe7db8b43dc3c146366.
This reverts commit 8b7dac81d378c339d3e55f6f51cd0c42803903ad.
This reverts commit 37c030f81a9fdd7a7e1b6fa5407b277c1ab1afa1.
2020-10-23 09:45:34 -04:00
Nico Weber
ae1574313b [gn build] (semi-manually) port 147b9497e79 2020-10-22 18:19:59 -04:00
Arthur Eubanks
890b22aff8 [gn build] Add missing clangd dependencies
Fixes
$ ninja obj/build/rel/gen/clang-tools-extra/clangd/CompletionModel.CompletionModel.obj

Some tablegen include files from clang/include/clang/AST and
clang/include/clang/Sema need to be generated before CompletionModel is
compiled.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D89657
2020-10-22 09:04:30 -07:00
LLVM GN Syncbot
88e6dc86b8 [gn build] Port be39a6fe6fc 2020-10-22 09:39:53 +00:00
Nico Weber
dbdd52cab6 [gn build] try to fix clang build after 37c030f81a9fdd
37c030f81a9fdd made it so that depending on //libcxx/include
automatically added the copied header dir to the include search path.
For some reason, clang can't build against the copied libcxx headers
(it complains about ldiv_t not being a type). I don't have a mac
to debug right now, but for the clang target this change was
unintentional anyways -- only depend on the copies target, instead
of on the target that also adjusts the include path.
2020-10-21 14:11:18 -04:00
Nico Weber
31900dae4d [gn build] try to fix up deps of __config_site after 37c030f81a 2020-10-21 12:57:50 -04:00
Nico Weber
f565b5becd [gn build] (manually) port 5d796645d6c8cade (libcxx __config change) 2020-10-21 12:54:30 -04:00
Nico Weber
d803683939 [gn build] (manually) port 54fa9ecd3088 2020-10-21 12:54:30 -04:00
Ben Dunbobbin
02eba0fee9 [LIT] fixed up accidentally committed EOF problems. 2020-10-21 13:29:58 +01:00
Ben Dunbobbin
cf3dae7375 [LIT] error if directly named test won't be run indirectly
Currently, a LIT test named directly (on the command line) will
be run even if the name of the test file does not meet the rules
to be considered a test in the LIT test configuration files for
its test suite. For example, if the test does not have a
recognised file extension.

This makes it relatively easy to write a LIT test that won't
actually be run. I did in: https://reviews.llvm.org/D82567

This patch adds an error to avoid users doing that. There is a
small performance overhead for this check. A command line option
has been added so that users can opt into the old behaviour.

Differential Revision: https://reviews.llvm.org/D83069
2020-10-21 13:21:29 +01:00