oota-llvm.git
8 years agoR600: Use EM_AMDGPU for the ELF Machine type
Tom Stellard [Mon, 22 Jun 2015 21:03:52 +0000 (21:03 +0000)]
R600: Use EM_AMDGPU for the ELF Machine type

Reviewers: arsenm, rafael

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240330 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSupport/ELF: Add EM_AMDGPU
Tom Stellard [Mon, 22 Jun 2015 21:03:47 +0000 (21:03 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240329 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Teach load folding to accept scalar _Int users of MOVSS/MOVSD.
Ahmed Bougacha [Mon, 22 Jun 2015 20:51:51 +0000 (20:51 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240326 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Introduce a lexer for machine instructions.
Alex Lorenz [Mon, 22 Jun 2015 20:37:46 +0000 (20:37 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240323 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSafeStack: Create the unsafe stack pointer on demand.
Peter Collingbourne [Mon, 22 Jun 2015 20:26:54 +0000 (20:26 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240321 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove MCSymbol Value in to the union of Offset and CommonSize.
Pete Cooper [Mon, 22 Jun 2015 19:57:33 +0000 (19:57 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240320 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoChange .thumb_set to have the same error checks as .set.
Pete Cooper [Mon, 22 Jun 2015 19:35:57 +0000 (19:35 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240318 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove "const" from the MachineFunction reference in VLIWPacketizerList
Krzysztof Parzyszek [Mon, 22 Jun 2015 18:59:44 +0000 (18:59 +0000)]
Remove "const" from the MachineFunction reference in VLIWPacketizerList

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240317 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodocs: Update allowed values for LLVM_USE_SANITIZER
Justin Bogner [Mon, 22 Jun 2015 18:55:46 +0000 (18:55 +0000)]
docs: Update allowed values for LLVM_USE_SANITIZER

"Thread" and combinations of "Address" and "Undefined" have been
accepted for a while now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240316 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86] set default reciprocal (division and square root) codegen to match GCC
Sanjay Patel [Mon, 22 Jun 2015 18:29:44 +0000 (18:29 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240310 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix MSVC build (again!).
Sanjoy Das [Mon, 22 Jun 2015 18:24:50 +0000 (18:24 +0000)]
Fix MSVC build (again!).

Remove two `typename`s that I should have removed in r240307 but left in
by mistake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240309 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDo not pass -allow-shlib-undefined to the Solaris linker.
Rafael Espindola [Mon, 22 Jun 2015 18:24:01 +0000 (18:24 +0000)]
Do not pass -allow-shlib-undefined to the Solaris linker.

Patch by Xan López.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240308 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix MSVC build.
Sanjoy Das [Mon, 22 Jun 2015 18:20:10 +0000 (18:20 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240307 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove the IsStreamed member variable.
Rafael Espindola [Mon, 22 Jun 2015 18:06:15 +0000 (18:06 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240305 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[FaultMaps] Add a parser for the __llvm__faultmaps section.
Sanjoy Das [Mon, 22 Jun 2015 18:03:02 +0000 (18:03 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240304 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[NFC] Capitalization in documentation.
Sanjoy Das [Mon, 22 Jun 2015 18:02:55 +0000 (18:02 +0000)]
[NFC] Capitalization in documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240303 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoBring r240130 back.
Rafael Espindola [Mon, 22 Jun 2015 17:52:52 +0000 (17:52 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240302 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid a Symbol -> Name -> Symbol conversion.
Rafael Espindola [Mon, 22 Jun 2015 17:46:53 +0000 (17:46 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240300 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Serialize machine instruction names.
Alex Lorenz [Mon, 22 Jun 2015 17:02:30 +0000 (17:02 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240295 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix shl folding in DAG combiner.
Pawel Bylica [Mon, 22 Jun 2015 15:58:11 +0000 (15:58 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240291 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a triple to the test to fix it on some hosts.
Rafael Espindola [Mon, 22 Jun 2015 15:44:20 +0000 (15:44 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240289 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ORC] Add NullResolver
Joseph Tremoulet [Mon, 22 Jun 2015 15:27:58 +0000 (15:27 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240288 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSupport Solaris unused sections' gc link syntax.
Rafael Espindola [Mon, 22 Jun 2015 15:06:17 +0000 (15:06 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240287 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] [IAS] Add support for LAReg with identical source and destination register...
Toma Tabacu [Mon, 22 Jun 2015 13:10:23 +0000 (13:10 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240278 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX-512: added VPSHUFB instruction - all SKX forms
Elena Demikhovsky [Mon, 22 Jun 2015 13:00:42 +0000 (13:00 +0000)]
AVX-512: added VPSHUFB instruction - all SKX forms
Added intrinsics and encoding tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240277 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDo not pass optimization flags to Solaris' linker.
Rafael Espindola [Mon, 22 Jun 2015 12:41:52 +0000 (12:41 +0000)]
Do not pass optimization flags to Solaris' linker.

It is not supported.

Patch by Xan López.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240276 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse right syntax to pass version script to Solaris' ld.
Rafael Espindola [Mon, 22 Jun 2015 12:34:54 +0000 (12:34 +0000)]
Use right syntax to pass version script to Solaris' ld.

Patch by Xan Lopez!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240275 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] [IAS] Add support for LASym with identical source and destination register...
Toma Tabacu [Mon, 22 Jun 2015 12:08:39 +0000 (12:08 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240273 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX-512: All forms of VCOPMRESS VEXPAND instructions,
Elena Demikhovsky [Mon, 22 Jun 2015 11:16:30 +0000 (11:16 +0000)]
AVX-512: All forms of VCOPMRESS VEXPAND instructions,
encoding tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240272 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFixed/added namespace ending comments using clang-tidy. NFC
Alexander Kornienko [Mon, 22 Jun 2015 09:57:54 +0000 (09:57 +0000)]
Fixed/added namespace ending comments using clang-tidy. NFC

A few more files that were fixed while preparing r240270.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240271 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemoving empty directories.
Alexander Kornienko [Mon, 22 Jun 2015 09:34:18 +0000 (09:34 +0000)]
Removing empty directories.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240269 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReverted AVX-512 vector shuffle
Elena Demikhovsky [Mon, 22 Jun 2015 09:01:15 +0000 (09:01 +0000)]
Reverted AVX-512 vector shuffle

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240258 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Allow more call sequences to use push instructions for argument passing
Michael Kuperstein [Mon, 22 Jun 2015 08:31:22 +0000 (08:31 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240257 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX-512: Added intrinsics for VPERMT2W/D/Q/PS/PD and
Elena Demikhovsky [Mon, 22 Jun 2015 06:45:48 +0000 (06:45 +0000)]
AVX-512: Added intrinsics for VPERMT2W/D/Q/PS/PD and
VPERMI2W/D/Q/PS/PD instructions.
Added tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240256 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM/AA] Hoist the AliasResult enum out of the AliasAnalysis class.
Chandler Carruth [Mon, 22 Jun 2015 02:16:51 +0000 (02:16 +0000)]
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240255 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM/AA] Rework the names and comments in AliasSetTracker to more
Chandler Carruth [Mon, 22 Jun 2015 02:12:52 +0000 (02:12 +0000)]
[PM/AA] Rework the names and comments in AliasSetTracker to more
accurately describe what is being tracked.

While these two enums do track mod/ref information and aliasing
information, they don't represent the exact same things as either the
mod/ref enums or the alias result enum in AA. They're definitions are
dominated by the structure of their lattice and the bit's various
semantics. This patch just calls them what they are and tries to spell
out usefully distinct names for these things.

This will clear the path for using a raw unscoped enum to represent some
of these concepts across LLVM's analysis library.

No functionality changed here.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240254 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd the testcase from pr23900.
Rafael Espindola [Mon, 22 Jun 2015 01:29:24 +0000 (01:29 +0000)]
Add the testcase from pr23900.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240253 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Code tidyup - Use SDValue bool operator. NFC.
Simon Pilgrim [Sun, 21 Jun 2015 21:34:32 +0000 (21:34 +0000)]
[X86] Code tidyup - Use SDValue bool operator. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240249 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAsmPrinter: Don't emit empty .debug_loc entries
Duncan P. N. Exon Smith [Sun, 21 Jun 2015 16:54:56 +0000 (16:54 +0000)]
AsmPrinter: Don't emit empty .debug_loc entries

If we don't know how to represent a .debug_loc entry, skip the entry
entirely rather than emitting an empty one.  Similarly, if a .debug_loc
list has no entries, don't create the list.

We still want to create the variables, just in an optimized-out form
that doesn't have a DW_AT_location.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240244 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAsmPrinter: Rewrite initialization of DbgVariable, NFC
Duncan P. N. Exon Smith [Sun, 21 Jun 2015 16:50:43 +0000 (16:50 +0000)]
AsmPrinter: Rewrite initialization of DbgVariable, NFC

There are three types of `DbgVariable`:
  - alloca variables, created based on the MMI table,
  - register variables, created based on DBG_VALUE instructions, and
  - optimized-out variables.

This commit reconfigures `DbgVariable` to make it easier to tell which
kind we have, and make initialization a little clearer.

For MMI/alloca variables, `FrameIndex.size()` must always equal
`Expr.size()`, and there shouldn't be an `MInsn`.  For register
variables (with a `MInsn`), `FrameIndex` must be empty, and `Expr`
should have 0 or 1 element depending on whether it has a complex
expression (registers with multiple locations use `DebugLocListIndex`).
Optimized-out variables shouldn't have any of these fields.

Moreover, this separates DBG_VALUE initialization until after the
variable is created, simplifying logic in a future commit that changes
`collectVariableInfo()` to stop creating empty .debug_loc entries/lists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240243 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added missing stack folding test for CVTSD2SS instruction.
Simon Pilgrim [Sun, 21 Jun 2015 16:07:47 +0000 (16:07 +0000)]
[X86][SSE] Added missing stack folding test for CVTSD2SS instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240241 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoOptTable.h: Prune a couple of \param(s), since Arg has been ArrayRef-ized. [-Wdocumen...
NAKAMURA Takumi [Sun, 21 Jun 2015 13:44:46 +0000 (13:44 +0000)]
OptTable.h: Prune a couple of \param(s), since Arg has been ArrayRef-ized. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240240 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDevirtualize ArgList's dtor now that -Wvirtual-dtor and C++11 allow a better way...
David Blaikie [Sun, 21 Jun 2015 06:51:35 +0000 (06:51 +0000)]
Devirtualize ArgList's dtor now that -Wvirtual-dtor and C++11 allow a better way to describe this situation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240238 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoArrayRef-ify libDriverMain
David Blaikie [Sun, 21 Jun 2015 06:31:56 +0000 (06:31 +0000)]
ArrayRef-ify libDriverMain

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240234 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoArrayRef-ify ParseArgs
David Blaikie [Sun, 21 Jun 2015 06:31:53 +0000 (06:31 +0000)]
ArrayRef-ify ParseArgs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240233 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoObject: Add load configuration structure for 64 bit PE/COFF.
Rui Ueyama [Sun, 21 Jun 2015 01:12:32 +0000 (01:12 +0000)]
Object: Add load configuration structure for 64 bit PE/COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240230 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSwitch lowering: add heuristic for filling leaf nodes in the weight-balanced binary...
Hans Wennborg [Sat, 20 Jun 2015 17:14:07 +0000 (17:14 +0000)]
Switch lowering: add heuristic for filling leaf nodes in the weight-balanced binary search tree

Sparse switches with profile info are lowered as weight-balanced BSTs. For
example, if the node weights are {1,1,1,1,1,1000}, the right-most node would
end up in a tree by itself, bringing it closer to the top.

However, a leaf in this BST can contain up to 3 cases, and having a single
case in a leaf node as in the example means the tree might become
unnecessarily high.

This patch adds a heauristic to the pivot selection algorithm that moves more
cases into leaf nodes unless that would lower their rank. It still doesn't
yield the optimal tree in every case, but I believe it's conservatibely correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240224 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Fix PerformSExtCombine bug that accessed the wrong return value of an...
Simon Pilgrim [Sat, 20 Jun 2015 16:19:24 +0000 (16:19 +0000)]
[X86][SSE] Fix PerformSExtCombine bug that accessed the wrong return value of an aggregate type.

Fix to rL237885 to ensure that it accesses the correct return value of an aggregate type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240223 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PPC] Factor vector removal into a function and remove O(n^2) behavior.
Benjamin Kramer [Sat, 20 Jun 2015 15:59:41 +0000 (15:59 +0000)]
[PPC] Factor vector removal into a function and remove O(n^2) behavior.

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240222 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SwitchLowering] Remove quadratic vector removal.
Benjamin Kramer [Sat, 20 Jun 2015 15:59:34 +0000 (15:59 +0000)]
[SwitchLowering] Remove quadratic vector removal.

This can be triggered with giant switches. No functionality change
intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240221 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE][CostModel] Added full set of sitofp/uitofp costings for SSE2/AVX/AVX2...
Simon Pilgrim [Sat, 20 Jun 2015 14:58:01 +0000 (14:58 +0000)]
[X86][SSE][CostModel] Added full set of sitofp/uitofp costings for SSE2/AVX/AVX2/AVX512F.

Merged separate (but equivalent) SSE2/AVX512F tests.

Removed codegen tests since these are already done better in test/CodeGen/X86.

The actual cost values still need to be updated to match recent codegen improvements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240219 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUpdate ELFObjectWriter::reset() following r238073.
Yaron Keren [Sat, 20 Jun 2015 11:54:32 +0000 (11:54 +0000)]
Update ELFObjectWriter::reset() following r238073.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240218 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRangify for loops in Inliner::runOnSCC(), NFC.
Yaron Keren [Sat, 20 Jun 2015 07:12:33 +0000 (07:12 +0000)]
Rangify for loops in Inliner::runOnSCC(), NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240215 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIndVarSimplify: Avoid UB from binding a reference to a null pointer
Justin Bogner [Sat, 20 Jun 2015 06:24:05 +0000 (06:24 +0000)]
IndVarSimplify: Avoid UB from binding a reference to a null pointer

Calling operator* on a WeakVH whose Value is null hits undefined
behaviour, since we bind the value to a reference. Instead, go through
`operator Value*` so that we work with the pointer itself.

Found by ubsan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240214 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReformat.
NAKAMURA Takumi [Sat, 20 Jun 2015 06:22:04 +0000 (06:22 +0000)]
Reformat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240213 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r240040, "[BranchFolding] Replace custom MachineInstr with MachineInstrExpress...
NAKAMURA Takumi [Sat, 20 Jun 2015 06:21:48 +0000 (06:21 +0000)]
Revert r240040, "[BranchFolding] Replace custom MachineInstr with MachineInstrExpressionTrait"

It caused different emission between stage2 and stage3. Investigating.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240212 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTargetInstrInfo.h: Fix r240192. [-Wdocumentation]
NAKAMURA Takumi [Sat, 20 Jun 2015 03:53:18 +0000 (03:53 +0000)]
TargetInstrInfo.h: Fix r240192. [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240210 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "InstrProf: When reading, copy the data instead of taking a reference. NFC"
Justin Bogner [Sat, 20 Jun 2015 01:37:56 +0000 (01:37 +0000)]
Revert "InstrProf: When reading, copy the data instead of taking a reference. NFC"

Seems like MSVC doesn't like this:

  InstrProf.h(49) : error C2614: 'llvm::InstrProfRecord' : illegal member initialization: 'Hash' is not a base or member

This reverts r240206.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240208 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse correct escaping for semicolon on Windows.
Peter Collingbourne [Sat, 20 Jun 2015 01:28:20 +0000 (01:28 +0000)]
Use correct escaping for semicolon on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240207 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoInstrProf: When reading, copy the data instead of taking a reference. NFC
Justin Bogner [Sat, 20 Jun 2015 01:26:04 +0000 (01:26 +0000)]
InstrProf: When reading, copy the data instead of taking a reference. NFC

This consolidates the logic to read instrprof records into the on disk
hash table's lookup trait and makes us copy the counter data instead
of taking references to it as we read. This will simplify further
changes to the format.

Patch by Betul Buyukkurt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240206 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLibDriver tests require x86 target.
Peter Collingbourne [Sat, 20 Jun 2015 01:14:37 +0000 (01:14 +0000)]
LibDriver tests require x86 target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240205 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLibDriver: implement /libpath and $LIB; ignore /ignore and /machine.
Peter Collingbourne [Sat, 20 Jun 2015 00:57:12 +0000 (00:57 +0000)]
LibDriver: implement /libpath and $LIB; ignore /ignore and /machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240203 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MCJIT] Add a FindGlobalVariableNamed utility
Keno Fischer [Sat, 20 Jun 2015 00:55:58 +0000 (00:55 +0000)]
[MCJIT] Add a FindGlobalVariableNamed utility

Summary: This adds FindGlobalVariableNamed to ExecutionEngine
(plus implementation in MCJIT), which is an analog of
FindFunctionNamed for GlobalVariables.

Reviewers: lhames

Reviewed By: lhames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240202 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLowerSwitch: Avoid some undefined behaviour
Justin Bogner [Sat, 20 Jun 2015 00:28:25 +0000 (00:28 +0000)]
LowerSwitch: Avoid some undefined behaviour

When a case of INT64_MIN was followed by a case that was greater than
zero, we were overflowing a signed integer here. Since we've sorted
the cases here anyway (and thus currentValue must be greater than
nextValue) it's simple enough to avoid this by using addition rather
than subtraction.

Found by UBSAN on existing tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240201 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Statepoint] Remove unnecessary argument from Statepoint::getRelocates
Sanjoy Das [Sat, 20 Jun 2015 00:01:03 +0000 (00:01 +0000)]
[Statepoint] Remove unnecessary argument from Statepoint::getRelocates

NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240198 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Statepoint][NFC] Fix include guard style.
Sanjoy Das [Sat, 20 Jun 2015 00:00:58 +0000 (00:00 +0000)]
[Statepoint][NFC] Fix include guard style.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240197 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert 240130, it caused crashes (repro in PR23900).
Nico Weber [Fri, 19 Jun 2015 23:43:47 +0000 (23:43 +0000)]
Revert 240130, it caused crashes (repro in PR23900).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240193 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoname change: hasPattern() -> getMachineCombinerPatterns() ; NFC
Sanjay Patel [Fri, 19 Jun 2015 23:21:42 +0000 (23:21 +0000)]
name change: hasPattern() -> getMachineCombinerPatterns() ; NFC

This was suggested as part of D10460, but it's independent of
any functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240192 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CallGraph] Given -print-callgraph a stable printing order.
Sanjoy Das [Fri, 19 Jun 2015 23:20:31 +0000 (23:20 +0000)]
[CallGraph] Given -print-callgraph a stable printing order.

Summary:
Since FunctionMap has llvm::Function pointers as keys, the order in
which the traversal happens can differ from run to run, causing spurious
FileCheck failures.  Have CallGraph::print sort the CallGraphNodes by
name before printing them.

Reviewers: bogner, chandlerc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240191 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTry to fix generation of LLVMExports.cmake under Visual Studio.
Dan Liew [Fri, 19 Jun 2015 21:50:27 +0000 (21:50 +0000)]
Try to fix generation of LLVMExports.cmake under Visual Studio.
If LLVMDebugInfoPDB links against the DIA SDK then the exports file
would contain an INTERFACE_LINK_LIBRARIES property that contained an
absolute path to ``diaguids.lib`` which used a native windows path (interpreted
as escape sequences when LLVMExports.cmake is imported causing
``find_package(LLVM)`` to fail) rather than the correct CMake style path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240181 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoImprove error handling of getRelocationAddend.
Rafael Espindola [Fri, 19 Jun 2015 20:58:43 +0000 (20:58 +0000)]
Improve error handling of getRelocationAddend.

This patch changes getRelocationAddend to use ErrorOr and considers it an error
to try to get the addend of a REL section.

If, for example, a x86_64 file has a REL section, that file is corrupted and
we should reject it.

Using ErrorOr is not ideal since we check the section type once per relocation
instead of once per section.

Checking once per section would involve getRelocationAddend just asserting and
callers checking the section before iterating over the relocations.

In any case, this is an improvement and includes a test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240176 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix header path in CMake. NFC.
Pete Cooper [Fri, 19 Jun 2015 20:49:02 +0000 (20:49 +0000)]
Fix header path in CMake.  NFC.

The ADDITIONAL_HEADER_DIRS command can be used to tell UIs that a given library
owns certain headers.  The path for MCParser was missing MC/ in it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240175 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Parser: report an error when a basic block isn't found.
Alex Lorenz [Fri, 19 Jun 2015 20:12:03 +0000 (20:12 +0000)]
MIR Parser: report an error when a basic block isn't found.

This commit reports an error when the MIR parser can't find
a basic block with the machine basic block's name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240174 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopDist] Rename RuntimeCheckEmitter to LoopVersioning, NFC
Adam Nemet [Fri, 19 Jun 2015 19:32:48 +0000 (19:32 +0000)]
[LoopDist] Rename RuntimeCheckEmitter to LoopVersioning, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240165 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopDist] Move pointer-to-partition computation out of RuntimeCheckEmitter, NFC
Adam Nemet [Fri, 19 Jun 2015 19:32:41 +0000 (19:32 +0000)]
[LoopDist] Move pointer-to-partition computation out of RuntimeCheckEmitter, NFC

This starts preparing the class to become a (more) general
LoopVersioning utility class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240164 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDelete dead code. NFC.
Rafael Espindola [Fri, 19 Jun 2015 19:07:59 +0000 (19:07 +0000)]
Delete dead code. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240160 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix filename in comment
Matt Arsenault [Fri, 19 Jun 2015 17:56:51 +0000 (17:56 +0000)]
AMDGPU: Fix filename in comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240151 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake getRelocationSection MachO only.
Rafael Espindola [Fri, 19 Jun 2015 17:54:28 +0000 (17:54 +0000)]
Make getRelocationSection MachO only.

There are 3 types of relocations on MachO
* Scattered
* Section based
* Symbol based

On ELF and COFF relocations are symbol based.

We were in the strange situation that we abstracted over two of them. This makes
section based relocations MachO only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240149 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Serialize the list of machine basic blocks with simple attributes.
Alex Lorenz [Fri, 19 Jun 2015 17:43:07 +0000 (17:43 +0000)]
MIR Serialization: Serialize the list of machine basic blocks with simple attributes.

This commit implements the initial serialization of machine basic blocks in a
machine function. Only the simple, scalar MBB attributes are serialized. The
reference to LLVM IR's basic block is preserved when that basic block has a name.

Reviewers: Duncan P. N. Exon Smith

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240145 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SLP] Vectorize for all-constant entries.
Michael Zolotukhin [Fri, 19 Jun 2015 17:40:15 +0000 (17:40 +0000)]
[SLP] Vectorize for all-constant entries.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240144 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix some places missed in rename
Matt Arsenault [Fri, 19 Jun 2015 17:39:03 +0000 (17:39 +0000)]
AMDGPU: Fix some places missed in rename

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240143 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: use default member initializers to initialize yaml::MachineFunctio...
Alex Lorenz [Fri, 19 Jun 2015 17:36:02 +0000 (17:36 +0000)]
MIR Serialization: use default member initializers to initialize yaml::MachineFunction. NFC.

Default member initializers are permitted since r236244.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240142 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTypo. NFC.
Chad Rosier [Fri, 19 Jun 2015 17:32:57 +0000 (17:32 +0000)]
Typo. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240141 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid warning about inability to cast from ptr-to-obj to ptr-to-fun.
Douglas Katzman [Fri, 19 Jun 2015 17:21:02 +0000 (17:21 +0000)]
Avoid warning about inability to cast from ptr-to-obj to ptr-to-fun.

Use POSIX.1-2003 Technical Corrigendum 1 suggested workaround.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240140 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFixed/added namespace ending comments using clang-tidy. NFC
Alexander Kornienko [Fri, 19 Jun 2015 15:57:42 +0000 (15:57 +0000)]
Fixed/added namespace ending comments using clang-tidy. NFC

The patch is generated using this command:

tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
  -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
  llvm/lib/

Thanks to Eugene Kosov for the original patch!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240137 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix the build.
Rafael Espindola [Fri, 19 Jun 2015 14:34:12 +0000 (14:34 +0000)]
Fix the build.

Sorry, I have no idea how grep failed to find this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240133 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReplace EM_486 with EM_IAMCU.
Rafael Espindola [Fri, 19 Jun 2015 14:22:16 +0000 (14:22 +0000)]
Replace EM_486 with EM_IAMCU.

This matches the current
http://www.sco.com/developers/gabi/latest/ch4.eheader.html#machine

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240132 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ASan] Initial support for Kernel AddressSanitizer
Alexander Potapenko [Fri, 19 Jun 2015 12:19:07 +0000 (12:19 +0000)]
[ASan] Initial support for Kernel AddressSanitizer

This patch adds initial support for the -fsanitize=kernel-address flag to Clang.
Right now it's quite restricted: only out-of-line instrumentation is supported, globals are not instrumented, some GCC kasan flags are not supported.
Using this patch I am able to build and boot the KASan tree with LLVMLinux patches from github.com/ramosian-glider/kasan/tree/kasan_llvmlinux.
To disable KASan instrumentation for a certain function attribute((no_sanitize("kernel-address"))) can be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240131 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMake all temporary symbols unnamed.
Rafael Espindola [Fri, 19 Jun 2015 12:16:55 +0000 (12:16 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240130 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIRBuilder: Add unit tests for construction of globals with address space
Tobias Grosser [Fri, 19 Jun 2015 07:19:17 +0000 (07:19 +0000)]
IRBuilder: Add unit tests for construction of globals with address space

This was forgotten in r240113. Thanks Eric for paying attention.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240124 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCMake: Stop using LLVM's custom parse_arguments (delete implementation). NFC
Filipe Cabecinhas [Fri, 19 Jun 2015 03:45:42 +0000 (03:45 +0000)]
CMake: Stop using LLVM's custom parse_arguments (delete implementation). NFC

Summary:
Finally, delete LLVM's parse_arguments() definition.
Second part of D10531.

This is dependent on http://reviews.llvm.org/D10529

Reviewers: pcc, beanz, chapuni

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240122 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCMake: Stop using LLVM's custom parse_arguments. NFC
Filipe Cabecinhas [Fri, 19 Jun 2015 03:45:40 +0000 (03:45 +0000)]
CMake: Stop using LLVM's custom parse_arguments. NFC

Summary:
Use CMake's cmake_parse_arguments() instead.
It's called in a slightly different way, but supports all our use cases.
It's in CMake 2.8.8, which is our minimum supported version.

CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc):
http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments

Reviewers: pcc, beanz, chapuni

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240121 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Look through concat when lowering in-place shuffles (VZIP, ..)
Ahmed Bougacha [Fri, 19 Jun 2015 02:32:35 +0000 (02:32 +0000)]
[ARM] Look through concat when lowering in-place shuffles (VZIP, ..)

Currently, we canonicalize shuffles that produce a result larger than
their operands with:
  shuffle(concat(v1, undef), concat(v2, undef))
->
  shuffle(concat(v1, v2), undef)

because we can access quad vectors (see PerformVECTOR_SHUFFLECombine).

This is useful in the general case, but there are special cases where
native shuffles produce larger results: the two-result ops.

We can look through the concat when lowering them:
  shuffle(concat(v1, v2), undef)
->
  concat(VZIP(v1, v2):0, :1)

This lets us generate the native shuffles instead of scalarizing to
dozens of VMOVs.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240118 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Factor out two-result shuffle matching. NFCI.
Ahmed Bougacha [Fri, 19 Jun 2015 02:25:01 +0000 (02:25 +0000)]
[ARM] Factor out two-result shuffle matching.  NFCI.

In preparation for a future patch: makes it easier to do the same
matching to generate different nodes, without duplication.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240116 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Add D-sized vtrn/vuzp/vzip tests, and cleanup. NFC.
Ahmed Bougacha [Fri, 19 Jun 2015 02:15:34 +0000 (02:15 +0000)]
[ARM] Add D-sized vtrn/vuzp/vzip tests, and cleanup.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240114 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIRBuilder: Allow globals to be constructed in a specific address space
Tobias Grosser [Fri, 19 Jun 2015 02:12:07 +0000 (02:12 +0000)]
IRBuilder: Allow globals to be constructed in a specific address space

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240113 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix "the the" in comments.
Eric Christopher [Fri, 19 Jun 2015 01:53:21 +0000 (01:53 +0000)]
Fix "the the" in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240112 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMIR Serialization: Reenable one of the MIRParser tests by reverting r239805.
Alex Lorenz [Thu, 18 Jun 2015 22:46:27 +0000 (22:46 +0000)]
MIR Serialization: Reenable one of the MIRParser tests by reverting r239805.

The test 'llvm/test/CodeGen/MIR/machine-function.mir' was disabled on
x86 msc18 in r239805 as it failed. My commit r240054 have fixed the
problem, so this commit reverts the commit that disabled the test as
it should pass now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240074 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoImprove the --expand-relocs handling of MachO.
Rafael Espindola [Thu, 18 Jun 2015 22:38:20 +0000 (22:38 +0000)]
Improve the --expand-relocs handling of MachO.

In a relocation target can take 3 basic forms

* A r_value in scattered relocations.
* A symbol in external relocations.
* A section is non-external relocations.

Have the dump reflect that. With this change we go from

CHECK-NEXT:       Extern: 0
CHECK-NEXT:       Type: X86_64_RELOC_SUBTRACTOR (5)
CHECK-NEXT:       Symbol: 0x2
CHECK-NEXT:       Scattered: 0

To just

// CHECK-NEXT:       Type: X86_64_RELOC_SUBTRACTOR (5)
// CHECK-NEXT:       Section: __data (2)

Since the relocation is with a section, we print the seciton name and don't
need to say that it is not scattered or external.

Someone motivated can add further special cases for things like
ARM64_RELOC_ADDEND and ARM_RELOC_PAIR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240073 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid redundant select node in early if-conversion pass
Yi Jiang [Thu, 18 Jun 2015 22:34:09 +0000 (22:34 +0000)]
Avoid redundant select node in early if-conversion pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240072 91177308-0d34-0410-b5e6-96231b3b80d8