1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
Commit Graph

132834 Commits

Author SHA1 Message Date
Chandler Carruth
79352a662a Use the standard INITIALIZE_PASS macro rather than hand rolling a (not
entirely correct) version of its contents.

llvm-svn: 271649
2016-06-03 10:13:29 +00:00
Chandler Carruth
e6f779476e Reformat the macros in Passes.h with clang-format before editting them.
No functionality changed here.

llvm-svn: 271648
2016-06-03 10:13:26 +00:00
Simon Pilgrim
3bafbaa984 [X86][AVX2] Relaxed alignment on nontemporal store tests
llvm-svn: 271646
2016-06-03 10:06:59 +00:00
Simon Pilgrim
c8347b15c6 [X86][AVX2] Regenerated nontemporal store tests and added tests for all 256-bit vector types
llvm-svn: 271645
2016-06-03 09:56:24 +00:00
Daniel Sanders
1a3a82d3cc [mips] Implement 'la' macro in PIC mode for O32.
Summary:
N32 support will follow in a later patch since the symbol version of 'la'
incorrectly believes N32 to have 64-bit pointers and rejects it early.

This fixes the three incorrectly expanded 'la' macros found in bionic.

Reviewers: sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

llvm-svn: 271644
2016-06-03 09:53:06 +00:00
Chandler Carruth
629488a38a Run clang-format over PassSupport.h, mostly to get the macros all
formatted fancily.

I'm working on rewriting these macros to use the new call_once stuff,
but really want to have clang-format work on the edits, so just
re-baselining the entire file here. No changes other than clang-format.

llvm-svn: 271635
2016-06-03 08:46:16 +00:00
Simon Pilgrim
0c614eb08a [X86][XOP] Support for VPERMIL2PD/VPERMIL2PS 2-input shuffle instructions
This patch begins adding support for lowering to the XOP VPERMIL2PD/VPERMIL2PS shuffle instructions - adding the X86ISD::VPERMIL2 opcode and cleaning up the usage.

The internal llvm intrinsics were assuming the shuffle mask operand was the same type as the float/double input operands (I guess to simplify the intrinsic definitions in X86InstrXOP.td to a single value type). These needed changing to integer types (matching the clang builtin and the AMD intrinsics definitions), an auto upgrade path is added to convert old calls.

Mask decoding/target shuffle support will be added in future patches.

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

llvm-svn: 271633
2016-06-03 08:06:03 +00:00
Craig Topper
1981be1e4f [X86] Fix some isel patterns to remove an operand from some multiclasses. NFC
llvm-svn: 271631
2016-06-03 05:58:52 +00:00
Zachary Turner
eace145381 [pdb] Print out file names instead of file offsets.
When printing line information and file checksums, we were printing
the file offset field from the struct header.  This teaches
llvm-pdbdump how to turn those numbers into the filename.  In the
case of file checksums, this is done by looking in the global
string table.  In the case of line contributions, this is done
by indexing into the file names buffer of the DBI stream.  Why
they use a different technique I don't know.

llvm-svn: 271630
2016-06-03 05:52:57 +00:00
Craig Topper
7dae6773ea [AVX512] Ensure EVEX vpshufd, vpshuflw, and vpshufhw have isel priority over the VEX encoded ones.
llvm-svn: 271629
2016-06-03 05:31:04 +00:00
Craig Topper
8371de0a99 [AVX512] Fix shuffle comment printing for EVEX encoded PSHUFD, PSHUFHW, and PSHUFLW.
llvm-svn: 271628
2016-06-03 05:31:00 +00:00
Craig Topper
d4d080a520 [X86] Simplify a multiclass to remove a parameter. NFC
llvm-svn: 271627
2016-06-03 05:30:56 +00:00
Craig Topper
89720ac9ae [X86] Remove unnecessary pattern predicates from the vector bit cast patterns. The types have to be legal and there are no alternative patterns. Saves almost 200 bytes in isel table.
llvm-svn: 271625
2016-06-03 04:15:27 +00:00
Craig Topper
3bff73b92e [X86] Cleanup formatting a bit to align similar parts of adjacent lines.
llvm-svn: 271624
2016-06-03 04:15:25 +00:00
Craig Topper
132b738bf7 [X86] Remove redundant bitcast patterns for 128/256-bit vectors. These only differ from the SSE/AVX versions by the register class, but register class has no bearing on isel.
llvm-svn: 271623
2016-06-03 04:15:22 +00:00
Zachary Turner
6fb9f9896d [pdb] Dump file checksums from pdb codeview line info.
llvm-svn: 271622
2016-06-03 04:01:48 +00:00
Zachary Turner
9277831e4a [codeview] Dump line number and column information.
To facilitate this, a couple of changes had to be made:

1. `ModuleSubstream` got moved from `DebugInfo/PDB` to
`DebugInfo/CodeView`, and various codeview related types are defined
there.  It turns out `DebugInfo/CodeView/Line.h` already defines many of
these structures, but this is really old code that is not endian aware,
doesn't interact well with `StreamInterface` and not very helpful for
getting stuff out of a PDB.  Eventually we should migrate the old readobj
`COFFDumper` code to these new structures, or at least merge their
functionality somehow.

2. A `ModuleSubstream` visitor is introduced.  Depending on where your
module substream array comes from, different subsets of record types can
be expected.  We are already hand parsing these substream arrays in many
places especially in `COFFDumper.cpp`.  In the future we can migrate these
paths to the visitor as well, which should reduce a lot of code in
`COFFDumper.cpp`.

Differential Revision: http://reviews.llvm.org/D20936
Reviewed By: ruiu, majnemer

llvm-svn: 271621
2016-06-03 03:25:59 +00:00
Rui Ueyama
1ca0be6e07 Fix indentation.
llvm-svn: 271620
2016-06-03 02:42:30 +00:00
Qin Zhao
080c5df850 [esan|cfrag] Instrument GEP instr for struct field access.
Summary:
Instrument GEP instruction for counting the number of struct field
address calculation to approximate the number of struct field accesses.

Adds test struct_field_count_basic.ll to test the struct field
instrumentation.

Reviewers: bruening, aizatsky

Subscribers: junbuml, zhaoqin, llvm-commits, eugenis, vitalybuka, kcc, bruening

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

llvm-svn: 271619
2016-06-03 02:33:04 +00:00
Adrian Prantl
9723795f3a Revert "Testcase cleanup: Remove an unused input file."
This reverts commit r271612.
I somehow managed to remove the wrong file m-(

llvm-svn: 271616
2016-06-03 00:24:38 +00:00
Michael Zolotukhin
1fa69d72a0 [LoopUnroll] Set correct thresholds for new recently enabled unrolling heuristic.
In r270478, where I enabled the new heuristic I posted testing results,
which I got when explicitly passed the thresholds values via CL options.
However, setting the CL options init-values is not enough to change the
default values of thresholds, so I'm changing them in another place now.

llvm-svn: 271615
2016-06-03 00:16:46 +00:00
Adrian Prantl
47e3dc6ab3 Testcase cleanup: remove an unused RUN line in an input file.
llvm-svn: 271614
2016-06-02 23:58:52 +00:00
Chris Bieneman
fd55102977 Revert "[yaml2obj] Sort MachO LinkEdit write operations based on offset"
This reverts commit r271611 because it broke a bot:

http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/38184

I don't currently have a handle on what went wrong, so I'll revert while I investigate.

llvm-svn: 271613
2016-06-02 23:58:13 +00:00
Adrian Prantl
918aba74a0 Testcase cleanup: Remove an unused input file.
llvm-svn: 271612
2016-06-02 23:57:42 +00:00
Chris Bieneman
79f5c0a325 [yaml2obj] Sort MachO LinkEdit write operations based on offset
Although ld64 always outputs linkedit data in the same order, it isn't actually required to. This change makes yaml2obj resilient if the offsets are in arbitrary order.

llvm-svn: 271611
2016-06-02 23:52:08 +00:00
Daniel Dunbar
0aa30c2bae [lit] Improve readability of failing scripts.
- This only applies to scripts executed by the _internal_ shell script
   interpreter.

 - This patch reworks the log to look more like a shell transcript, and be less
   verbose (but in the interest of calling attention to the important parts).

Here is an example of the new format, for commands with/without failures and
with/without output:
```
$ true
$ echo hi
hi

$ false
note: command had no output on stdout or stderr
error: command failed with exit status 1

```

llvm-svn: 271610
2016-06-02 23:49:42 +00:00
Daniel Dunbar
5a4535da11 [lit] Factor out a helper for shell command results.
llvm-svn: 271608
2016-06-02 23:32:35 +00:00
Davide Italiano
d094c3c8d1 [TailRecursionElimination] Refactor/cleanup.
In preparation for porting to the new PM.
Patch by Jake VanAdrighem! (review mainly by me/Justin)

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

llvm-svn: 271607
2016-06-02 23:02:44 +00:00
Derek Schuff
b7000e8219 Revert "[WebAssembly] Emit type signatures for declared functions"
This reverts r271599, it broke the integration tests.
More places than I expected had nontrival return types in imports, or
else the check was wrong.

llvm-svn: 271606
2016-06-02 23:02:44 +00:00
Chris Bieneman
45ad72aa8e [obj2yaml] [yaml2obj] Support for MachO nlist and string table
This commit adds round tripping for MachO symbol data. Symbols are entries in the name list, that contain offsets into the string table which is at the end of the __LINKEDIT segment.

llvm-svn: 271604
2016-06-02 22:54:06 +00:00
Sanjay Patel
009edf13a8 [InstCombine] change tests to show a more obvious transform possibility
The original tests were intended to show a missing transform that would
be solved by D20774:
http://reviews.llvm.org/D20774

But it's not clear that the transform for the simpler tests is a win for
all targets. Make the tests show a larger pattern that should be a win
regardless of the cost of bitcast instructions.

llvm-svn: 271603
2016-06-02 22:45:49 +00:00
Manuel Jacob
d6babe096d [PM] Schedule InstSimplify after late LICM run, to clean up LCSSA nodes.
Summary:
The module pass pipeline includes a late LICM run after loop
unrolling.  LCSSA is implicitly run as a pass dependency of LICM.  However no
cleanup pass was run after this, so the LCSSA nodes ended in the optimized output.

Reviewers: hfinkel, mehdi_amini

Subscribers: majnemer, bruno, mzolotukhin, mehdi_amini, llvm-commits

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

llvm-svn: 271602
2016-06-02 22:14:26 +00:00
Davide Italiano
e85b77b60d [PM] LoadCombine preserves GlobalsAA, doesn't depend on it.
llvm-svn: 271601
2016-06-02 22:05:59 +00:00
Davide Italiano
ebef220507 [PM/LoadCombine] Inline getAnalysisUsage(). NFCI.
llvm-svn: 271600
2016-06-02 22:04:43 +00:00
Derek Schuff
f0dc82710c [WebAssembly] Emit type signatures for declared functions
Under emscripten, C code can take the address of a function implemented
in Javascript (which is exposed via an import in wasm). Because imports
do not have linear memory address in wasm, we need to generate a thunk
to be the target of the indirect call; it call the import directly.

To make this possible, LLVM needs to emit the type signatures for these
functions, because they may not be called directly or referred to other
than where the address is taken.

This uses s new .s directive (.functype) which specifies the signature.

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

llvm-svn: 271599
2016-06-02 21:34:18 +00:00
Eric Christopher
95e53c2dbf 80-column fixup after last formatting change.
llvm-svn: 271598
2016-06-02 21:32:30 +00:00
Rui Ueyama
984cef3e31 Add comments.
llvm-svn: 271597
2016-06-02 21:13:47 +00:00
Eric Christopher
efb9b5d540 Fix a couple of misformatted comments spotted in post-commit review.
llvm-svn: 271596
2016-06-02 21:09:17 +00:00
Eric Christopher
f3784f237a This patch is in preparation for a substantial refactoring of the
code. To make the diffs easier to read, clang-format everything first.

No functionality changed.

Patch by Alina Sbirlea!

http://reviews.llvm.org/D20926

llvm-svn: 271595
2016-06-02 21:03:19 +00:00
NAKAMURA Takumi
1c98eb67fa Fixup r271533, or check-clang didn't find llvm-lto as the target.
llvm-svn: 271585
2016-06-02 20:39:24 +00:00
Sanjay Patel
b6f054be99 fix documentation comments; NFC
llvm-svn: 271584
2016-06-02 20:37:52 +00:00
Zachary Turner
8fad65b692 [llvm-pdbdump] Dump CodeView line information.
This first pass only splits apart the records and dumps the line
info kinds and binary data.  Subsequent patches will parse out
the binary data into more useful information and dump it in
detail.

llvm-svn: 271576
2016-06-02 20:11:22 +00:00
Matt Arsenault
bc59009ab9 AMDGPU: Handle flat in getMemOpBaseRegImmOfs
It can still report the base register, and the uses give up when it
fails.

llvm-svn: 271575
2016-06-02 20:05:20 +00:00
Meador Inge
077c3b7628 [ASMParser] Parse FP constants in non-C locales
This patch fixes PR25788, which allows for the parsing of
floating-point constants in non-C locales.

Patch by Antoine Pitrou!

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

llvm-svn: 271574
2016-06-02 20:04:44 +00:00
Sanjay Patel
02638731c1 transform obscured FP sign bit ops into a fabs/fneg using TLI hook
This is effectively a revert of:
http://reviews.llvm.org/rL249702 - [InstCombine] transform masking off of an FP sign bit into a fabs() intrinsic call (PR24886)
and:
http://reviews.llvm.org/rL249701 - [ValueTracking] teach computeKnownBits that a fabs() clears sign bits
and a reimplementation as a DAG combine for targets that have IEEE754-compliant fabs/fneg instructions.

This is intended to resolve the objections raised on the dev list:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098154.html
and:
https://llvm.org/bugs/show_bug.cgi?id=24886#c4

In the interest of patch minimalism, I've only partly enabled AArch64. PowerPC, MIPS, x86 and others can enable later.

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

llvm-svn: 271573
2016-06-02 20:01:37 +00:00
Matt Arsenault
a9ec8d2f35 AMDGPU: Cleanup load tests
There are a lot of different kinds of loads to test for,
and these were scattered around inconsistently with
some redundancy. Try to comprehensively test all loads
in a consistent way.

llvm-svn: 271571
2016-06-02 19:54:26 +00:00
Zachary Turner
d356ecd7d3 [codeview] Fix a nasty use after free.
StreamRef was designed to be a thin wrapper over an abstract
stream interface that could itself be treated the same as any
other stream interface.  For this reason, it inherited publicly
from StreamInterface, and stored a StreamInterface* internally.

But StreamRef was also designed to be lightweight and easily
copyable, similar to ArrayRef.  This led to two misuses of
the classes.

1) When creating a StreamRef A from another StreamRef B, it was
   possible to end up with A storing a pointer to B, even when
   B was a temporary object, leading to use after free.
2) The above situation could be repeated ad nauseum, so that
   A stores a pointer to B, which itself stores a pointer to
   another StreamRef C, and so on and so on, creating an
   unnecessarily level of nesting depth.

This patch removes the public inheritance relationship between
StreamRef and StreamInterface, making it so that we can never
accidentally convert a StreamRef to a StreamInterface.

llvm-svn: 271570
2016-06-02 19:51:48 +00:00
Matt Arsenault
2119ea8370 AMDGPU: Temporary fix for broken store combine
llvm-svn: 271567
2016-06-02 19:00:55 +00:00
David Majnemer
7085a0544f [CodeView] Use None instead of Void if there is no subprogram
llvm-svn: 271566
2016-06-02 18:51:24 +00:00
Chandler Carruth
959e271059 Fix the use of sys::MemoryFence after including WindowsSupport.h that
r271558 introduced.

llvm-svn: 271563
2016-06-02 18:42:23 +00:00