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

181350 Commits

Author SHA1 Message Date
Alex Brachet
847203d76b [docs] [tools] Fix see also links
Summary: Changes "see also" links to use :manpage: instead of plain text or the form `name|name` which was being treated literally, not as a link.

Reviewers: jhenderson, rupprecht

Reviewed By: jhenderson

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63970

llvm-svn: 365159
2019-07-04 21:19:05 +00:00
Craig Topper
20330a7c7f [DAGCombiner] Don't combine (addcarry (uaddo X, Y), 0, Carry) -> (addcarry X, Y, Carry) if the Carry comes from the uaddo.
Summary:
The uaddo won't be removed and the addcarry will still be
dependent on the uaddo. So we'll just increase the use count
of X and Y and potentially require a COPY.

Reviewers: spatel, RKSimon, deadalnix

Reviewed By: RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64190

llvm-svn: 365149
2019-07-04 18:18:46 +00:00
Tim Renouf
dd229b271a [AMDGPU] Custom lower INSERT_SUBVECTOR v3, v4, v5, v8
Summary:
Since the changes to introduce vec3 and vec5, INSERT_VECTOR for these
sizes has been marked "expand", which made LegalizeDAG lower it to loads
and stores via a stack slot. The code got optimized a bit later, but the
now-unused stack slot was never deleted.

This commit avoids that problem by custom lowering INSERT_SUBVECTOR into
an EXTRACT_VECTOR_ELT and INSERT_VECTOR_ELT for each element in the
subvector to insert.

V2: Addressed review comments re test.

Differential Revision: https://reviews.llvm.org/D63160

Change-Id: I9e3c13e36f68cfa3431bb9814851cc1f673274e1
llvm-svn: 365148
2019-07-04 17:38:24 +00:00
Sanjay Patel
eab9da7e7d [InstCombine] allow undef elements when forming splat from chain of insertelements
We allow forming a splat (broadcast) shuffle, but we were conservatively limiting
that to cases where all elements of the vector are specified. It should be safe
from a codegen perspective to allow undefined lanes of the vector because the
expansion of a splat shuffle would become the chain of inserts again.

Forming splat shuffles can reduce IR and help enable further IR transforms.
Motivating bugs:
https://bugs.llvm.org/show_bug.cgi?id=42174
https://bugs.llvm.org/show_bug.cgi?id=16739

Differential Revision: https://reviews.llvm.org/D63848

llvm-svn: 365147
2019-07-04 16:45:34 +00:00
Jay Foad
22bf72432d Fix typos in comments and debug output.
llvm-svn: 365146
2019-07-04 15:04:29 +00:00
Simon Pilgrim
84a859530e [X86][SSE] Add partial dereferenceable vector load test inspired by PR21780
llvm-svn: 365145
2019-07-04 15:00:04 +00:00
Andus Yu
578aa28604 llvm-c-test avoid calling malloc(0)
Summary:
As explained in D63668, malloc(0) could return a null pointer. llvm-c-test does not handle this case correctly. Instead of calling malloc(0), avoid the operation altogether.

Authored By: andusy

Reviewers: hubert.reinterpretcast, xingxue, jasonliu, daltenty, cebowleratibm

Reviewed By: hubert.reinterpretcast

Subscribers: mehdi_amini, dexonsmith, jsji, llvm-commits

Tags: LLVM

Differential Revision: https://reviews.llvm.org/D63788

llvm-svn: 365144
2019-07-04 14:36:34 +00:00
Serge Guelton
6424f88131 Document legacy pass manager extension points
Differential Revision: https://reviews.llvm.org/D64093

llvm-svn: 365142
2019-07-04 14:03:11 +00:00
David Bolvansky
77b1673246 [NFC] Added tests for D64099
llvm-svn: 365141
2019-07-04 13:48:32 +00:00
Simon Pilgrim
21bb414493 [X86][SSE] Add some partial dereferenceable vector load tests inspired by PR16739
llvm-svn: 365138
2019-07-04 13:31:49 +00:00
Michael Liao
dbdd84c616 [AMDGPU] Correct the setting of FlatScratchInit.
Summary: - That flag setting should skip spilling stack slot.

Reviewers: arsenm, rampitec

Subscribers: qcolombet, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64143

llvm-svn: 365137
2019-07-04 13:29:45 +00:00
Simon Pilgrim
012b67e573 [X86] Regenerate load fold peephole test.
llvm-svn: 365136
2019-07-04 12:33:37 +00:00
Simon Pilgrim
7bf0aedf35 Fix -Wdocumentation param warning.
Don't put the full stop at the end of a param name - it confuses the doxygen parser

llvm-svn: 365128
2019-07-04 10:35:31 +00:00
Simon Pilgrim
a8f9089664 Fix -Wdocumentation warning.
llvm-svn: 365127
2019-07-04 10:33:21 +00:00
Simon Pilgrim
c1b05ea1f0 [X86][AVX1] Combine concat_vectors(pshufd(x,c),pshufd(y,c)) -> vpermilps(concat_vectors(x,y),c)
Bitcast v4i32 to v8f32 and back again - it might be worth adding isel patterns for X86PShufd v8i32 on AVX1 targets like we did for X86Blendi to avoid the bitcasts?

llvm-svn: 365125
2019-07-04 10:17:10 +00:00
Simon Pilgrim
b24fbcea49 Fix MSVC "not all control paths return a value" warnings. NFCI.
llvm-svn: 365119
2019-07-04 09:46:06 +00:00
Mikael Holmen
0a0fbcd1db [Remarks] Silence gcc warning by catching unhandled values in switches
Without this fix gcc (7.4) complains with
 ../lib/Remarks/RemarkParser.cpp: In function 'std::unique_ptr<llvm::remarks::ParserImpl> formatToParserImpl(llvm::remarks::ParserFormat, llvm::StringRef)':
 ../lib/Remarks/RemarkParser.cpp:29:1: error: control reaches end of non-void function [-Werror=return-type]
  }
  ^
 ../lib/Remarks/RemarkParser.cpp: In function 'std::unique_ptr<llvm::remarks::ParserImpl> formatToParserImpl(llvm::remarks::ParserFormat, llvm::StringRef, const llvm::remarks::ParsedStringTable&)':
 ../lib/Remarks/RemarkParser.cpp:38:1: error: control reaches end of non-void function [-Werror=return-type]
  }
  ^

The Format enum currently only contains the value YAML which is indeed
already handled in the switches, but gcc complains anyway.

Adding a default case with an llvm_unreachable silences gcc.

llvm-svn: 365118
2019-07-04 09:29:18 +00:00
David Green
48e4d991e8 [ARM] Favour PL/MI over GE/LT when possible
The arm condition codes for GE is N==V (and for LT is N!=V). If the source of
flags cannot set V (overflow), such as a cmp against #0, then we can use the
simpler PL and MI conditions that only check N. As these PL/MI conditions are
simpler than GE/LT, other passes like the peephole optimiser can have a better
time optimising away the redundant CMPs.

The exception is the VSEL instruction, which cannot take the PL code, so there
the transform favours GE.

Differential Revision: https://reviews.llvm.org/D64160

llvm-svn: 365117
2019-07-04 08:58:58 +00:00
David Green
5349edee0f [ARM] Added testing for D64160. NFC
Adds some extra vsel testing and regenerates long shift and saturation bitop
tests.

llvm-svn: 365116
2019-07-04 08:49:32 +00:00
James Henderson
0e835405fd [docs][llvm-dwarfdump] Remove unnecessary reference to --show-children
The --show-children option description describes what it does, and
references the =<offset> parameter of section dump switches. I don't
think it needs to be explained again in the documentation of the
section dump switches too.

Reviewed by: JDevlieghere

Differential Revision: https://reviews.llvm.org/D64132

llvm-svn: 365115
2019-07-04 08:49:04 +00:00
Simon Tatham
b8c33a2f38 [TableGen] Allow DAG isel patterns to override default operands.
When a Tablegen instruction description uses `OperandWithDefaultOps`,
isel patterns for that instruction don't have to fill in the default
value for the operand in question. But the flip side is that they
actually //can't// override the defaults even if they want to.

This will be very inconvenient for the Arm backend, when we start
wanting to write isel patterns that generate the many MVE predicated
vector instructions, in the form with predication actually enabled. So
this small Tablegen fix makes it possible to write an isel pattern
either with or without values for a defaulted operand, and have the
default values filled in only if they are not overridden.

If all the defaulted operands come at the end of the instruction's
operand list, there's a natural way to match them up to the arguments
supplied in the pattern: consume pattern arguments until you run out,
then fill in any missing instruction operands with their default
values. But if defaulted and non-defaulted operands are interleaved,
it's less clear what to do. This does happen in existing targets (the
first example I came across was KILLGT, in the AMDGPU/R600 backend),
and of course they expect the previous behaviour (that the default for
those operands is used and a pattern argument is not consumed), so for
backwards compatibility I've stuck with that.

Reviewers: nhaehnle, hfinkel, dmgreen

Subscribers: mehdi_amini, javed.absar, tpr, kristof.beyls, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63814

llvm-svn: 365114
2019-07-04 08:43:20 +00:00
David Green
6ac13d1aff [ARM] MVE bitwise instruction patterns
This adds patterns for the simpler VAND, VORR and VEOR bitwise vector
instructions. It also adjusts the top16Zero PatLeaf to not match on vector
instructions, which can otherwise cause problems.

Code written by David Sherwood.

Differential Revision: https://reviews.llvm.org/D63867

llvm-svn: 365113
2019-07-04 08:41:23 +00:00
QingShan Zhang
4c61560804 [NFC][PowerPC] Make the PowerPC scheduling strategy feature only control the strategy instead of the scheduler.
llvm-svn: 365110
2019-07-04 07:43:51 +00:00
Craig Topper
31cd0cf042 [X86] Use pointer sized indices instead of i32 for EXTRACT_VECTOR_ELT and INSERT_VECTOR_ELT in a couple places.
Most places already did this.

llvm-svn: 365109
2019-07-04 06:21:54 +00:00
Dylan McKay
cdfc91359a [AVR] Fix tests after r363757
r363757 renamed ExpandISelPseudo to FinalizeISel, so the RUN line in
select-must-add-unconditional-jump.mir needed updating to refer to finalize-isel.

llvm-svn: 365108
2019-07-04 06:12:47 +00:00
Serguei Katkov
8903e651cf [LoopPeel] Some small comment update. NFC.
Follow-up change of comment after
https://reviews.llvm.org/D63917 is landed.

llvm-svn: 365107
2019-07-04 05:10:14 +00:00
Fangrui Song
852d642125 [PowerPC] Support constraint code "ww"
Summary:
"ww" and "ws" are both constraint codes for VSX vector registers that
hold scalar double data. "ww" is preferred for float while "ws" is
preferred for double.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D64119

llvm-svn: 365106
2019-07-04 04:44:42 +00:00
Alex Brachet
983e47d749 [docs] [NFC] Removed excess spacing
Summary: Removed excess new lines from documentations. As far as I can tell, it seems as though restructured text is agnostic to new lines, the use of new lines was inconsistent and had no effect on how the files were being displayed.

Reviewers: jhenderson, rupprecht, JDevlieghere

Reviewed By: jhenderson

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63971

llvm-svn: 365105
2019-07-04 04:41:06 +00:00
Chen Zheng
ce95cee8fb [PowerPC] Hardware Loop branch instruction's condition may not be icmp.
This fixes pr42492.
Differential Revision: https://reviews.llvm.org/D64124

llvm-svn: 365104
2019-07-04 01:51:47 +00:00
Francis Visoiu Mistrih
97be7d7df2 [Remarks] Require an explicit format to the parser
Make the parser require an explicit format.

This allows new formats to be easily added by following YAML as an
example.

llvm-svn: 365102
2019-07-04 00:31:03 +00:00
Francis Visoiu Mistrih
386dd80250 [Remarks][NFC] Move the string table parsing out of the parser constructor
Make the parser take an already-parsed string table.

llvm-svn: 365101
2019-07-04 00:30:58 +00:00
Derek Schuff
f8c876ff3b [WebAssembly] Update test failure explanations
llvm-svn: 365100
2019-07-04 00:24:35 +00:00
Shoaib Meenai
8170d669b1 [MachO] Add valid architecture function
Added array of valid architectures and function returning array.
Modified llvm-lipo to include list of valid architectures in error message for invalid arch.

Patch by Anusha Basana <anusha.basana@gmail.com>

Differential Revision: https://reviews.llvm.org/D63735

llvm-svn: 365099
2019-07-04 00:17:02 +00:00
Lang Hames
07ff51c0a6 [JITLink][ORC] Add EHFrameRegistrar interface, use in EHFrameRegistrationPlugin.
Replaces direct calls to eh-frame registration with calls to methods on an
EHFrameRegistrar instance. This allows clients to substitute a registrar that
registers frames in a remote process via IPC/RPC.

llvm-svn: 365098
2019-07-04 00:05:12 +00:00
Reid Kleckner
f7383bbaa1 Revert [ThinLTO] Optimize writeonly globals out
This reverts r365040 (git commit 5cacb914758c7f436b47c8362100f10cef14bbc4)

Speculatively reverting, since this appears to have broken check-lld on
Linux. Partial analysis in https://crbug.com/981168.

llvm-svn: 365097
2019-07-04 00:03:30 +00:00
Derek Schuff
05a21c822b [WebAssembly] Enable IndirectBrExpandPass
Wasm doesn't have a direct way to lower indirectbr, so hook up the
IndirectBrExpandPass to lower indirectbr into a switch.

Fixes PR42498

Reviewers: aheejin

Differential Revision: https://reviews.llvm.org/D64161

llvm-svn: 365096
2019-07-03 23:54:06 +00:00
Matt Arsenault
26e5d021eb AMDGPU: Add pass to lower SGPR spills
This is split out from my patches to split register allocation into a
separate SGPR and VGPR phase, and has some parts that aren't yet used
(like maintaining LiveIntervals).

This simplifies making the frame pointer register callee saved. As it
is now, the code to determine callee saves needs to predict all the
possible SGPR spills and how many callee saved VGPRs are needed. By
handling this before PrologEpilogInserter, it's possible to just check
the spill objects that already exist.

Change-Id: I29e6df4034afcf949e06f8ef44206acb94696f04
llvm-svn: 365095
2019-07-03 23:32:29 +00:00
Eli Friedman
ac9dc6f8fc [JumpThreading] Fix threading with unusual PHI nodes.
If the block being cloned contains a PHI node, in general, we need to
clone that PHI node, even though it's trivial. If the operand of the PHI
is an instruction in the block being cloned, the correct value for the
operand doesn't exist until SSAUpdater constructs it.

We usually don't hit this issue because we try to avoid threading across
loop headers, but it's possible to hit this in some cases involving
irreducible CFGs.  I added a flag to allow threading across loop headers
to make the testcase easier to understand.

Thanks to Brian Rzycki for reducing the testcase.

Fixes https://bugs.llvm.org/show_bug.cgi?id=42085.

Differential Revision: https://reviews.llvm.org/D63913

llvm-svn: 365094
2019-07-03 23:12:39 +00:00
Matt Arsenault
1b188a9118 GlobalISel: Fix widenScalar for pointer typed G_MERGE_VALUES
llvm-svn: 365093
2019-07-03 23:08:06 +00:00
Francis Visoiu Mistrih
972459e6ed [Bitcode] Move Bitstream to a separate library
This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/.

This is needed to avoid a circular dependency when using the bitstream
code for parsing optimization remarks.

Since Bitcode uses Core for the IR part:

libLLVMRemarks -> Bitcode -> Core

and Core uses libLLVMRemarks to generate remarks (see
IR/RemarkStreamer.cpp):

Core -> libLLVMRemarks

we need to separate the Bitstream and Bitcode part.

For clang-doc, it seems that it doesn't need the whole bitcode layer, so
I updated the CMake to only use the bitstream part.

Differential Revision: https://reviews.llvm.org/D63899

llvm-svn: 365091
2019-07-03 22:40:07 +00:00
Guanzhong Chen
94ed17a41b [WebAssembly][NFC] simplify SjLj inline assembly test
Summary:
Per feedback in D64115, simplify the test.

`hidden` is left in though, because every test in the file has it.

Reviewers: aheejin, tlively

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64117

llvm-svn: 365089
2019-07-03 22:11:14 +00:00
Thomas Lively
3ab55228e0 [WebAssembly] Add option to emit passive segments
Summary:
Adds `--passive-segments` and `--active-segments` flags to control
what kind of segments are emitted. For now the default is always
to emit active segments so this is not a breaking change, but in
the future the default will be changed to passive segments when
shared memory is requested and active segments otherwise. When
passive segments are emitted, corresponding memory.init and
data.drop instructions are emitted in a `__wasm_init_memory`
function that is automatically called at the beginning of
`__wasm_call_ctors`.

Reviewers: sbc100, aheejin, dschuff

Subscribers: azakai, dschuff, jgravelle-google, sunfish, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59343

llvm-svn: 365088
2019-07-03 22:04:54 +00:00
Matt Arsenault
78d62ad72d Revert "[AMDGPU] Kernel arg metadata: added support for "__hip_texture" type."
This reverts commit r365073.

This is crashing, and is improperly relying on IR type names.

llvm-svn: 365087
2019-07-03 21:34:34 +00:00
JF Bastien
be75ae7b0e Revert "[llvm-ar][test] Add to MRI test coverage"
This reverts commit 250015bacf7f255abcfb646fb8b6b56ce8be7e01.
r365039 was re-commit of D63197 and failed on Mac. Reid XFAIL'd it, but I'd rather jsut revert and have it fixed properly.

llvm-svn: 365084
2019-07-03 20:47:53 +00:00
Evgeniy Stepanov
c263f5e880 Teach ValueTracking that aarch64.irg result aliases its input.
Reviewers: javed.absar, olista01

Subscribers: kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64103

llvm-svn: 365079
2019-07-03 20:19:14 +00:00
Florian Hahn
0394dff601 [LoopBase] Strengthen isLoopExiting by requiring that BB must be inside the loop.
Currently isLoopExiting returns true for BBs that are not part of the
loop. To avoid hiding subtle bugs, this patch adds an assertion to make
sure the passed BB is inside the loop

Reviewers: reames, efriedma, hfinkel, arsenm, nhaehnle

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D63952

llvm-svn: 365077
2019-07-03 20:15:14 +00:00
Reid Kleckner
710094af7f Try to XFAIL mri-utf8.test on Mac
llvm-svn: 365076
2019-07-03 20:14:54 +00:00
Philip Reames
45f8df4a39 [LFTR] Use SCEVExpander for the pointer limit case instead of manual IR gen
As noted in the test change, this is not trivially NFC, but all of the changes in output are cases where the SCEVExpander form is more canonical/optimal than the hand generation.  

llvm-svn: 365075
2019-07-03 20:03:46 +00:00
Konstantin Pyzhov
df53ea7203 [AMDGPU] Kernel arg metadata: added support for "__hip_texture" type.
Summary:
Hip texture type is equivalent to OpenCL image. So, we need to set the Image type for kernel arguments with __hip_texture type.

Differential revision: https://reviews.llvm.org/D63850

llvm-svn: 365073
2019-07-03 19:11:35 +00:00
Philip Reames
1d97c340ea [LFTR] Remove a stray variable shadow *of the same value* [NFC]
llvm-svn: 365072
2019-07-03 19:08:43 +00:00