1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
Commit Graph

217133 Commits

Author SHA1 Message Date
Cyndy Ishida
69fb005298 Revert "[llvm-tapi-diff] Apply stable sorting to output"
This reverts commit 90a26a41e9ce16a4d471d25c2f7b36b5538fb4ce.
This failed to fix ubuntu failures.
2021-06-09 13:48:09 -07:00
Joseph Huber
10d0bfc79e [Attributor] Set floating point loads and stores as nofree in AANoFreeFloating
Summary:
The current implementation of AANoFreeFloating will incorrectly list floating
point loads and stores as may-free. This prevents other attributor instances
like HeapToStack from pushing some allocations to the stack.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D103975
2021-06-09 16:16:37 -04:00
Joseph Huber
62670e8994 [OpenMP][NFC] Precommit change to hide_mem_transfer_latency test flags 2021-06-09 16:16:37 -04:00
Sam Powell
ca95ab645d [llvm-tapi-diff] Apply stable sorting to output
* For the output, the attributes within the target slice should be
  grouped by the input order, then sorted by value ordering.
This is to fix current ubuntu buildbot inconsistences.
2021-06-09 13:09:47 -07:00
Leonard Chan
fca9191cc7 [compiler-rt][hwasan] Decouple use of the TLS global for getting the shadow base and using the frame record feature
This allows for using the frame record feature (which uses __hwasan_tls)
independently from however the user wants to access the shadow base, which
prior was only usable if shadow wasn't accessed through the TLS variable or ifuncs.

Frame recording can be explicitly set according to ShadowMapping::WithFrameRecord
in ShadowMapping::init. Currently, it is only enabled on Fuchsia and if TLS is
used, so this should mimic the old behavior.

Added an extra case to prologue.ll that covers this new case.

Differential Revision: https://reviews.llvm.org/D103841
2021-06-09 12:55:19 -07:00
Eric Astor
c35099a5e4 Revert "[ms] [llvm-ml] Add support for INCLUDE environment variable"
This reverts commit c43f413b01b021a8f7b6fce013296114fa92a245 due to Windows environment build breaks
2021-06-09 15:49:51 -04:00
Eric Astor
e4ec17b56e [ms] [llvm-ml] Add support for INCLUDE environment variable
Also adds support for the ML.exe command-line flag /X, which ignores the INCLUDE environment variable.
2021-06-09 15:25:26 -04:00
Arthur Eubanks
1ea77f3a1a Revert "[InstSimplify] Treat invariant group insts as bitcasts for load operands"
This reverts commit 26044c6a54de3e03c73c5515702b95acdb0b7f22.

Breaks on invalid IR (see D101103).
2021-06-09 11:46:10 -07:00
madhur13490
308bc0d686 [LangRef] Add link to opaque pointers
Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D103981
2021-06-10 00:11:02 +05:30
Nathan Sidwell
b3363eeab8 [docs] Collate CMake options
I found the documentation of the various CMake variables difficult to
navigate, because they are unsorted. I can see they've grown
organically with new clusters of somewhat-related options, but the
result is hard to use. This collates them (treating '_' as space).

Differential Revision: https://reviews.llvm.org/D102481
2021-06-09 11:24:38 -07:00
Sam Powell
6baaf00ed9 Reland "[llvm] llvm-tapi-diff"
This is relanding commit d1d36f7ad2ae82bea8a6fcc40d6c42a72e21f096 .
This patch additionally addresses failures found in buildbots & post review comments.

This patch introduces a new tool, llvm-tapi-diff, that compares and returns the diff of two TBD files.

Reviewed By: ributzka, JDevlieghere

Differential Revision: https://reviews.llvm.org/D101835
2021-06-09 10:35:41 -07:00
Eric Astor
e3d685ea21 [ms] [llvm-ml] Fix parity errors in error handling for INCLUDE directive
Also adds basic testing for "include" directive.

Differential Revision: https://reviews.llvm.org/D103980
2021-06-09 13:34:36 -04:00
Nico Weber
983067128e Revert "Do not generate calls to the 128-bit function __multi3() on 32-bit ARM"
This reverts commit 64e9aa33020d68a98c30bf05362ffc1c1778890c.
Breaks check-llvm everywhere, see https://reviews.llvm.org/D103906
2021-06-09 13:21:05 -04:00
Florian Hahn
f91e95602e [SCEV] Keep common NUW flags when inlining Add operands.
Currently, NoWrapFlags are dropped if we inline operands of SCEVAddExpr
operands. As a consequence, we always drop flags when building
expressions like `getAddExpr(A, getAddExpr(B, C, NUW), NUW)`.

We should be able to retain NUW flags common among all inlined
SCEVAddExpr and the original flags.

Reviewed By: nikic, mkazantsev

Differential Revision: https://reviews.llvm.org/D103877
2021-06-09 17:13:21 +01:00
Sanjay Patel
6a938ef57c [InstCombine] add tests for casts-around-ctlz; NFC
Baseline for D103788
2021-06-09 11:22:44 -04:00
Koutheir Attouchi
60cfa59a1f Do not generate calls to the 128-bit function __multi3() on 32-bit ARM
The function __multi3() is undefined on 32-bit ARM, so a call to it
should never be emitted. Instead, plain instructions need to be
generated to perform 128-bit multiplications.

Differential Revision: https://reviews.llvm.org/D103906
2021-06-09 16:21:16 +01:00
LemonBoy
7e9378d4c1 [SROA] Avoid splitting loads/stores with irregular type
Upon encountering loads/stores on types whose size is not a multiple of 8 bits the SROA pass would either trip an assertion or use logic that was not meant to work with such irregularly-sized types.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D99435
2021-06-09 16:36:58 +02:00
Craig Topper
c39f9ef639 [X86] Check destination element type before forming VTRUNCS/VTRUNCUS in combineTruncateWithSat.
Fixes crash reported here https://reviews.llvm.org/D73607

Using a store to keep the trunc intact. Returning v16i24 would
cause the trunc to be optimized away in SelectionDAGBuilder.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D103940
2021-06-09 07:08:17 -07:00
Sanjay Patel
56083624ee [SDAG] fix miscompile from merging stores of different sizes
As shown in:
https://llvm.org/PR50623
...and the similar tests here, we were not accounting for
store merging of different sizes that do not cover the
entire range of the wide value to be stored.

This is the easy fix: just make sure that all of the
original stores are the same size, so when we calculate
the wide width, it's a simple N * M check.

This still allows all of the motivating optimizations from:
D86420 / 54a5dd485c4d
D87112 / 7a06b166b1af

We could enhance this code to track individual bytes and
allow merging multiple sizes.
2021-06-09 09:51:39 -04:00
Yvan Roux
3a9592dfe4 [ARM] Fix Machine Outliner LDRD/STRD handling in Thumb mode.
This is a fix for PR50481

Immediate values for AddrModeT2_i8s4 are already scaled in MCinst operand.
This patch changes the number of bits and scale factor to reflect that
state when checking stack offset status. AddrModeT2_i7s[2|4] also have
this particularity but since MVE instructions are not outlined, just move
these cases to the unhandled ones.

Differential Revision: https://reviews.llvm.org/D103167
2021-06-09 15:37:21 +02:00
Paul C. Anagnostopoulos
35bf9850b8 [TableGen] Fix ProfileFoldOpInit so that parameters are named consistently [NFC]
See https://bugs.llvm.org/show_bug.cgi?id=50595

Differential Revision: https://reviews.llvm.org/D103823
2021-06-09 09:23:31 -04:00
Sanjay Patel
29b12d96c5 [x86] add tests for store merging miscompile (PR50623); NFC 2021-06-09 09:20:50 -04:00
Simon Pilgrim
91a6df2ba4 [X86][SLM] Adjust XMM non-PMULLD throughput costs to half rate.
Match what's reported in the costs table, Agner's tables and the Intel AOM
2021-06-09 13:51:40 +01:00
Simon Pilgrim
3c3fd22471 [X86][SSE] Regenerate slow-pmulld.ll test checks 2021-06-09 13:51:40 +01:00
Alexey Bataev
b6a5326556 [SLP]Improve gathering of scalar elements.
1. Better sorting of scalars to be gathered. Trying to insert
   constants/arguments/instructions-out-of-loop at first and only then
   the instructions which are inside the loop. It improves hoisting of
   invariant insertelements instructions.
2. Better detection of shuffle candidates in gathering function.
3. The cost of insertelement for constants is 0.

Part of D57059.

Differential Revision: https://reviews.llvm.org/D103458
2021-06-09 05:23:21 -07:00
Max Kazantsev
6d15bbb3de [Test] Add more elaborate case of symbolic execution of 1-iteration loop 2021-06-09 19:08:54 +07:00
Meera Nakrani
0d90ee064b [AArch64LoadStoreOptimizer] Generate more STPs by renaming registers earlier
Our initial motivating case was memcpy's with alignments > 16. The
loads/stores, to which small memcpy's expand, are kept together in
several places so that we get a sequence like this for a 64 bit copy:
LD w0
LD w1
ST w0
ST w1
The load/store optimiser can generate a LDP/STP w0, w1 from this because
the registers read/written are consecutive. In our case however, the
sequence is optimised during ISel, resulting in:
LD w0
ST w0
LD w0
ST w0
This instruction reordering allows reuse of registers. Since the registers
are no longer consecutive (i.e. they are the same), it inhibits LDP/STP
creation. The approach here is to perform renaming:
LD w0
ST w0
LD w1
ST w1
to enable the folding of the stores into a STP. We do not yet generate
the LDP due to a limitation in the renaming implementation, but plan to
look at that in a follow-up so that we fully support this case. While
this was initially motivated by certain memcpy's, this is a general
approach and thus is beneficial for other cases too, as can be seen
in some test changes.

Differential Revision: https://reviews.llvm.org/D103597
2021-06-09 11:25:26 +00:00
Fraser Cormack
cb0fa6245f [ValueTypes][RISCV] Cap RVV fixed-length vectors by size
This patch changes RVV's policy for its supported list of fixed-length
vector types by capping by vector size rather than element count. Now
all 1024-byte vectors (of supported element types) are supported, rather
than all 256-element vectors.

This is a more natural fit for the architecture, and allows us to, for
example, improve the support for vector bitcasts.

This change necessitated the adding of some new simple types to avoid
"regressing" on the number of currently-supported vectors. We round out
the 1024-byte types by adding `v512i8`, `v1024i8`, `v512i16` and
`v512f16`.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D103884
2021-06-09 12:15:37 +01:00
Nico Weber
179e9325b0 Revert "[SROA] Avoid splitting loads/stores with irregular type"
This reverts commit 905f4eb537c118783969fded19e96fe6504c2956.
Breaks check-llvm on most (all?) bots, see https://reviews.llvm.org/D99435
2021-06-09 06:32:58 -04:00
LemonBoy
bc23f01f35 [SROA] Avoid splitting loads/stores with irregular type
Upon encountering loads/stores on types whose size is not a multiple of 8 bits the SROA pass would either trip an assertion or use logic that was not meant to work with such irregularly-sized types.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D99435
2021-06-09 11:48:20 +02:00
Jim Lin
65da76df22 [docs] Fix load instructions in chapter 7 of the tutorial
Loads in the first half of the chapter are missing the type argument.

Patched By: klao (Mihaly Barasz)

Reviewed By: Jim

Differential Revision: https://reviews.llvm.org/D90326
2021-06-09 17:39:11 +08:00
Lang Hames
f1e7b7b70f [JITLink][MachO] Handle muliple symbols at same offset when splitting C-strings.
The C-string section splitting support added in f9649d123db triggered an assert
("Duplicate canonical symbol at address") when multiple symbols were defined at
the the same offset within a C-string block (this triggered on arm64, where we
always add a block start symbol). The bug was caused by a failure to update the
record of the last canonical symbol address. The fix was to maintain this record
correctly, and move the auto-generation of the block-start symbol above the
handling for symbols defined in the object itself so that all symbols
(auto-generated and defined) are processed in address order.
2021-06-09 19:16:49 +10:00
Florian Hahn
37c3bfd1ce [LTO] Support new PM in ThinLTOCodeGenerator.
This patch adds initial support for using the new pass manager when
doing ThinLTO via libLTO.

Reviewed By: steven_wu

Differential Revision: https://reviews.llvm.org/D102627
2021-06-09 10:05:14 +01:00
Fraser Cormack
1baf7d8c9b [RISCV] Fix failing RVV MC tests
I believe these failures were introduced by D103790's changes to the
VType formatting found in vsetvli/vsetivli instructions.
2021-06-09 09:47:18 +01:00
Fraser Cormack
2a2d2b1c73 [ValueTypes] Add missing enum names for MVTs
These types are (presumably) never used in the generated TableGen files.
The `default` switch case silences any compiler warnings for these
missing types so it's easy to miss.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D103883
2021-06-09 09:41:36 +01:00
Jingu Kang
a06dee18e5 [LoopBoundSplit] Ignore phi node which is not scevable
There was a bug in LoopBoundSplit. The pass should ignore phi node which is not
scevable.

Differential Revision: https://reviews.llvm.org/D103913
2021-06-09 09:44:36 +01:00
Jan Kratochvil
c90315c834 Revert "[llvm] Sync DebugInfo.h with DebugInfoFlags.def"
This reverts commit 093750dd0be6b0729f8e817766c3d5849545e10c.

It broke buildbots, goint to investigate it more.
2021-06-09 10:39:57 +02:00
Florian Hahn
92b2a39d20 [ScalarEvolution] Add test for preserving add overflow flags. 2021-06-09 09:20:02 +01:00
Fraser Cormack
1661b75919 [RISCV] Support CONCAT_VECTORS on scalable masks
This patch is a simple fix which registers CONCAT_VECTORS as
custom-lowered for scalable mask vectors. This follows the pattern of
all other scalable-vector types, as the default expansion of
CONCAT_VECTORS cannot handle scalable types, and even if it did it'd go
through the stack and generate worse code.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D103896
2021-06-09 09:07:44 +01:00
Jan Kratochvil
191a799f53 [llvm] Sync DebugInfo.h with DebugInfoFlags.def
Command to see the differences:
  diff -u <(sed -n 's#^HANDLE_DI_FLAG *([^,]*, *\([^()]*\)) *\(//.*\)\?$#\1#p' <llvm/include/llvm/IR/DebugInfoFlags.def | grep -vw Largest) <(sed -n 's#^ *LLVMDIFlag\([^ ]*\) *= (\?[0-9].*$#\1#p' <llvm/include/llvm-c/DebugInfo.h)

OCaml binding is more seriously out of sync but I have not tried to sync it.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D103910
2021-06-09 10:11:23 +02:00
Esme-Yi
3fd7a0db05 Fix the 4203-Buildbot failure in LLVM Buildbot on llvm-clang-win-x-aarch64
Failure in llvm/test/tools/llvm-objdump/XCOFF/section-headers.test:

    SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes
                 in position 24-25: truncated \xXX escape
2021-06-09 07:23:51 +00:00
Guillaume Chatelet
06979257cf [NFC] Reformat MachineValueType
This is a follow up patch based on https://reviews.llvm.org/D103251#2804016.

Differential Revision: https://reviews.llvm.org/D103893
2021-06-09 07:20:51 +00:00
Jim Lin
a138169412 [Docs] Fix incorrect return type for example code 2021-06-09 15:22:49 +08:00
Kai Luo
d4ac5d338c [PowerPC] Make sure the first probe is full size or is the last probe when stack is realigned
When `-fstack-clash-protection` is enabled and stack has to be realigned, some parts of redzone is written prior the probe, so probe might overwrite content already written in redzone. To avoid it, we have to make sure the first probe is at full probe size or is the last probe so that we can skip redzone.

It also fixes violation of ABI under PPC where `r1` isn't updated atomically.

This fixes https://bugs.llvm.org/show_bug.cgi?id=49903.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D100290
2021-06-09 06:35:35 +00:00
Esme-Yi
df64e3b863 Remove white space in llvm-objdump/XCOFF/section-headers.test 2021-06-09 05:35:52 +00:00
Sterling Augustine
59049d1a79 Add Twine support for std::string_view.
With Twine now ubiquitous after rG92a79dbe91413f685ab19295fc7a6297dbd6c824,
it needs support for string_view when building clang with newer C++ standards.

This is similar to how StringRef is handled.

Differential Revision: https://reviews.llvm.org/D103935
2021-06-08 20:19:04 -07:00
Jim Lin
5c02f8612f [RISCV][NFC] Add a single space after comma for VType
In most of cases, it has a single space after comma in assembly operands.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D103790
2021-06-09 11:18:22 +08:00
Esme-Yi
3c03ef6aee [NFC][XCOFF] Use yaml2obj in llvm-objdump/XCOFF/section-headers.test instead of binary files.
Summary: This a minor patch to refactor the test file,
llvm-objdump/XCOFF/section-headers.test, to use yaml2obj
for this testing rather than a canned binary.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D103146
2021-06-09 03:11:33 +00:00
Kai Luo
2aa3720382 [PowerPC][Dwarf] Assign MMA register's dwarf register number to negative value
According to ELF V2 ABI, `0` should be the dwarf number of `r0`. Currently MMA's register also uses `0` as its dwarf number, this confuses `RegisterInfoEmitter` and generates wrong dwarf -> llvm mapping.
```
extern const MCRegisterInfo::DwarfLLVMRegPair PPCDwarfFlavour1Dwarf2L[] = {
  { 0U, PPC::VSRp31 },
```
This leads to wrong cfi output in https://reviews.llvm.org/D100290.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D103761
2021-06-09 02:24:01 +00:00
Brendon Cahoon
3a664dba6e Reland "[AMDGPU] Add gfx1013 target"
This reverts commit 211e584fa2a4c032e4d573e7cdbffd622aad0a8f.

Fixed a use-after-free error that caused the sanitizers to fail.
2021-06-08 21:15:35 -04:00