1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

148605 Commits

Author SHA1 Message Date
Simon Pilgrim
b2f26de75c [X86][AVX512CDI] Move v2i64/v4i64 and v4i32/v8i32 VPLZCNT lowering to tablegen
Extend NoVLX targets to use the 512-bit versions

llvm-svn: 302229
2017-05-05 12:20:34 +00:00
Krzysztof Parzyszek
ce870c39e7 Remove stale live-ins in the branch folder
Hoisting common code can cause registers that live-in in the successor
blocks to no longer be live-in. The live-in information needs to be
updated to reflect this, or otherwise incorrect code can be generated
later on.

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

llvm-svn: 302228
2017-05-05 12:20:07 +00:00
Simon Pilgrim
5ada3d6550 Remove unused variable
llvm-svn: 302226
2017-05-05 11:55:38 +00:00
John Brawn
b28ff75b56 [ARM] Add support for ORR and ORN instruction substitutions
Recently support was added for substituting one intruction for another by
negating or inverting the immediate, but ORR and ORN were missed so this patch
adds them.

This one is slightly different to the others in that ORN only exists in thumb,
so we only do the substitution in thumb.

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

llvm-svn: 302224
2017-05-05 11:31:25 +00:00
Simon Pilgrim
5b75c8caa0 [X86][AVX] Add LowerIntUnary helpers to split unary vector ops in half. NFCI.
Same as LowerIntArith helpers but for unary ops instead of binary.

llvm-svn: 302222
2017-05-05 10:59:24 +00:00
George Rimar
dc8a0dcc4b [llvm-dwarfdump] - Print an error message if section decompression failed.
llvm-dwarfdump currently prints no message if decompression fails 
for some reason. I noticed that during work on one of LLD patches 
where LLD produced an broken output. It was a bit confusing to see
no output for section dumped and no any error message at all.

Patch adds error message for such cases.

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

llvm-svn: 302221
2017-05-05 10:52:39 +00:00
Andrew Ng
0330b66ab0 [X86] Remove unused code from X86 optimize LEAs. NFC.
This patch removes unused code which is no longer required because of changes
to the DIExpression::prepend function.

llvm-svn: 302219
2017-05-05 09:21:35 +00:00
Martin Storsjo
7ccdc49953 [ArgPromotion] Add a testcase for PR32917
Differential Revision: https://reviews.llvm.org/D32882

llvm-svn: 302216
2017-05-05 08:40:24 +00:00
Daniel Jasper
c84dfe70ef Initialize new member X86Operand::FrontendSize in all codepaths.
This fixes MSAN-builds after r302179.

llvm-svn: 302214
2017-05-05 07:31:40 +00:00
Dehao Chen
ad41a3b98f Update VP prof metadata during inlining.
Summary: r298270 added profile update logic for branch_weights. This patch implements profile update logic for VP prof metadata too.

Reviewers: eraman, tejohnson, davidxl

Reviewed By: eraman

Subscribers: llvm-commits

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

llvm-svn: 302209
2017-05-05 00:47:34 +00:00
Zachary Turner
0be559d8cc [ADT] A few minor improvements to BitVector
Fixes some spelling mistakes, uses a helper function, and
adds an additional test case.

llvm-svn: 302208
2017-05-05 00:19:57 +00:00
Zachary Turner
5c99339579 [pdb] Don't verify TPI hash values up front.
Verifying the hash values as we are currently doing
results in iterating every type record before the user
even tries to access the first one, and the API user
has no control over, or ability to hook into this
process.

As a result, when the user wants to iterate over types
to print them or index them, this results in a second
iteration over the same list of types.  When there's
upwards of 1,000,000 type records, this is obviously
quite undesirable.

This patch raises the verification outside of TpiStream
, and llvm-pdbdump hooks a hash verification visitor
into the normal dumping process.  So we still verify
the hash records, but we can do it while not requiring
a second iteration over the type stream.

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

llvm-svn: 302206
2017-05-04 23:53:54 +00:00
Zachary Turner
5f415496c7 [PDB] Don't build the entire source file list up front.
I tried to run llvm-pdbdump on a very large (~1.5GB) PDB to
try and identify show-stopping performance problems.  This
patch addresses the first such problem.

When loading the DBI stream, before anyone has even tried to
access a single record, we build an in memory map of every
source file for every module.  In the particular PDB I was
using, this was over 85 million files.  Specifically, the
complexity is O(m*n) where m is the number of modules and
n is the average number of source files (including headers)
per module.

The whole reason for doing this was so that we could have
constant time access to any module and any of its source
file lists.  However, we can still get O(1) access to the
source file list for a given module with a simple O(m)
precomputation, and access to the list of modules is
already O(1) anyway.

So this patches reduces the O(m*n) up-front precomputation
to an O(m) one, where n is ~6,500 and n*m is about 85 million
in my pathological test case.

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

llvm-svn: 302205
2017-05-04 23:53:29 +00:00
Zachary Turner
e07b0e72f8 [llvm-pdbdump] Only build the TypeDatabase if necessary.
Building the type database is expensive, and can take multiple
minutes for large PDBs.  But we only need it in certain cases
depending on what command line options are specified.  So only
build it when we know we're about to need it.

llvm-svn: 302204
2017-05-04 23:53:01 +00:00
Evgeniy Stepanov
c40d5a1d2a Remap metadata attached to global variables.
Fix for PR32577.
Global variables may have !associated metadata, which includes a reference to another global. It needs remapping.

llvm-svn: 302203
2017-05-04 23:29:39 +00:00
Quentin Colombet
41ba4538e4 [RegisterBankInfo] Fix 80-col introduced in r293506.
NFC.

llvm-svn: 302202
2017-05-04 22:43:08 +00:00
Quentin Colombet
0b50c02b72 [GlobalISel] Add missing doxygen keyword for doxygen groups.
NFC

llvm-svn: 302201
2017-05-04 22:43:04 +00:00
Marek Olsak
372ac26def AMDGPU: GFX9 GS and HS shaders always have the scratch wave offset in SGPR5
Reviewers: arsenm, nhaehnle

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

llvm-svn: 302200
2017-05-04 22:25:20 +00:00
Aditya Nandakumar
21ab4f1f43 [GISel]:Skip legalizing Intermediate inst(with generic types)
During legalization, targets can create Pseudo Instructions with
generic types. We shouldn't try to legalize them.

Reviewed by Quentin, dsanders
https://reviews.llvm.org/D32575

llvm-svn: 302199
2017-05-04 22:00:42 +00:00
Craig Topper
526becb23e [JumpThreading] When processing compares, explicitly check that the result type is not a vector rather than check for it being an integer.
Compares always return a scalar integer or vector of integers. isIntegerTy returns false for vectors, but that's not completely obvious. So using isVectorTy is less confusing.

llvm-svn: 302198
2017-05-04 21:45:49 +00:00
Craig Topper
35106648d3 [JumpThreading] Change a dyn_cast that is already protected by an isa check to a static cast. Combine the with another static cast. NFC
Differential Revision: https://reviews.llvm.org/D32874

llvm-svn: 302197
2017-05-04 21:45:45 +00:00
Aditya Nandakumar
3d89fe7e58 [GISel]: Add support to translate ConstantVectors
Reviewed by Quentin
https://reviews.llvm.org/D32814

llvm-svn: 302196
2017-05-04 21:43:12 +00:00
Craig Topper
05b2c64fe3 [ConstantRange] Add LLVM_NODISCARD to ConstantRange since a large number of its methods construct new ConstantRange objects.
llvm-svn: 302194
2017-05-04 21:29:50 +00:00
Craig Topper
502a7e83fe [Float2Int] Remove return of ConstantRange from seen method. Nothing uses it so it just creates and discards a ConstantRange object for no reason.
llvm-svn: 302193
2017-05-04 21:29:45 +00:00
Simon Pilgrim
b525f6e2d7 Strip trailing whitespace. NFCI.
llvm-svn: 302192
2017-05-04 20:55:16 +00:00
Sanjay Patel
83b438b5d1 [InstSimplify] add folds for or-of-casted-icmps
The sibling folds for 'and' with casts were added with https://reviews.llvm.org/rL273200.
This is a preliminary step for adding the 'or' variants for the folds added with https://reviews.llvm.org/rL301260.

The reason for the strange form with constant LHS in the 1st test is because there's another missing fold in that
case for the inverted predicate. That should be fixed when we add the ConstantRange functionality for 'or-of-icmps' 
that already exists for 'and-of-icmps'.

I'm hoping to share more code for the and/or cases, so we won't have these differences. This will allow us to remove
code from InstCombine. It's also possible that we can remove some code here in InstSimplify. I think we have some 
duplicated folds because patterns are not matched in a general way.

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

llvm-svn: 302189
2017-05-04 19:51:34 +00:00
Sam Clegg
e519d7ce80 [WebAssembly] Add wasm symbol table support to llvm-objdump
Differential Revision: https://reviews.llvm.org/D32760

llvm-svn: 302185
2017-05-04 19:32:43 +00:00
Krzysztof Parzyszek
4edf5ccb5f [PPC] When restoring R30 (PIC base pointer), mark it as <def>
This happened on the PPC32/SVR4 path and was discovered when building
FreeBSD on PPC32. It was a typo-class error in the frame lowering code.

This fixes PR26519.

llvm-svn: 302183
2017-05-04 19:14:54 +00:00
Greg Clayton
cbbf12fb46 Don't return an invalid line table if the DW_AT_stmt_list value is not in the .debug_line section.
llvm-svn: 302180
2017-05-04 18:29:44 +00:00
Reid Kleckner
6997551d91 [ms-inline-asm] Use the frontend size only for ambiguous instructions
This avoids problems on code like this:
  char buf[16];
  __asm {
    movups xmm0, [buf]
    mov [buf], eax
  }

The frontend size in this case (1) is wrong, and the register makes the
instruction matching unambiguous. There are also enough bytes available
that we shouldn't complain to the user that they are potentially using
an incorrectly sized instruction to access the variable.

Supersedes D32636 and D26586 and fixes PR28266

llvm-svn: 302179
2017-05-04 18:19:52 +00:00
Sanjay Patel
f9522c28ce [InstSimplify] move logic-of-icmps helper functions; NFC
Putting these next to each other should make it easier to see
what's missing from each side. Patch to plug one of those holes
should be posted soon.

llvm-svn: 302178
2017-05-04 18:19:17 +00:00
Peter Collingbourne
010f0f772b Re-apply r302108, "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
with a fix for the clang backend.

llvm-svn: 302176
2017-05-04 18:03:25 +00:00
Michael Zolotukhin
2e7519e8cc Fix a typo.
llvm-svn: 302175
2017-05-04 17:42:34 +00:00
Sanjay Patel
3ae6e6cd76 [InstSimplify] add tests for or-of-casted-icmps; NFC
llvm-svn: 302174
2017-05-04 17:36:53 +00:00
Davide Italiano
86deddd11f [NewGVN] Remove unneeded newline and format assertions. NFCI.
llvm-svn: 302173
2017-05-04 17:26:15 +00:00
Craig Topper
b6f26d8003 [APInt] Reduce number of allocations involved in multiplying. Reduce worst case multiply size
Currently multiply is implemented in operator*=. Operator* makes a copy and uses operator*= to modify the copy.

Operator*= itself allocates a temporary buffer to hold the multiply result as it computes it. Then copies it to the buffer in *this.

Operator*= attempts to bound the size of the result based on the number of active bits in its inputs. It also has a couple special cases to handle 0 inputs without any memory allocations or multiply operations. The best case is that it calculates a single word regardless of input bit width. The worst case is that it calculates the a 2x input width result and drop the upper bits.

Since operator* uses operator*= it incurs two allocations, one for a copy of *this and one for the temporary allocation. Neither of these allocations are kept after the method operation is done.

The main usage in the backend appears to be ConstantRange::multiply which uses operator* rather than operator*=.

This patch moves the multiply operation to operator* and implements operator*= using it. This avoids the copy in operator*. operator* now allocates a result buffer sized the same width as its inputs no matter what. This buffer will be used as the buffer for the returned APInt. Finally, we reuse tcMultiply to implement the multiply operation. This function is capable of not calculating additional upper words that will be discarded.

This change does lose the special optimizations for the inputs using less words than their size implies. But it also removed the getActiveBits calls from all multiplies. If we think those optimizations are important we could look at providing additional bounds to tcMultiply to limit the computations.

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

llvm-svn: 302171
2017-05-04 17:00:41 +00:00
Easwaran Raman
dd305606e6 [PM] Add ProfileSummaryAnalysis as a required pass in the new pipeline.
Differential revision: https://reviews.llvm.org/D32768

llvm-svn: 302170
2017-05-04 16:58:45 +00:00
Brian Gesiak
23bdd90743 [Lexicon] Add BDCE
Summary: Add an entry to the Lexicon for "BDCE."

Reviewers: jmolloy, hfinkel

Reviewed By: jmolloy

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

llvm-svn: 302169
2017-05-04 16:50:37 +00:00
Adrian Prantl
e999d084c2 Add accidentally deleted testcase back.
llvm-svn: 302167
2017-05-04 16:26:07 +00:00
Adrian Prantl
6fa10ba7f6 Cleanup tests to not share a DISubprogram between multiple Functions.
rdar://problem/31926379

llvm-svn: 302166
2017-05-04 16:24:31 +00:00
Renato Golin
cdce695226 [test-release] Status update *before* long gzip
llvm-svn: 302165
2017-05-04 16:21:30 +00:00
Daniel Sanders
7215d4496b [globalisel][tablegen] Add several GINodeEquiv's for operators that do not require additional support.
Summary:
As of this patch, 350 out of 3938 rules are currently imported.

Depends on D32229

Reviewers: qcolombet, kristof.beyls, rovka, t.p.northover, ab, aditya_nandakumar

Reviewed By: ab

Subscribers: dberris, llvm-commits, igorb

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

llvm-svn: 302154
2017-05-04 14:24:50 +00:00
Chad Rosier
1f7103004e [DAGCombine] Transform (fadd A, (fmul B, -2.0)) -> (fsub A, (fadd B, B)).
Differential Revision: http://reviews.llvm.org/D32596

llvm-svn: 302153
2017-05-04 14:14:44 +00:00
Simon Pilgrim
f720911efd [X86][AVX512] Fix VPABSD file checks
Fix capitalization and string matching

llvm-svn: 302150
2017-05-04 13:42:57 +00:00
Simon Pilgrim
4dbda31a5a [X86][SSE] Add i686 triple tests for partial vector and re-association
llvm-svn: 302149
2017-05-04 13:35:40 +00:00
Krzysztof Parzyszek
d697de4ed0 Refactoring with range-based for, NFC
Patch by Wei-Ren Chen.

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

llvm-svn: 302148
2017-05-04 13:35:17 +00:00
Jonas Paulsson
466bbd4878 [SystemZ] Make copyPhysReg() add impl-use operands of super reg.
When a 128 bit COPY is lowered into two instructions, an impl-use operand of
the super-reg should be added to each new instruction in case one of the
sub-regs is undefined.

Review: Ulrich Weigand
llvm-svn: 302146
2017-05-04 13:33:30 +00:00
Simon Pilgrim
924c731df4 [X86][SSE] Add i686 triple tests for PBLENDW commutation
llvm-svn: 302145
2017-05-04 13:08:09 +00:00
Simon Pilgrim
361796d942 [X86][AVX1] Regenerate checks and add i686 triple tests for folded logical ops
llvm-svn: 302144
2017-05-04 13:00:30 +00:00
Eric Liu
2212b01e87 Revert "IR: Use pointers instead of GUIDs to represent edges in the module summary. NFCI."
This reverts commit r302108. This causes crash in clang bootstrap with LTO.

Contacted the auther in the original commit.

llvm-svn: 302140
2017-05-04 11:49:39 +00:00