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

134148 Commits

Author SHA1 Message Date
Chris Bieneman
f9c29b59f6 [YAML] Fix YAML tags appearing before the start of sequence elements
Our existing yaml::Output code writes tags immediately when mapTag is called, without any state handling. This results in tags on sequence elements being written before the element itself. For example, we see this:

SomeArray:     !elem_type
  - key1:         1
    key2:         2 !elem_type2
  - key3:         3
    key4:         4

We should instead see:

SomeArray:
  - !elem_type
    key1:         1
    key2:         2
  - !elem_type2
    key3:         3
    key4:         4

Our reader handles reading properly, so this bug only impacts writing yaml sequences with tagged elements.

As a test for this I've modified the Mach-O yaml encoding to allways apply the !mach-o tag when encoding MachOYAML::Object entries. This results in the !mach-o tag appearing as expected in dumped fat files.

llvm-svn: 274067
2016-06-28 21:10:26 +00:00
Zhan Jun Liau
4e66b57ce3 [SystemZ] Use NILL instruction instead of NILF where possible
Summary: SystemZ shift instructions only use the last 6 bits of the shift
amount. When the result of an AND operation is used as a shift amount, this
means that we can use the NILL instruction (which operates on the last 16 bits)
rather than NILF (which operates on the last 32 bits) for a 16-bit savings in
instruction size.

Reviewers: uweigand

Subscribers: llvm-commits

Author: colpell
Committing on behalf of Elliot.

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

llvm-svn: 274066
2016-06-28 21:03:19 +00:00
Simon Pilgrim
bf06d6dbbf Fix "not all control paths return a value" warning on MSVC
llvm-svn: 274065
2016-06-28 21:02:41 +00:00
Matthias Braun
b80573db05 X86FrameLowering: Check subregs when deciding prolog kill flags
llvm-svn: 274057
2016-06-28 20:31:56 +00:00
Rafael Espindola
b99dfd3fd4 Use isPositionIndependent in a few more places.
I think this converts all the simple cases that really just care about
the generated code being position independent or not. The remaining
uses are a bit more complicated and are checking things like "is this
a library or executable" or "can this symbol be preempted".

llvm-svn: 274055
2016-06-28 20:13:36 +00:00
Zachary Turner
db15673748 Update llvm command line parser to support subcommands.
This allows command line tools to use syntaxes like the following:

  llvm-foo.exe command1 -o1 -o2
  llvm-foo.exe command2 -p1 -p2

Where command1 and command2 contain completely different sets of
valid options.  This is backwards compatible with previous uses
of llvm cl which did not support subcommands, as any option
which specifies no optional subcommand (e.g. all existing
code) goes into a special "top level" subcommand that expects
dashed options to appear immediately after the program name.
For example, code which is subcommand unaware would generate
a command line such as the following, where no subcommand
is specified:

  llvm-foo.exe -q1 -q2

The top level subcommand can co-exist with actual subcommands,
as it is implemented as an actual subcommand which is searched
if no explicit subcommand is specified.  So llvm-foo.exe as
specified above could be written so as to support all three
aforementioned command lines simultaneously.

There is one additional "special" subcommand called AllSubCommands,
which can be used to inject an option into every subcommand.
This is useful to support things like help, so that commands
such as:

  llvm-foo.exe --help
  llvm-foo.exe command1 --help
  llvm-foo.exe command2 --help

All work and display the help for the selected subcommand
without having to explicitly go and write code to handle each
one separately.

This patch is submitted without an example of anything actually
using subcommands, but a followup patch will convert the
llvm-pdbdump tool to use subcommands.

Reviewed By: beanz
Differential Revision: http://reviews.llvm.org/D21485

llvm-svn: 274054
2016-06-28 20:09:47 +00:00
Krzysztof Parzyszek
87c25ad74a Fix typo
llvm-svn: 274051
2016-06-28 19:12:28 +00:00
Sanjay Patel
c92546f921 minimize regression tests and update checks
llvm-svn: 274047
2016-06-28 18:40:08 +00:00
Sanjay Patel
4b3c5fd7a2 minimize regression tests and update checks
llvm-svn: 274046
2016-06-28 18:33:10 +00:00
Artur Pilipenko
e2ddc2857d Support arbitrary addrspace pointers in masked load/store intrinsics
This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details).

This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace.

The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics.

Reviewed By: reames

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

llvm-svn: 274043
2016-06-28 18:27:25 +00:00
Jacques Pienaar
cb5da057b9 [lanai] Update ELF number to correspond to the assigned number.
Change EM_LANAI to correspond to machine number assigned by Xinuos.

llvm-svn: 274042
2016-06-28 18:22:22 +00:00
Michael Kuperstein
6a0dcfa9dc [X86] Update a test with more explicit checks. NFC.
llvm-svn: 274040
2016-06-28 17:42:13 +00:00
Matt Arsenault
103dc36b00 AMDGPU: Fix global isel crashes
llvm-svn: 274039
2016-06-28 17:42:09 +00:00
Chad Rosier
95f4d8a1c7 Typos. NFC.
llvm-svn: 274038
2016-06-28 17:19:10 +00:00
Michael Kuperstein
06c3b7e537 [X86] Reorder source list alphabetically. NFC.
llvm-svn: 274036
2016-06-28 17:11:15 +00:00
Matt Arsenault
bd946e171a AMDGPU: Fix typo
llvm-svn: 274034
2016-06-28 16:59:53 +00:00
Matt Arsenault
102857f009 AMDGPU: Remove unused function
llvm-svn: 274033
2016-06-28 16:59:49 +00:00
Vedant Kumar
ca06df5ef5 [llvm-cov] Create an index of reports in -output-dir mode
This index lists the reports available in the 'coverage' sub-directory.
This will help navigate coverage output from large projects.

This commit factors the file creation code out of SourceCoverageView and
into CoveragePrinter.

llvm-svn: 274029
2016-06-28 16:12:24 +00:00
Vedant Kumar
51094a5889 [llvm-cov] Minor cleanups (NFC)
- Test the '-o' alias for -output-dir.
- Use a helper method in a conditional.
- Add a period.

llvm-svn: 274028
2016-06-28 16:12:20 +00:00
Vedant Kumar
22e46a6b65 [llvm-cov] Avoid copying file paths multiple times (NFC)
llvm-svn: 274027
2016-06-28 16:12:18 +00:00
Vedant Kumar
6b51d9f9f3 [llvm-cov] Rename ShowFormat to Format (NFC)
This makes it a bit more generic, in case we want to emit summary
reports in different formats in the future.

llvm-svn: 274026
2016-06-28 16:12:15 +00:00
Vedant Kumar
eb92c94b10 [llvm-cov] Move a check into a helper method (NFC)
llvm-svn: 274025
2016-06-28 16:12:12 +00:00
David Majnemer
625baccb69 [X86] Make WRPKRU/RDPKRU pass -verify-machineinstrs
The original implementation attempted to zero registers using
XOR %foo, %foo.  This is problematic because it constitutes a
read-modify-write of a register which might not be defined.

Instead, use MOV32r0 to avoid these problems; expandPostRAPseudo does
the right thing here.

llvm-svn: 274024
2016-06-28 16:04:46 +00:00
Rafael Espindola
d4d7a28825 Don't pass a Reloc::Model to GVIsIndirectSymbol.
It already has access to it.

While at it, rename it to isGVIndirectSymbol.

llvm-svn: 274023
2016-06-28 15:38:13 +00:00
Rafael Espindola
bdbe00f54a Don't pass Reloc::Model to places that already have it. NFC.
llvm-svn: 274022
2016-06-28 15:18:26 +00:00
Rafael Espindola
2d847d1395 Convert more cases to isPositionIndependent(). NFC.
llvm-svn: 274021
2016-06-28 14:33:28 +00:00
Rafael Espindola
ff6f76d814 Delete dead code. NFC.
llvm-svn: 274020
2016-06-28 14:26:39 +00:00
Marcin Koscielnicki
4a4976d08a [SystemZ] Save/restore r6 and r7 if function contains landing pad.
This fixes PR27102.

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

llvm-svn: 274017
2016-06-28 14:13:11 +00:00
Simon Pilgrim
b9be2425fd [X86][AVX] Peek through bitcasts to find the source of broadcasts (reapplied)
AVX1 can only broadcast vectors as floats/doubles, so for 256-bit vectors we insert bitcasts if we are shuffling v8i32/v4i64 types. Unfortunately the presence of these bitcasts prevents the current broadcast lowering code from peeking through cases where we have concatenated / extracted vectors to create the 256-bit vectors.

This patch allows us to peek through bitcasts as long as the number of elements doesn't change (i.e. element bitwidth is the same) so the broadcast index is not affected.

Note this bitcast peek is different from the stage later on which doesn't care about the type and is just trying to find a load node.

As we're being more aggressive with bitcasts, we also need to ensure that the broadcast type is correctly bitcasted

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

llvm-svn: 274013
2016-06-28 13:24:05 +00:00
Simon Pilgrim
51f5a64a7b Fix "not all control paths return a value" warning on MSVC
llvm-svn: 274011
2016-06-28 12:55:35 +00:00
Rafael Espindola
a8ec521722 Convert 2 more uses to shouldAssumeDSOLocal(). NFC.
llvm-svn: 274009
2016-06-28 12:49:12 +00:00
Simon Pilgrim
36811ffcba Fixed MSVC unresolved symbol error due to an incorrectly declared extern
llvm-svn: 274007
2016-06-28 12:34:44 +00:00
Vassil Vassilev
acb80d7960 [modules] Separate intrinsic_gen dependent headers from module LLVM_IR.
Some headers in IR depend on tablegen generated code. Modules builds triggered
generation of the LLVM_IR module (including headers dependant on intrinsic_gen),
imposing a unnecessary build dependency.

Reviewed by Richard Smith.

llvm-svn: 274006
2016-06-28 12:27:09 +00:00
Rafael Espindola
9c61f8de9e Use isPositionIndependent(). NFC.
llvm-svn: 274005
2016-06-28 12:25:00 +00:00
Vassil Vassilev
588b20f9cd Add missing includes.
Patch by Cristina Cristescu.

llvm-svn: 274004
2016-06-28 12:17:05 +00:00
Arnaud A. de Grandmaison
c0ea87a2dc [gold] Really fix test to run on non x86 platforms.
Address post-commit comment from H.J. Lu.

llvm-svn: 274000
2016-06-28 08:12:09 +00:00
Simon Pilgrim
e24daf0c1e [X86][SSE] Added support for combining target shuffles to (V)PSHUFD/VPERMILPD/VPERMILPS immediate permutes
This patch allows target shuffles to be combined to single input immediate permute instructions - (V)PSHUFD/VPERMILPD/VPERMILPS - allowing more general pattern matching than what we current do and improves the likelihood of memory folding compared to existing patterns which tend to reuse the input in multiple arguments.

Further permute instructions (V)PSHUFLW/(V)PSHUFHW/(V)PERMQ/(V)PERMPD may be added in the future but its proven tricky to create tests cases for them so far. (V)PSHUFLW/(V)PSHUFHW is already handled quite well in combineTargetShuffle so it may be that removing some of that code may allow us to perform more of the combining in one place without duplication.

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

llvm-svn: 273999
2016-06-28 08:08:15 +00:00
Xinliang David Li
d07acd7937 [BFI/MBFI]: cfg graph view with color scheme
This patch enhances dot graph viewer to show hot regions
with hot bbs/edges displayed in red. The ratio of the bb
freq to the max freq of the function needs to be no less
than the value specified by view-hot-freq-percent option.
The default value is 10 (i.e. 10%).

llvm-svn: 273996
2016-06-28 06:58:21 +00:00
Elena Demikhovsky
e94b365dab [X86 Target Lowering] Merged ICMP test.
llvm-svn: 273995
2016-06-28 06:25:38 +00:00
Xinliang David Li
875aa04182 [BFI]: enhance BFI graph dump
MBFI supports profile count dumping and function
name based filtering. Add these two feature to
BFI as well. The filtering option is shared between
BFI and MBFI: -view-bfi-func-name=..

llvm-svn: 273992
2016-06-28 04:07:03 +00:00
Adam Nemet
18d5e1610a [LLE] Don't hoist conditionally executed loads
If the load is conditional we can't hoist its 0-iteration instance to
the preheader because that would make it unconditional.  Thus we would
access a memory location that the original loop did not access.

llvm-svn: 273991
2016-06-28 04:02:47 +00:00
Xinliang David Li
4b028888ec [BFI]: graph viewer code refactoring
BFI and MBFI's dot traits class share most of the
code and all future enhancement. This patch extracts
common implementation into base class BFIDOTGraphTraitsBase.

This patch also enables BFI graph to show branch probability
on edges as MBFI does before.

llvm-svn: 273990
2016-06-28 03:41:29 +00:00
Vedant Kumar
d206ece55d [llvm-cov] Simplify; NFC
llvm-svn: 273988
2016-06-28 03:37:56 +00:00
Vedant Kumar
d930dacca2 Reapply "[llvm-cov] Add an -output-dir option for the show sub-command""
Passing -output-dir path/to/dir to llvm-cov show creates path/to/dir if
it doesn't already exist, and prints reports into that directory.

In function view mode, all views are written into
path/to/dir/functions.$EXTENSION. In file view mode, all views are
written into path/to/dir/coverage/$PATH.$EXTENSION.

Changes since the initial commit:

- Avoid accidentally closing stdout twice.

llvm-svn: 273985
2016-06-28 02:09:39 +00:00
Nick Lewycky
d48e0385a1 NFC. Fix popular typo in comment 'deferencing' --> 'dereferencing'.
Bonus changes, * placement in X86ISelLowering and 'exerce' -> 'exercise' in test.

llvm-svn: 273984
2016-06-28 01:45:05 +00:00
Vedant Kumar
b17e17f6e8 Revert "[llvm-cov] Add an -output-dir option for the show sub-command"
This reverts commit r273971. test/profile/instrprof-visibility.cpp is
failing because of an uncaught error in SafelyCloseFileDescriptor.

llvm-svn: 273978
2016-06-28 01:14:04 +00:00
Matt Arsenault
c7127f0b78 AMDGPU: Fix out of bounds indirect indexing errors
This was producing acceses to registers beyond the super
register's limits, resulting in verifier failures.

llvm-svn: 273977
2016-06-28 01:09:00 +00:00
Matthias Braun
4dc66c9f42 AArch64: Remove unnecessary namespace llvm; NFC
llvm-svn: 273975
2016-06-28 00:54:33 +00:00
Michael Kuperstein
54d8f86ab8 [PM] Normalize FIXMEs for missing PreserveCFG to have the same wording.
llvm-svn: 273974
2016-06-28 00:54:12 +00:00
Chandler Carruth
4e7f9aff09 [PM] Sink the module parsing from the fixture to the test as subsequent
tests will want different IR.

Wanted this when writing tests for the proposed CG update stuff, and
this is an easily separable piece.

llvm-svn: 273973
2016-06-28 00:38:42 +00:00