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

116554 Commits

Author SHA1 Message Date
Matt Arsenault
c3f1d1307f Mips: Remove dead declaration
llvm-svn: 236250
2015-04-30 19:35:43 +00:00
Matt Arsenault
07ee8a89f5 MachineVerifier: Don't crash if MachineOperand has no parent
If you somehow added a MachineOperand to an instruction
that did not have the parent set, the verifier would
crash since it attempts to use the operand's parent.

llvm-svn: 236249
2015-04-30 19:35:41 +00:00
Pete Cooper
54ecccfd00 Don't rewrite jumps to empty BBs to landing pads.
In the test case here, the 'unreachable' BB was removed by BranchFolding because its empty.

It then rewrote the jump from 'entry' to jump to its fallthrough, which was a landing pad.

This results in 'entry' jumping to 2 different landing pads, which fails the machine verifier.

rdar://problem/20750162

llvm-svn: 236248
2015-04-30 18:58:23 +00:00
Quentin Colombet
bc9c5a5af1 [ARM] Do not generate invalid encoding for stack adjust, even if this is just
temporary.

Because of that:
1. The machine verifier was complaining on such code.
2. The generate code worked just because the thumb reduction size pass fixed the
opcode.

rdar://problem/20749824

llvm-svn: 236247
2015-04-30 18:52:49 +00:00
Tim Northover
db249b5492 AArch64: add BFC alias for the BFI/BFM instructions.
Unlike 32-bit ARM, AArch64 can use wzr/xzr to implement this without the need
for a separate instruction.

rdar://18679590

llvm-svn: 236245
2015-04-30 18:28:58 +00:00
Reid Kleckner
f16b28762e Add a note about permitting default member initializers
Use them in WinEHPrepare so that we can spot any toolchain bugs that
come up.

llvm-svn: 236244
2015-04-30 18:17:12 +00:00
Jan Vesely
72f354c922 Reinstate revisions r234755, r234759, r234760
changes:
  Don't apply on hexagon and NVPTX since they no longer claim to support UADDO/USUBO
  Add location to getConstant
  Drop comment about the ops being turned into expand

llvm-svn: 236240
2015-04-30 17:15:56 +00:00
Daniel Berlin
f6799ad1b8 Move equality function for AliasAnalysis::Location from DenseMapInfo to Location struct so it can be used in other types of maps
llvm-svn: 236237
2015-04-30 16:15:07 +00:00
Rafael Espindola
2375592ce3 Write sections mostly in one pass.
During ELF writing, there is no need to further relax the sections, so we
should not be creating fragments. This patch avoids doing so in all cases
but debug section compression (that is next).

Also, the ELF format is fairly simple to write. We can do a single pass over
the sections to write them out and compute the section header table.

llvm-svn: 236235
2015-04-30 14:21:49 +00:00
Aaron Ballman
abe3091fb7 Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.
llvm-svn: 236234
2015-04-30 14:03:12 +00:00
Rafael Espindola
78d4d4cade Don't check for offsets in tests where it is not relevant.
llvm-svn: 236233
2015-04-30 13:57:06 +00:00
Diego Novillo
14246c3af8 Fix private constructor for ScaledNumber.
Summary:
The private constructor for ScaledNumber was using uint64_t instead of
DigitsT. This was preventing instantiations of ScaledNumber with
anything other than uint64_t types.

In implementing the tests, I ran into another issue. Operators >>= and
<<= did not have variants for accepting other ScaledNumber as the shift
argument. This is expected by the SCALED_NUMBER_BOP.

It makes no sense to allow shifting a ScaledNumber by another
ScaledNumber, so the patch includes two new templates for shifting
ScaledNumbers.

Reviewers: dexonsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9350

llvm-svn: 236232
2015-04-30 13:22:48 +00:00
Rafael Espindola
50c8e21619 Check the entire content of the comdat group.
llvm-svn: 236230
2015-04-30 13:08:09 +00:00
Diego Novillo
b50a3fe2a5 Fix typo in comment. NFC.
llvm-svn: 236227
2015-04-30 12:27:51 +00:00
Daniel Sanders
ca9b74ebd6 [mips] Sorted instructions in mips64r6 disassembly tests. NFC.
llvm-svn: 236223
2015-04-30 10:52:42 +00:00
Daniel Sanders
03aec139d8 [mips][mips64r6] Sorted instructions in test. NFC.
llvm-svn: 236221
2015-04-30 10:23:48 +00:00
Daniel Sanders
0bbd3e3f2c [mips][msa] Rename main check prefix to 'ALL' in basic operations tests. NFC
Summary:
The majority of the checks are subtarget independent. The few that aren't
will be corrected shortly.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9340

llvm-svn: 236220
2015-04-30 09:57:37 +00:00
Daniel Sanders
95fe30da62 [mips][msa] Use CHECK-LABEL where missing, and remove checks matching the .size directive. NFC.
Summary: 

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9339

llvm-svn: 236219
2015-04-30 09:56:30 +00:00
Daniel Sanders
32a98df5fb [mips] Add missing signext attributes to MSA basic operations tests. NFC.
Summary:
This doesn't make much difference to MIPS32, but it will simplify a
MIPS64r6 bugfix which will follow shortly by removing unnecessary
sign-extension of parameters.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9338

llvm-svn: 236216
2015-04-30 09:24:09 +00:00
Pawel Bylica
64c0a68383 Add convenient overloads for CreateInsertElement and CreateExtractElement methods in IRBuilder
Summary:
This pathc add convenient overloads for CreateInsertElement and CreateExtractElement methods in IRBuilder
where vector index can be uint64_t instead of Value*.

Test Plan: Unit test included.

Reviewers: majnemer

Reviewed By: majnemer

Subscribers: majnemer, llvm-commits

Differential Revision: http://reviews.llvm.org/D9347

llvm-svn: 236214
2015-04-30 09:01:22 +00:00
Daniel Jasper
6977e1bcb9 Silence unused warning in non-assert builds.
llvm-svn: 236213
2015-04-30 09:01:21 +00:00
Daniel Jasper
f051789fab Inline local variable to silence unused warning.
llvm-svn: 236212
2015-04-30 08:51:13 +00:00
Elena Demikhovsky
201b5c4641 Masked gather and scatter - added DAGCombine visitors
and AVX-512 instruction selection patterns.
All other patches, including tests will follow.

http://reviews.llvm.org/D7665

llvm-svn: 236211
2015-04-30 08:38:48 +00:00
Simon Pilgrim
07a58b66cf [SSE] Fix for MUL v16i8 on pre-SSE41 targets (PR23369).
Sign extension of i8 to i16 was placing the unpacked bytes in the lower byte instead of the upper byte.

llvm-svn: 236209
2015-04-30 08:23:16 +00:00
Craig Topper
abe63ac9e0 [TableGen] Cleanup formatting by moving operators from beginning of line to end of previous line. NFC
llvm-svn: 236206
2015-04-30 05:54:22 +00:00
Craig Topper
b6b2d4f5da [TableGen] Used range-based for loop. NFC.
llvm-svn: 236205
2015-04-30 05:54:20 +00:00
Craig Topper
5f3a8c0649 [TableGen] Merge a variable assignment and a return to drop curly braces. Fold an assignment into an if. Use auto on the result of a couple dyn_casts. NFC
llvm-svn: 236204
2015-04-30 05:12:52 +00:00
Sanjoy Das
dd8fba973b [InstCombine] Add new rule for MIN(MAX(~A, ~B), ~C) et. al.
Summary:
Optimizing these well are especially interesting for IRCE since it
"clamps" values by generating this sort of pattern through SCEV
expressions.

Depends on D9352.

Reviewers: majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9353

llvm-svn: 236203
2015-04-30 04:56:04 +00:00
Sanjoy Das
668a7c9deb [InstCombine] Add a new formula for SMIN.
Summary:
After this change `MatchSelectPattern` recognizes the following form
of SMIN:

  Y >s C ? ~Y : ~C == ~Y <s ~C ? ~Y : ~C = SMIN(~Y, ~C)

Reviewers: majnemer

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9352

llvm-svn: 236202
2015-04-30 04:56:00 +00:00
Filipe Cabecinhas
841f137646 Don't overflow GCTable
Summary: Bug found with AFL fuzz.

Reviewers: rafael, dexonsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9361

llvm-svn: 236200
2015-04-30 04:09:41 +00:00
Owen Anderson
da14e7665d Semantically revert r236031, which is not a good idea for in-order targets.
At the least it should be guarded by some kind of target hook.
It also introduced catastrophic compile time and code quality
regressions on some out of tree targets (test case still being
reduced/sanitized).

Sanjay agreed with reverting this patch until these issues can be
resolved.

llvm-svn: 236199
2015-04-30 04:06:32 +00:00
Hans Wennborg
847f84eef8 XFAIL test/CodeGen/Generic/MachineBranchProb.ll on Hexagon (PR23377)
llvm-svn: 236196
2015-04-30 01:59:04 +00:00
Filipe Cabecinhas
b61d720670 Make sure Op->getType() is a PointerType before we cast<> it.
Bug found with AFL fuzz.

llvm-svn: 236193
2015-04-30 01:13:31 +00:00
Hans Wennborg
1476a3b8b7 Switch lowering: use profile info to build weight-balanced binary search trees
This will cause hot nodes to appear closer to the root.

The literature says building the tree like this makes it a near-optimal (in
terms of search time given key frequencies) binary search tree. In LLVM's case,
we can do up to 3 comparisons in each leaf node, so it might be better to opt
for lower tree height in some cases; that's something to look into in the
future.

Differential Revision: http://reviews.llvm.org/D9318

llvm-svn: 236192
2015-04-30 00:57:37 +00:00
Filipe Cabecinhas
c8f68a05d1 Make sure we don't resize(0) when we get a fwdref with Idx == UINT_MAX
Make it an error instead.

Bug found with AFL fuzz.

llvm-svn: 236190
2015-04-30 00:52:42 +00:00
Rafael Espindola
f4d8e72cec Store relocations in a map from MCSectionELF.
Saves finding the MCSectionData just to do a map lookup.

llvm-svn: 236189
2015-04-30 00:45:46 +00:00
Rafael Espindola
b7841f3152 Write relocations directly to the output stream. NFC.
llvm-svn: 236187
2015-04-30 00:30:40 +00:00
Ahmed Bougacha
bfe392760e Flip r236172 testcase RUN option ordering for BSD sed(1). NFC.
llvm-svn: 236186
2015-04-30 00:07:34 +00:00
Pete Cooper
00f179e7a1 Change x86 CMOVE_F to read it source, not write it.
This was breaking sqlite with the machine verifier because operand 0 was a def according to tablegen, but didn't have the 'isDef' flag set.

Looking at the ISA, its clear that this operand is a source as writing to st(0) is implicit.  So move the operand to the correct place in the td file.

rdar://problem/20751584

llvm-svn: 236183
2015-04-29 23:51:33 +00:00
Jonathan Roelofs
60595b4739 Fix doxygen comment typo. NFC
llvm-svn: 236180
2015-04-29 23:33:32 +00:00
David Blaikie
ba3e12d3c8 [opaque pointer type] Store the value type of an alloca
llvm-svn: 236175
2015-04-29 23:00:35 +00:00
Reid Kleckner
3691294c25 [WinEH] Start EH preparation for 32-bit x86, it uses no arguments
32-bit x86 MSVC-style exceptions are functionaly similar to 64-bit, but
they take no arguments. Instead, they implicitly use the value of EBP
passed in by the caller as a pointer to the parent's frame. In LLVM, we
can represent this as llvm.frameaddress(1), and feed that into all of
our calls to llvm.framerecover.

The next steps are:
- Add an alloca to the fs:00 linked list of handlers
- Add something like llvm.sjlj.lsda or generalize it to store in the
  alloca
- Move state number calculation to WinEHPrepare, arrange for
  FunctionLoweringInfo to call it
- Use the state numbers to insert explicit loads and stores in the IR

llvm-svn: 236172
2015-04-29 22:49:54 +00:00
Sanjay Patel
2ccd4d76a4 generalize binop reassociation; NFC
Move the fold introduced in r236031:
http://reviews.llvm.org/rL236031

to its own helper function, so we can use it for other binops.

This is a preliminary step before partially solving:
https://llvm.org/bugs/show_bug.cgi?id=21768
https://llvm.org/bugs/show_bug.cgi?id=23116

llvm-svn: 236171
2015-04-29 22:30:02 +00:00
Pat Gavlin
e54da64b07 Run StatepointLowering.{cpp,h} through clang-format.
llvm-svn: 236166
2015-04-29 21:52:45 +00:00
Chris Bieneman
bf495e7fea [NFC] Updating FileCheck to reduce the std::vector interface used via cl::list.
llvm-svn: 236164
2015-04-29 21:45:24 +00:00
Chris Bieneman
7959fbd9ed [NFC] Converting to range-based for.
llvm-svn: 236163
2015-04-29 21:45:22 +00:00
David Blaikie
0f91b70796 [opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space
Many of the callers already have the pointer type anyway, and for the
couple of callers that don't it's pretty easy to call PointerType::get
on the pointee type and address space.

This avoids LLParser from using PointerType::getElementType when parsing
GlobalAliases from IR.

llvm-svn: 236160
2015-04-29 21:22:39 +00:00
Rafael Espindola
19a54bb9e0 Inline FragmentWriter into the only user.
llvm-svn: 236158
2015-04-29 21:13:30 +00:00
Rafael Espindola
078870f232 Write the symbol table directly to the output file.
There is no need to first accumulate it in fragments.

llvm-svn: 236157
2015-04-29 21:09:32 +00:00
Sanjay Patel
44c9e16488 tidy up; NFC
llvm-svn: 236156
2015-04-29 21:01:41 +00:00