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

118477 Commits

Author SHA1 Message Date
Justin Bogner
03672666c5 InstrProf: Add a test for multiple copies of the same with different hashes
This functionality wasn't being tested.

Patch by Betul Buyukkurt.

llvm-svn: 240359
2015-06-22 23:56:53 +00:00
Pete Cooper
ea16a2ca79 Create Value.def helper. NFC.
This is similar to Metadata.def and Instructions.def but for Value's.

It will be used in upcoming commits to devirtualize the Value class.

Reviewed by Duncan Exon Smith.

llvm-svn: 240358
2015-06-22 23:48:35 +00:00
Evgeniy Stepanov
596af2bee0 Fix PR23914.
r226830 moved the declaration of Buf to a nested scope, resulting
in a dangling reference (in StringRef Name), and a use-after-free.

llvm-svn: 240357
2015-06-22 23:36:03 +00:00
Logan Chien
d212df2b2f Code cleanup: Remove std::move() around xvalue (NFC)
Remove std::move() around xvalue so that copy elision is eligible.
In case that copy elision is not appliable, the c++ standard also
guarantees the move semantics on xvalue.  Thus, it is not necessary
to wrap Args with std::move.

This also silence a warning since r240345.

llvm-svn: 240355
2015-06-22 23:16:02 +00:00
Adam Nemet
74eb74412f [LoopDist] Improve variable names and comments in LoopVersioning class, NFC
As with the previous patch, the goal is to turn the class into a general
loop-versioning class.  This patch removes any references to loop
distribution.

llvm-svn: 240352
2015-06-22 22:59:40 +00:00
David Blaikie
5b0406bb13 Modify ParseArgs to return the InputArgList by value - there's no need for dynamic allocation/ownership here
The one caller that does anything other than keep this variable on the
stack is the single use of DerivedArgList in Clang, which is a bit more
interesting but can probably be cleaned up/simplified a bit further
(have DerivedArgList take ownership of the InputArgList rather than
needing to reference its Args indirectly) which I'll try to after this.

llvm-svn: 240345
2015-06-22 22:06:37 +00:00
Chris Bieneman
8b6990272e [CMake] Treating LLVM_INCLUDE_TOOLS, which is a bool, as a string to change behaviors of the build is a dirty hack. We shouldn't do it.
Summary: I don't think anyone is relying on this behavior for bootstrapping (because I don't think it works), but if you do need it, speak now or forever hold your peace.

Reviewers: chapuni, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

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

llvm-svn: 240344
2015-06-22 21:58:02 +00:00
Pawel Bylica
adda783aca Revert r240291: causes problems in self-hosted builds.
llvm-svn: 240343
2015-06-22 21:54:07 +00:00
Simon Pilgrim
dc48660f8c [X86][FMA4] FMA4 ops can perform unaligned folded loads.
llvm-svn: 240342
2015-06-22 21:49:41 +00:00
Peter Collingbourne
a645358ea2 Linker: Do not expect comdat to exist in source module.
llvm-svn: 240341
2015-06-22 21:46:51 +00:00
Joseph Tremoulet
eadf116d55 Fix line endings (NFC)
I inadvertently checked these in with Windows-style line
endings in r240288.

llvm-svn: 240340
2015-06-22 21:37:34 +00:00
Frederic Riss
0c3b9888f7 [Object] Search for architecures by name in MachOUniversalBinary::getObjectForArch()
The reason we need to search by name rather than by Triple::ArchType
is to handle subarchitecture correclty. There is no different ArchType
for the x86_64h architecture (it identifies itself as x86_64), or for
the various ARM subarches. The only way to get to the subarch slice
in an universal binary is to search by name.

This issue led to hard to debug and transient symbolication failures
in Asan tests (it mostly works, because the files are very similar).

This also affects the Profiling infrastucture as it is the other user
of that API.

Reviewers: samsonov, bogner

Subscribers: llvm-commits

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

llvm-svn: 240339
2015-06-22 21:33:24 +00:00
Pawel Bylica
6619e83c03 Set missing x86 arch in a CodeGen regression test.
Fixes the regression test added in r240291.

llvm-svn: 240336
2015-06-22 21:18:10 +00:00
Hans Wennborg
30fc543b2b test-release.sh: Minor fixes.
llvm-svn: 240334
2015-06-22 21:13:30 +00:00
Simon Pilgrim
77fe8ee210 [X86][AVX2] Added missing stack folding tests for vpshufhw/vpshuflw
llvm-svn: 240332
2015-06-22 21:10:42 +00:00
Tom Stellard
cccd26327d R600/SI: Use ELF64 format instead of ELF32
Reviewers: arsenm, rafael

Subscribers: llvm-commits

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

llvm-svn: 240331
2015-06-22 21:03:54 +00:00
Tom Stellard
5a698953ca R600: Use EM_AMDGPU for the ELF Machine type
Reviewers: arsenm, rafael

Subscribers: llvm-commits

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

llvm-svn: 240330
2015-06-22 21:03:52 +00:00
Tom Stellard
6d9f05d5aa Support/ELF: Add EM_AMDGPU
Summary: This will be used by the R600 backend.

Reviewers: chandlerc, rafael

Subscribers: llvm-commits

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

llvm-svn: 240329
2015-06-22 21:03:47 +00:00
Ahmed Bougacha
95d8094810 [X86] Teach load folding to accept scalar _Int users of MOVSS/MOVSD.
The _Int instructions are special, in that they operate on the full
VR128 instead of FR32.  The load folding then looks at MOVSS, at the
user, and bails out when it sees a size mismatch.

What we really know is that the rm_Int instructions don't load the
higher lanes, so folding is fine.

This happens for the straightforward intrinsic code, e.g.:

    _mm_add_ss(a, _mm_load_ss(p));

Fixes PR23349.

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

llvm-svn: 240326
2015-06-22 20:51:51 +00:00
Alex Lorenz
b5bed015c2 MIR Serialization: Introduce a lexer for machine instructions.
This commit adds a function that tokenizes the string containing
the machine instruction. This commit also adds a struct called 
'MIToken' which is used to represent the lexer's tokens.

Reviewers: Sean Silva

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

llvm-svn: 240323
2015-06-22 20:37:46 +00:00
Peter Collingbourne
bd0552209e SafeStack: Create the unsafe stack pointer on demand.
This avoids creating an unnecessary undefined reference on targets such as
NVPTX that require such references to be declared in asm output.

llvm-svn: 240321
2015-06-22 20:26:54 +00:00
Pete Cooper
80f846dbf4 Move MCSymbol Value in to the union of Offset and CommonSize.
This is a reapplication of r239440 which was reverted in r239441.
There are no changes to this patch from then, but this had instead exposed
a bug in .thumb_set which was fixed in r240318.  Having fixed that bug, it
is now safe to re-apply this code.

Original commit message below:

It wasn't possible to have a variable Symbol with offset or 'isCommon' so
this just enables better packing of the MCSymbol class.

Reviewed by Rafael Espindola.

llvm-svn: 240320
2015-06-22 19:57:33 +00:00
Pete Cooper
e49cb88496 Change .thumb_set to have the same error checks as .set.
According to the documentation, .thumb_set is 'the equivalent of a .set directive'.

We didn't have equivalent behaviour in terms of all the errors we could throw, for
example, when a symbol is redefined.

This change refactors parseAssignment so that it can be used by .set and .thumb_set
and implements tests for .thumb_set for all the errors thrown by that method.

Reviewed by Rafael Espíndola.

llvm-svn: 240318
2015-06-22 19:35:57 +00:00
Krzysztof Parzyszek
1ffe9ef119 Remove "const" from the MachineFunction reference in VLIWPacketizerList
llvm-svn: 240317
2015-06-22 18:59:44 +00:00
Justin Bogner
a5be37ef3b docs: Update allowed values for LLVM_USE_SANITIZER
"Thread" and combinations of "Address" and "Undefined" have been
accepted for a while now.

llvm-svn: 240316
2015-06-22 18:55:46 +00:00
Sanjay Patel
164919e49c [x86] set default reciprocal (division and square root) codegen to match GCC
D8982 ( checked in at http://reviews.llvm.org/rL239001 ) added command-line 
options to allow reciprocal estimate instructions to be used in place of
divisions and square roots.

This patch changes the default settings for x86 targets to allow that recip
codegen (except for scalar division because that breaks too much code) when
using -ffast-math or its equivalent. 

This matches GCC behavior for this kind of codegen.

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

llvm-svn: 240310
2015-06-22 18:29:44 +00:00
Sanjoy Das
ce613c8a7a Fix MSVC build (again!).
Remove two `typename`s that I should have removed in r240307 but left in
by mistake.

llvm-svn: 240309
2015-06-22 18:24:50 +00:00
Rafael Espindola
32dfacb0f5 Do not pass -allow-shlib-undefined to the Solaris linker.
Patch by Xan López.

llvm-svn: 240308
2015-06-22 18:24:01 +00:00
Sanjoy Das
5b9b760961 Fix MSVC build.
I had some unnecessary `typename`s left in after addressing review.
This compiled successfully with clang++ but MSVC reported an error.  Fix
the build error by removing the redundant `typename`s.

llvm-svn: 240307
2015-06-22 18:20:10 +00:00
Rafael Espindola
02e614b8a0 Remove the IsStreamed member variable.
Having different code paths for streamed and regular bitcode reading was a
source of bugs in the past and this defines them away.

It has a small but noticeable impact on performance. I timed running
"opt -disable-output -disable-verify" on a ltoed clang. It goes from

14.752845231 seconds time elapsed   ( +-  0.16% )

to

15.012463721 seconds time elapsed   ( +-  0.11% )

Extracted from a patch by Karl Schimpf.

llvm-svn: 240305
2015-06-22 18:06:15 +00:00
Sanjoy Das
bea61317e9 [FaultMaps] Add a parser for the __llvm__faultmaps section.
Summary:
The parser is exercised by llvm-objdump using -print-fault-maps.  As is
probably obvious, the code itself was "heavily inspired" by
http://reviews.llvm.org/D10434.

Reviewers: reames, atrick, JosephTremoulet

Subscribers: llvm-commits

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

llvm-svn: 240304
2015-06-22 18:03:02 +00:00
Sanjoy Das
8777858a45 [NFC] Capitalization in documentation.
llvm-svn: 240303
2015-06-22 18:02:55 +00:00
Rafael Espindola
1bd232f704 Bring r240130 back.
Now that pr23900 is fixed, we can bring it back with no changes.

Original message:

Make all temporary symbols unnamed.

What this does is make all symbols that would otherwise start with a .L
(or L on MachO) unnamed.

Some of these symbols still show up in the symbol table, but we can just
make them unnamed.

In order to make sure we produce identical results when going thought assembly,
all .L (not just the compiler produced ones), are now unnamed.

Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to
205.57MB.

llvm-svn: 240302
2015-06-22 17:52:52 +00:00
Rafael Espindola
49ad24ce06 Avoid a Symbol -> Name -> Symbol conversion.
Before this we were producing a TargetExternalSymbol from a MCSymbol.
That meant extracting the symbol name and fetching the symbol again
down the pipeline.

This patch adds a DAG.getMCSymbol that lets the MCSymbol pass unchanged on the
DAG.

Doing so removes the need for MO_NOPREFIX and fixes the root cause of pr23900,
allowing r240130 to be committed again.

llvm-svn: 240300
2015-06-22 17:46:53 +00:00
Alex Lorenz
71956fb32c MIR Serialization: Serialize machine instruction names.
This commit implements initial machine instruction serialization. It
serializes machine instruction names. The instructions are represented
using a YAML sequence of string literals and are a part of machine
basic block YAML mapping.

This commit introduces a class called 'MIParser' which will be used to
parse the machine instructions and operands.

Reviewers: Duncan P. N. Exon Smith

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

llvm-svn: 240295
2015-06-22 17:02:30 +00:00
Pawel Bylica
c3956ce2ba Fix shl folding in DAG combiner.
Summary: The code responsible for shl folding in the DAGCombiner was assuming incorrectly that all constants are less than 64 bits. This patch simply changes the way values are compared.

Test Plan: A regression test included.

Reviewers: andreadb

Reviewed By: andreadb

Subscribers: andreadb, test, llvm-commits

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

llvm-svn: 240291
2015-06-22 15:58:11 +00:00
Rafael Espindola
ec7f530a6c Add a triple to the test to fix it on some hosts.
The slp vectorizer doesn't optimize this case in 32 bits.

Fixes PR23453.

llvm-svn: 240289
2015-06-22 15:44:20 +00:00
Joseph Tremoulet
d0e52901ee [ORC] Add NullResolver
Summary:
This is an implementation of RuntimeDyld::SymbolResolver that simply
rejects all resolution requests; useful for clients that do not have any
cross-object symbol references.

Reviewers: lhames

Reviewed By: lhames

Subscribers: llvm-commits

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

llvm-svn: 240288
2015-06-22 15:27:58 +00:00
Rafael Espindola
c87c2aa297 Support Solaris unused sections' gc link syntax.
It is not clear if this would work or not with LLVM_NO_DEAD_STRIP
binaries, so be conservative for now.

Patch by Xan López.

llvm-svn: 240287
2015-06-22 15:06:17 +00:00
Toma Tabacu
3870d18445 [mips] [IAS] Add support for LAReg with identical source and destination register operands.
Summary: In this case, we're supposed to load the immediate in AT and then ADDu it with the source register and put it in the destination register.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 240278
2015-06-22 13:10:23 +00:00
Elena Demikhovsky
0d6489273b AVX-512: added VPSHUFB instruction - all SKX forms
Added intrinsics and encoding tests.

llvm-svn: 240277
2015-06-22 13:00:42 +00:00
Rafael Espindola
2c6ed3c85c Do not pass optimization flags to Solaris' linker.
It is not supported.

Patch by Xan López.

llvm-svn: 240276
2015-06-22 12:41:52 +00:00
Rafael Espindola
5fb5fa8872 Use right syntax to pass version script to Solaris' ld.
Patch by Xan Lopez!

llvm-svn: 240275
2015-06-22 12:34:54 +00:00
Toma Tabacu
2d14fb4231 [mips] [IAS] Add support for LASym with identical source and destination register operands.
Summary:
In this case, we're supposed to load the address of the symbol in AT and then ADDu it with the source register and
put it in the destination register.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 240273
2015-06-22 12:08:39 +00:00
Elena Demikhovsky
833648a31f AVX-512: All forms of VCOPMRESS VEXPAND instructions,
encoding tests.

llvm-svn: 240272
2015-06-22 11:16:30 +00:00
Alexander Kornienko
25bf7721bc Fixed/added namespace ending comments using clang-tidy. NFC
A few more files that were fixed while preparing r240270.

llvm-svn: 240271
2015-06-22 09:57:54 +00:00
Elena Demikhovsky
07d3690bdf Reverted AVX-512 vector shuffle
llvm-svn: 240258
2015-06-22 09:01:15 +00:00
Michael Kuperstein
dec359bcf7 [X86] Allow more call sequences to use push instructions for argument passing
This allows more call sequences to use pushes instead of movs when optimizing for size.
In particular, calling conventions that pass some parameters in registers (e.g. thiscall) are now supported.

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

llvm-svn: 240257
2015-06-22 08:31:22 +00:00
Elena Demikhovsky
9ebb2c82d0 AVX-512: Added intrinsics for VPERMT2W/D/Q/PS/PD and
VPERMI2W/D/Q/PS/PD instructions.
Added tests.

llvm-svn: 240256
2015-06-22 06:45:48 +00:00
Chandler Carruth
440d4e2329 [PM/AA] Hoist the AliasResult enum out of the AliasAnalysis class.
This will allow classes to implement the AA interface without deriving
from the class or referencing an internal enum of some other class as
their return types.

Also, to a pretty fundamental extent, concepts such as 'NoAlias',
'MayAlias', and 'MustAlias' are first class concepts in LLVM and we
aren't saving anything by scoping them heavily.

My mild preference would have been to use a scoped enum, but that
feature is essentially completely broken AFAICT. I'm extremely
disappointed. For example, we cannot through any reasonable[1] means
construct an enum class (or analog) which has scoped names but converts
to a boolean in order to test for the possibility of aliasing.

[1]: Richard Smith came up with a "solution", but it requires class
templates, and lots of boilerplate setting up the enumeration multiple
times. Something like Boost.PP could potentially bundle this up, but
even that would be quite painful and it doesn't seem realistically worth
it. The enum class solution would probably work without the need for
a bool conversion.

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

llvm-svn: 240255
2015-06-22 02:16:51 +00:00