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

216117 Commits

Author SHA1 Message Date
Nico Weber
a80d7c0abf Revert "[GlobalISel] Simplify G_ICMP to true/false when the result is known"
This reverts commit 892497c806306a4b7185ead16d60b0ebcca0a304.
Breaks tests, see comments on https://reviews.llvm.org/D102542
2021-05-19 09:02:27 -04:00
Peter Waller
5bc661d652 [llvm][AArch64][SVE] Model FFR-using intrinsics with inaccessiblemem
Intriniscs reading or writing the FFR register need to model the fact
there is additional state being read/wrtten.

Model this state as inaccessible memory.

* setffr => write inaccessiblememonly
* rdffr => read inaccessiblememonly
* ldff* => read arg memory, write inaccessiblemem
* ldnf => read arg memory, write inaccessiblemem
2021-05-19 13:50:13 +01:00
Wang, Pengfei
7db4595c62 Revert "[X86] Limit X86InterleavedAccessGroup to handle the same type case only"
This reverts commit ca23a38e373142a18ab56700ba4f3b947bfe9db0.

Revert due to EXPENSIVE_CHECKS fail.
2021-05-19 20:35:45 +08:00
David Sherwood
505c304121 Remove scalable vector assert from InnerLoopVectorizer::setDebugLocFromInst
In InnerLoopVectorizer::setDebugLocFromInst we were previously
asserting that the VF is not scalable. This is because we want to
use the number of elements to create a duplication factor for the
debug profiling data. However, for scalable vectors we only know the
minimum number of elements. I've simply removed the assert for now
and added a FIXME saying that we assume vscale is always 1. When
vscale is not 1 it just means that the profiling data isn't as
accurate, but shouldn't cause any functional problems.
2021-05-19 13:33:10 +01:00
Kristina Bessonova
248e44368a [ARM][NEON] Combine base address updates for vst1x intrinsics
Differential Revision: https://reviews.llvm.org/D102256
2021-05-19 14:05:55 +02:00
Sanjay Patel
151c1a6abb [SDAG] propagate FMF from target-specific IR intrinsics
This is a step towards relying more on node-level FMF rather than function-wide
or target settings.
I think it was just an oversight that we didn't get this path in D87361
or follow-on patches.

The lack of FMF propagation is blocking D90901 from converting tests to IR-level FMF.

We can't do much more than this currently because we also fail to propagate flags
from x86-specific node to generic FMA node. That would be another patch, so the
test just verifies that we can transfer from IR to initial SDAG node.

Differential Revision: https://reviews.llvm.org/D102725
2021-05-19 07:50:50 -04:00
Simon Pilgrim
8154ce8a38 [X86] Atom (pre-SLM) doesn't support PTEST instructions 2021-05-19 12:25:29 +01:00
Simon Pilgrim
e681f622ed [X86] Remove copy + paste typos in AtomWriteResPair comment.
Remnants from when the Atom model was copied from the Btver2 model.....
2021-05-19 12:25:28 +01:00
Roman Lebedev
1a82744191 [NFCI][SimplifyCFG] removeEmptyCleanup(): use DeleteDeadBlock()
This required some changes to, instead of eagerly making PHI's
in the UnwindDest valid as-if the BB is already not a predecessor,
to be valid while BB is still a predecessor.
2021-05-19 14:08:25 +03:00
Roman Lebedev
a81902844e [NFCI][SimplifyCFG] removeEmptyCleanup(): streamline PHI node updating 2021-05-19 14:08:25 +03:00
Roman Lebedev
e35bc1895e [NFC][SimplifyCFG] removeEmptyCleanup(): use BasicBlock::phis() 2021-05-19 14:08:24 +03:00
Frederik Gossen
389ddc2632 [x86] Fix FMF propagation test 2021-05-19 12:50:03 +02:00
Wang, Pengfei
da3f0df65c [X86] Limit X86InterleavedAccessGroup to handle the same type case only
The current implementation assumes the destination type of shuffle is the same as the decomposed ones. Add the check to avoid crush when the condition is not satisfied.

This fixes PR37616.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D102751
2021-05-19 18:39:08 +08:00
Simon Giesecke
5d240263ac Use a non-recursive mutex in GsymCreator.
There doesn't seem to be a need to support recursive locking,
and a recursive mutex is unnecessarily inefficient.

Differential Revision: https://reviews.llvm.org/D102486
2021-05-19 10:06:47 +00:00
Simon Giesecke
5e5a7e126d Move FunctionInfo in addFunctionInfo rather than copying.
Differential Revision: https://reviews.llvm.org/D102485
2021-05-19 10:06:47 +00:00
Simon Giesecke
81114c6d6b Avoid calculating the string hash twice in GsymCreator::insertString.
Do the single hash calculation before acquiring the lock, to reduce
lock contention. If Copy is true, and the string was not yet contained
in the StringStorage, use the new address from StringStorage, but
reuse the hash we already calculated.

Differential Revision: https://reviews.llvm.org/D102484
2021-05-19 10:06:47 +00:00
Simon Giesecke
3711884c22 Reformat GSYMCreator.cpp
Differential Revision: https://reviews.llvm.org/D102483
2021-05-19 10:06:47 +00:00
Tim Northover
d6d3226a57 MachineBasicBlock: add liveout iterator aware of which liveins are defined by the runtime.
Using this in RegAlloc fast reduces register pressure, and in some cases allows
x86 code to compile that wouldn't before.
2021-05-19 11:00:24 +01:00
Sander de Smalen
2e7409ccb5 [LV] Add -scalable-vectorization=<option> flag.
This patch adds a new option to the LoopVectorizer to control how
scalable vectors can be used.

Initially, this suggests three levels to control scalable
vectorization, although other more aggressive options can be added in
the future.

The possible options are:
- Disabled:   Disables vectorization with scalable vectors.
- Enabled:    Vectorize loops using scalable vectors or fixed-width
              vectors, but favors fixed-width vectors when the cost
              is a tie.
- Preferred:  Like 'Enabled', but favoring scalable vectors when the
              cost-model is inconclusive.

Reviewed By: paulwalker-arm, vkmr

Differential Revision: https://reviews.llvm.org/D101945
2021-05-19 10:40:56 +01:00
Roman Lebedev
ed37916b75 [NFCI][SimplifyCFG] simplifyUnreachable(): use DeleteDeadBlock() 2021-05-19 12:04:22 +03:00
Roman Lebedev
53f872efb3 [NFCI][SimplifyCFG] simplifyReturn(): use DeleteDeadBlock() 2021-05-19 12:04:22 +03:00
Roman Lebedev
48a15d566f [NFCI][SimplifyCFG] simplifySingleResume(): use DeleteDeadBlock() 2021-05-19 12:04:22 +03:00
Roman Lebedev
e411ba6370 [NFCI][SimplifyCFG] simplifyCommonResume(): use DeleteDeadBlock() 2021-05-19 12:04:22 +03:00
Sergey Dmitriev
6d117dab29 [llvm-objcopy] Add support for '--' for delimiting options from input/output files
This will allow to use llvm-objcopy with file names that begin with dashes.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D102665
2021-05-19 01:56:46 -07:00
Fraser Cormack
5e139f014a [RISCV] Support INSERT_VECTOR_ELT into i1 vectors
Like the element extraction of these vectors, we choose to promote up to
an i8 vector type and perform the insertion there.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D102697
2021-05-19 09:41:50 +01:00
Roman Lebedev
1c68f789ee [NFCI] SimplifyCFGPass: mergeEmptyReturnBlocks(): use DeleteDeadBlocks()
In this case, it does the same thing as the original pattern does.

SimplifyCFG has a few lurking miscompilations about deleting blocks that
have their address taken, and consistently using DeleteDeadBlocks() instead
 of a hand-rolled pattern will allow to weed those cases out easierly.
2021-05-19 11:32:24 +03:00
Rong Xu
275da5fb80 Fix sanitizer test errors from commit 886629a8
Explictly handle the empty string in the Hash calculation.
2021-05-18 22:46:51 -07:00
Vitaly Buka
d474f1c2ce [libfuzzer] Update doc mentioning removed flags. 2021-05-18 22:40:42 -07:00
Arthur Eubanks
99f72113f5 [NewPM] Add options to PrintPassInstrumentation
To bring D99599's implementation in line with the existing
PrintPassInstrumentation, and to fix a FIXME, add more customizability
to PrintPassInstrumentation.

Introduce three new options. The first takes over the existing
"-debug-pass-manager-verbose" cl::opt.

The second and third option are specific to -fdebug-pass-structure. They
allow indentation, and also don't print analysis queries.

To avoid more golden file tests than necessary, prune down the
-fdebug-pass-structure tests.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D102196
2021-05-18 20:59:35 -07:00
Senran Zhang
9e6695ba98 [Utils][vim] Highlight CHECK-EMPTY: & CHECK-COUNT: directives
Reviewed By: porglezomp

Differential Revision: https://reviews.llvm.org/D101135
2021-05-18 23:42:23 -04:00
Joseph Huber
36d5499565 [Attributor] Change AAExecutionDomain to only accept intrinsics
Summary:
The OpenMP runtime functions don't always provide unique thread ID's to
determine if a basic block is truly single-threaded. Change the implementation
to only check NVPTX intrinsics for now.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D102700
2021-05-18 21:19:26 -04:00
Guozhi Wei
5f78ed293a [X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB
This patch transforms the sequence

    lea (reg1, reg2), reg3
    sub reg3, reg4

to two sub instructions

    sub reg1, reg4
    sub reg2, reg4

Similar optimization can also be applied to LEA/ADD sequence.
The modifications to TwoAddressInstructionPass is to ensure the operands of ADD
instruction has expected order (the dest register of LEA should be src register
of ADD).

Differential Revision: https://reviews.llvm.org/D101970
2021-05-18 18:02:36 -07:00
Rong Xu
8bcc53c7a0 Fix a buildbot failure from commit 886629a8 2021-05-18 16:53:34 -07:00
LLVM GN Syncbot
7332433411 [gn build] Port 886629a8c9e5 2021-05-18 23:27:42 +00:00
Rong Xu
4e30d875bf [SampleFDO] New hierarchical discriminator for Flow Sensitive SampleFDO
This patch implements first part of Flow Sensitive SampleFDO (FSAFDO).
It has the following changes:
(1) disable current discriminator encoding scheme,
(2) new hierarchical discriminator for FSAFDO.

For this patch, option "-enable-fs-discriminator=true" turns on the new
functionality. Option "-enable-fs-discriminator=false" (the default)
keeps the current SampleFDO behavior. When the fs-discriminator is
enabled, we insert a flag variable, namely, llvm_fs_discriminator, to
the object. This symbol will checked by create_llvm_prof tool, and used
to generate a profile with FS-AFDO discriminators enabled. If this
happens, for an extbinary format profile, create_llvm_prof tool
will add a flag to profile summary section.

Differential Revision: https://reviews.llvm.org/D102246
2021-05-18 16:23:43 -07:00
Tomasz Miąsko
2eaabe6011 [Demangle][Rust] Speculative fix for bot build failure
> error: ‘InType’ is not a class, namespace, or enumeration
2021-05-19 00:40:24 +02:00
Alex Orlov
fb84758743 [symbolizer] Added StartAddress for the resolved function.
In many cases it is helpful to know at what address the resolved function starts.
This patch adds a new StartAddress member to the DILineInfo structure.

Reviewed By: jhenderson, dblaikie

Differential Revision: https://reviews.llvm.org/D102316
2021-05-19 02:38:13 +04:00
Fabian Sommer
877aa02c97 Default stack alignment of x86 NaCl to 16 bytes
X86 NaCl generally requires the stack to be aligned to 16 bytes.
This change was already implemented in two downstream NaCl compilers
based on llvm.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D102610
2021-05-18 15:16:59 -07:00
Tomasz Miąsko
1ed92ec621 [Demangle][Rust] Parse tuples
Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D102579
2021-05-19 00:04:42 +02:00
Tomasz Miąsko
b7d704310d [Demangle][Rust] Parse slice type
Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D102578
2021-05-19 00:04:41 +02:00
Tomasz Miąsko
52d80831c8 [Demangle][Rust] Parse array type
Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D102573
2021-05-19 00:04:41 +02:00
Tomasz Miąsko
e23e26628d [Demangle][Rust] Parse named types
Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D102571
2021-05-19 00:04:41 +02:00
Sanjay Patel
62bb5f5167 [x86] add FMF propagation test for target-specific intrinsic; NFC 2021-05-18 17:45:40 -04:00
Sanjay Patel
2648c406c2 [x86] trim zeros from constants for readability; NFC 2021-05-18 17:45:40 -04:00
Arthur Eubanks
d51b2ca5b9 [docs] Fix broken docs after 1c7f32334 2021-05-18 14:38:12 -07:00
Arthur Eubanks
2682845f03 [NFC] Use ArgListEntry indirect types more in ISel lowering
For opaque pointers, we're trying to avoid uses of
PointerType::getElementType().

A couple of ISel places use PointerType::getElementType(). Some of these
are easy to fix by using ArgListEntry's indirect types.

The inalloca type wasn't stored there, as opposed to preallocated and
byval which have their indirect types available, so add it and use it.

This is a reland after an MSan fix in D102667.

Differential Revision: https://reviews.llvm.org/D101713
2021-05-18 14:30:22 -07:00
Arthur Eubanks
b8775b2a78 [TargetLowering] Only inspect attributes in the arguments for ArgListEntry
Parameter attributes are considered part of the function [1], and like
mismatched calling conventions [2], we can't have the verifier check for
mismatched parameter attributes.

This is a reland after fixing MSan issues in D102667.

[1] https://llvm.org/docs/LangRef.html#parameter-attributes
[2] https://llvm.org/docs/FAQ.html#why-does-instcombine-simplifycfg-turn-a-call-to-a-function-with-a-mismatched-calling-convention-into-unreachable-why-not-make-the-verifier-reject-it

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D101806
2021-05-18 14:30:22 -07:00
Arthur Eubanks
520e56b673 [MSan] Set zeroext on call arguments to msan functions with zeroext parameter attribute
ABI attributes need to match between the caller and callee.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D102667
2021-05-18 14:07:39 -07:00
Konstantin Zhuravlyov
17a1c72316 AMDGPU/Docs: Remove reserved MACH 0x3E (it is no longer reserved), sort MACHs by value 2021-05-18 16:57:56 -04:00
Neumann Hon
5bf2202796 [SystemZ] [z/OS] Add XPLINK64 Calling Convention to SystemZ
This patch adds the XPLINK64 calling convention to the SystemZ
backend. It specifies and implements the argument passing and
return value conventions.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D101010
2021-05-18 16:52:47 -04:00