oota-llvm.git
8 years ago[ptr-traits] Sink several in-body method definitions to be out-of-line
Chandler Carruth [Tue, 29 Dec 2015 09:24:42 +0000 (09:24 +0000)]
[ptr-traits] Sink several in-body method definitions to be out-of-line
inline definitions after the mutually recursive pair of types have been
defined. The two types mutually recurse specifically through
abstractions that require pointer traits which makes this kind of mutual
recursion especially tricky to get right in terms of ordering.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Sink a constructor definition to the .cpp file and add
Chandler Carruth [Tue, 29 Dec 2015 09:24:39 +0000 (09:24 +0000)]
[ptr-traits] Sink a constructor definition to the .cpp file and add
missing includes so that the pointee types for DenseMap pointer keys and
such are complete prior to us querying the pointer traits for them.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Add a bunch of includes to provide complete types that are
Chandler Carruth [Tue, 29 Dec 2015 09:06:21 +0000 (09:06 +0000)]
[ptr-traits] Add a bunch of includes to provide complete types that are
used in pointer dense map key types or in other ways that require
pointer traits.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

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

8 years ago[ptr-traits] Split the MCFragment type hierarchy out of the MCAssembler
Chandler Carruth [Tue, 29 Dec 2015 09:06:16 +0000 (09:06 +0000)]
[ptr-traits] Split the MCFragment type hierarchy out of the MCAssembler
header to its own header, allowing users of fragments to have a narrower
header file, and avoid circular header dependencies when getting the
definition of MCSection prior to inspecting traits on MCSection
pointers.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

Note that this doesn't in any way change the design of MC, it is just
moving code around to allow the *header files* to be more fine grained.
Without this, it is impossible to get a complete type for MCSection
where it is needed.

If anyone would prefer a different slicing of the header files, I'm
happy to oblige of course. =]

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

8 years ago[MC] Fix the comment header for this header file. It was just
Chandler Carruth [Tue, 29 Dec 2015 09:06:10 +0000 (09:06 +0000)]
[MC] Fix the comment header for this header file. It was just
copy/pasted.

Happy for anyone to suggest a more precise or refined set of boilerplate
here, but the comments on the actual code seem descriptive and accurate.

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

8 years agoDe-virtualize mnemonicIsValid and remove from the base class. It's not called by...
Craig Topper [Tue, 29 Dec 2015 07:43:03 +0000 (07:43 +0000)]
De-virtualize mnemonicIsValid and remove from the base class. It's not called by any common code.

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

8 years ago[TableGen] Remove MnemonicContainsDot from AsmParser. It isn't used. NFC
Craig Topper [Tue, 29 Dec 2015 07:03:30 +0000 (07:03 +0000)]
[TableGen] Remove MnemonicContainsDot from AsmParser. It isn't used. NFC

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

8 years ago[X86] Remove declaration of ATTAsmParser. Its equivalent to the DefaultAsmParser...
Craig Topper [Tue, 29 Dec 2015 07:03:27 +0000 (07:03 +0000)]
[X86] Remove declaration of ATTAsmParser. Its equivalent to the DefaultAsmParser. NFC

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

8 years ago[TableGen] Add missing space to output.
Craig Topper [Tue, 29 Dec 2015 07:03:25 +0000 (07:03 +0000)]
[TableGen] Add missing space to output.

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

8 years ago[TableGen] Use range-based for loops. NFC
Craig Topper [Tue, 29 Dec 2015 07:03:23 +0000 (07:03 +0000)]
[TableGen] Use range-based for loops. NFC

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

8 years ago[TrailingObjects] Dynamically realign under-aligned trailing objects.
James Y Knight [Tue, 29 Dec 2015 04:00:43 +0000 (04:00 +0000)]
[TrailingObjects] Dynamically realign under-aligned trailing objects.

Previously, the code enforced non-decreasing alignment of each trailing
type. However, it's easy enough to allow for realignment as needed, and
thus avoid the developer having to think about the possiblilities for
alignment requirements on all architectures.

(E.g. on Linux/x86, a struct with an int64 member is 4-byte aligned,
while on other 32-bit archs -- and even with other OSes on x86 -- it has
8-byte alignment. This sort of thing is irritating to have to manually
deal with.)

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

8 years agoFix gold test after r256465.
James Y Knight [Tue, 29 Dec 2015 03:48:37 +0000 (03:48 +0000)]
Fix gold test after r256465.

That commit added a new pass, and this test is sensitive to what the
first pass after verify is called.

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

8 years ago[ptr-traits] Merge the MetadataTracking helpers into the Metadata
Chandler Carruth [Tue, 29 Dec 2015 02:14:50 +0000 (02:14 +0000)]
[ptr-traits] Merge the MetadataTracking helpers into the Metadata
header.

This is part of a series of patches to allow LLVM to check for complete
pointee types when computing its pointer traits. This is absolutely
necessary to get correct (or reproducible) results for things like how
many low bits are guaranteed to be zero.

The MetadataTracking helpers aren't actually independent. They rely on
constructing a PointerUnion between Metadata and MetadataAsValue
pointers, which requires know the alignment of pointers to those types
which requires them to be complete.

The .cpp file even defined a method declared in Metadata.h! These really
don't seem like something that is separable, and there is no real
layering problem with just placing them together.

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

8 years ago[ADT] Run clang-format over another file before I try to enhance it so
Chandler Carruth [Tue, 29 Dec 2015 02:14:45 +0000 (02:14 +0000)]
[ADT] Run clang-format over another file before I try to enhance it so
I don't commit the bug in r256518 again.

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

8 years ago[ADT] Use a nonce type with at least 4 byte alignment.
Chandler Carruth [Tue, 29 Dec 2015 00:03:24 +0000 (00:03 +0000)]
[ADT] Use a nonce type with at least 4 byte alignment.

We didn't actually statically check this, and so it worked 25% of the
time for me. =/ Really sorry it took so long to fix, I shouldn't leave
the commit log editor window open without saving and landing the commit.
=[

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

8 years agoAccept dwarf version 5 for CIE versions.
Eric Christopher [Mon, 28 Dec 2015 23:02:42 +0000 (23:02 +0000)]
Accept dwarf version 5 for CIE versions.

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

8 years ago[Thumb] Fix assembler error 'cannot honor width suffix pop {lr}'
Artyom Skrobov [Mon, 28 Dec 2015 21:40:45 +0000 (21:40 +0000)]
[Thumb] Fix assembler error 'cannot honor width suffix pop {lr}'

Summary:
* avoid generating POP {LR} in Thumb1 epilogues
* combine MOV LR, Rx + BX LR -> BX Rx in a peephole optimization pass
* combine POP {LR} + B + BX LR -> POP {PC} on v5T+

Test cases by Ana Pazos

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

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

8 years ago[x86] lower calls to fmin and llvm.minnum.* using minss/minsd/minps/minpd (PR24475)
Sanjay Patel [Mon, 28 Dec 2015 21:16:55 +0000 (21:16 +0000)]
[x86] lower calls to fmin and llvm.minnum.* using minss/minsd/minps/minpd (PR24475)

This is a follow-on to:
http://reviews.llvm.org/rL255700
http://reviews.llvm.org/rL256454
http://reviews.llvm.org/rL256510

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

8 years agoRefactor inline costs analysis by removing the InlineCostAnalysis class
Easwaran Raman [Mon, 28 Dec 2015 20:28:19 +0000 (20:28 +0000)]
Refactor inline costs analysis by removing the InlineCostAnalysis class

InlineCostAnalysis is an analysis pass without any need for it to be one.
Once it stops being an analysis pass, it doesn't maintain any useful state
and the member functions inside can be made free functions. NFC.

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

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

8 years ago[RS4GC] Fix rematerialization of bitcast of bitcast.
Manuel Jacob [Mon, 28 Dec 2015 20:14:05 +0000 (20:14 +0000)]
[RS4GC] Fix rematerialization of bitcast of bitcast.

Summary:
Previously, only the outer (last) bitcast was rematerialized, resulting in a
use of the unrelocated inner (first) bitcast after the statepoint.  See the
test case for an example.

Reviewers: igor-laevsky, reames

Subscribers: reames, alex, llvm-commits, sanjoy

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

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

8 years agoImplemented cost model for masked gather and scatter operations
Elena Demikhovsky [Mon, 28 Dec 2015 20:10:59 +0000 (20:10 +0000)]
Implemented cost model for masked gather and scatter operations
The cost is calculated for all X86 targets. When gather/scatter instruction
is not supported we calculate the cost of scalar sequence.

Differential revision: http://reviews.llvm.org/D15677

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

8 years ago[ADT] Don't use a fixture just to get a nonce type for this unittest.
Chandler Carruth [Mon, 28 Dec 2015 20:03:16 +0000 (20:03 +0000)]
[ADT] Don't use a fixture just to get a nonce type for this unittest.

Instead, actually produce a nonce type in the test and use that. This
makes the test, IMO, both simpler and more clear.

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

8 years agoAs a prelude to the rest of DWARF5 being supported go ahead and accept
Eric Christopher [Mon, 28 Dec 2015 19:58:36 +0000 (19:58 +0000)]
As a prelude to the rest of DWARF5 being supported go ahead and accept
version 5 in llvm-dwarfdump.

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

8 years ago[ADT] Run clang-format over more code, fixing numerous formatting
Chandler Carruth [Mon, 28 Dec 2015 19:54:36 +0000 (19:54 +0000)]
[ADT] Run clang-format over more code, fixing numerous formatting
oddities.

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

8 years ago[ADT] Run clang-format over PointerUnion.h and clean up its comments.
Chandler Carruth [Mon, 28 Dec 2015 19:52:46 +0000 (19:52 +0000)]
[ADT] Run clang-format over PointerUnion.h and clean up its comments.
NFC.

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

8 years ago[vim] Add token type to Vim syntax file.
Manuel Jacob [Mon, 28 Dec 2015 19:51:04 +0000 (19:51 +0000)]
[vim] Add token type to Vim syntax file.

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

8 years ago[x86] lower calls to fmax and llvm.maxnum.* using maxps/maxpd (PR24475)
Sanjay Patel [Mon, 28 Dec 2015 19:20:19 +0000 (19:20 +0000)]
[x86] lower calls to fmax and llvm.maxnum.* using maxps/maxpd (PR24475)

This is a follow-on to:
http://reviews.llvm.org/rL255700
http://reviews.llvm.org/rL256454

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

8 years agoSpecify triple so 'make check' passes on darwin x86-64
Sanjay Patel [Mon, 28 Dec 2015 18:28:44 +0000 (18:28 +0000)]
Specify triple so 'make check' passes on darwin x86-64

The check lines were added with:
http://reviews.llvm.org/rL256458
http://reviews.llvm.org/rL256460

but on a darwin target, the output looks like:
  ## InlineAsm Start
  rorq  %rdi
  ## InlineAsm End
  ## InlineAsm Start
  rorq  %rsi
  ## InlineAsm End
  leaq  (%rsi,%rdi), %rax
  retq

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

8 years agotidy up; NFC
Sanjay Patel [Mon, 28 Dec 2015 18:18:22 +0000 (18:18 +0000)]
tidy up; NFC

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

8 years agoSupport clrex instruction on ARMv6k. Patch by Andrew Turner.
Roman Divacky [Mon, 28 Dec 2015 17:47:23 +0000 (17:47 +0000)]
Support clrex instruction on ARMv6k. Patch by Andrew Turner.

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/Transforms/ObjCARC
Alexander Kornienko [Mon, 28 Dec 2015 16:19:08 +0000 (16:19 +0000)]
Refactor: Simplify boolean conditional return statements in lib/Transforms/ObjCARC

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: craig.topper, bkramer, chandlerc, gottesmm

Subscribers: llvm-commits

Patch by Richard Thomson!

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

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

8 years agoRefactor: Simplify boolean conditional return statements in llvm/lib/Support
Alexander Kornienko [Mon, 28 Dec 2015 15:46:15 +0000 (15:46 +0000)]
Refactor: Simplify boolean conditional return statements in llvm/lib/Support

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: rafael, bkramer, ddunbar, Bigcheese, chandlerc, chapuni, nicholas, alexfh

Subscribers: alexfh, craig.topper, llvm-commits

Patch by Richard Thomson!

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

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

8 years ago[X86] Better support for the MCU psABI (LLVM part)
Michael Kuperstein [Mon, 28 Dec 2015 14:39:21 +0000 (14:39 +0000)]
[X86] Better support for the MCU psABI (LLVM part)

This adds support for the MCU psABI in a way different from r251223 and r251224,
basically reverting most of these two patches. The problem with the approach
taken in r251223/4 is that it only handled libcalls that originated from the backend.
However, the mid-end also inserts quite a few libcalls and assumes these use the
platform's default calling convention.

The previous patch tried to insert inregs when necessary both in the FE and,
somewhat hackily, in the CG. Instead, we now define a new default calling convention
for the MCU, which doesn't use inreg marking at all, similarly to what x86-64 does.

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

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

8 years agoRefactor: Simplify boolean conditional return statements in lib/Target/PowerPC
Alexander Kornienko [Mon, 28 Dec 2015 13:38:42 +0000 (13:38 +0000)]
Refactor: Simplify boolean conditional return statements in lib/Target/PowerPC

Summary: Use clang-tidy to simplify boolean conditional return statements

Reviewers: uweigand, rafael, wschmidt

Subscribers: craig.topper, llvm-commits

Patch by Richard Thomson!

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

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

8 years ago[X86][AVX512] Lower broadcast sub vector to vector inrtrinsics
Asaf Badouh [Mon, 28 Dec 2015 08:26:26 +0000 (08:26 +0000)]
[X86][AVX512] Lower broadcast sub vector to vector inrtrinsics
lower broadcast<type>x<vector> to shuffles.
 there are two cases:
1.src is 128 bits and dest is 512 bits: in this case we will lower it to shuffle with imm = 0.
2.src is 256 bit and dest is 512 bits: in this case we will lower it to shuffle with imm = 01000100b (0x44) that way we will broadcast the 256bit source: ymm[0,1,2,3] => zmm[0,1,2,3,0,1,2,3] then it will mask it with the passthru value (in case it's mask op).

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

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

8 years ago[X86][AVX512] add fp scalar broadcast intrinsics
Asaf Badouh [Mon, 28 Dec 2015 08:09:25 +0000 (08:09 +0000)]
[X86][AVX512] add fp scalar broadcast intrinsics

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

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

8 years ago[AVX512] Remove VEX_LIG from vmovd/vmovq instructions. From what I can tell from...
Craig Topper [Mon, 28 Dec 2015 06:32:47 +0000 (06:32 +0000)]
[AVX512] Remove VEX_LIG from vmovd/vmovq instructions. From what I can tell from the Intel docs these instructions require the L-bit to be 0.

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

8 years ago[AVX512] Fix some places that used FR64 instead of FR64X.
Craig Topper [Mon, 28 Dec 2015 06:11:45 +0000 (06:11 +0000)]
[AVX512] Fix some places that used FR64 instead of FR64X.

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

8 years ago[AVX512] Bring vmovq instructions names into alignment with the AVX and SSE names...
Craig Topper [Mon, 28 Dec 2015 06:11:42 +0000 (06:11 +0000)]
[AVX512] Bring vmovq instructions names into alignment with the AVX and SSE names. Add a missing encoding to disassembler and assembler.

I believe this also fixes a case where a 64-bit memory form that is documented as being unsupported in 32-bit mode was able to be selected there.

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

8 years ago[X86] Move address for store target from outs to ins on a couple instructions.
Craig Topper [Mon, 28 Dec 2015 06:11:39 +0000 (06:11 +0000)]
[X86] Move address for store target from outs to ins on a couple instructions.

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

8 years ago[X86] Add proper Uses/Defs/mayLoad flags for AAA/AAD/AAM/AAS/DAA/DAS/XLAT instructions.
Craig Topper [Mon, 28 Dec 2015 06:11:37 +0000 (06:11 +0000)]
[X86] Add proper Uses/Defs/mayLoad flags for AAA/AAD/AAM/AAS/DAA/DAS/XLAT instructions.

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

8 years ago[lcg] Fix a few more formatting goofs found by clang-format. NFC.
Chandler Carruth [Mon, 28 Dec 2015 01:54:20 +0000 (01:54 +0000)]
[lcg] Fix a few more formatting goofs found by clang-format. NFC.

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

8 years ago[lcg] Fix formatting errors found with clang-format, remove the now
Chandler Carruth [Mon, 28 Dec 2015 01:54:18 +0000 (01:54 +0000)]
[lcg] Fix formatting errors found with clang-format, remove the now
optional '\brief' tag and reflow some comments based on the added
horizontal space. NFC.

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

8 years ago[AVX512] Remove separate instruction and patterns for lowering ctlz_zero_undef. Chang...
Craig Topper [Sun, 27 Dec 2015 21:33:50 +0000 (21:33 +0000)]
[AVX512] Remove separate instruction and patterns for lowering ctlz_zero_undef. Change the operation for CTLZ_ZERO_UNDEF to Expand so SelectionDAG will convert them to CTLZ before lowering.

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

8 years ago[SelectionDAG] Teach LegalizeVectorOps to not unroll CTLZ_ZERO_UNDEF and CTTZ_ZERO_UN...
Craig Topper [Sun, 27 Dec 2015 21:33:47 +0000 (21:33 +0000)]
[SelectionDAG] Teach LegalizeVectorOps to not unroll CTLZ_ZERO_UNDEF and CTTZ_ZERO_UNDEF if the non-ZERO_UNDEF form is legal or custom. Will be used to simplify X86 code in a follow on commit.

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

8 years ago[AVX512] Remove alternate data type versions of VALIGND, VALIGNQ, VMOVSHDUP and VMOVS...
Craig Topper [Sun, 27 Dec 2015 19:45:21 +0000 (19:45 +0000)]
[AVX512] Remove alternate data type versions of VALIGND, VALIGNQ, VMOVSHDUP and VMOVSLDUP. They don't have any tests and I don't think they can be selected. If they are truly needed they should be implemented with patterns against the normal instructions and not separate instructions.

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

8 years ago[lit] Implement support of per test timeout in lit.
Dan Liew [Sun, 27 Dec 2015 14:03:49 +0000 (14:03 +0000)]
[lit] Implement support of per test timeout in lit.

This should work with ShTest (executed externally or internally) and GTest
test formats.

To set the timeout a new option ``--timeout=`` has
been added which specifies the maximum run time of an individual test
in seconds. By default this 0 which causes no timeout to be enforced.

The timeout can also be set from a lit configuration file by modifying
the ``lit_config.maxIndividualTestTime`` property.

To implement a timeout we now require the psutil Python module if a
 timeout is requested. This dependency is confined to the newly added
 ``lit.util.killProcessAndChildren()``. A note has been added into the
 TODO document describing how we can remove the dependency on the
 ``pustil`` module in the future. It would be nice to remove this
 immediately but that is a lot more work and Daniel Dunbar believes it is
better that we get a working implementation first and then improve it.

To avoid breaking the existing behaviour the psutil module will not be
imported if no timeout is requested.

The included testcases are derived from test cases provided by
 Jonathan Roelofs which were in an previous attempt to add a per test
 timeout to lit (http://reviews.llvm.org/D6584). Thanks Jonathan!

Reviewers: ddunbar, jroelofs, cmatthews, MatzeB

Subscribers: cmatthews, llvm-commits

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

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

8 years agoAVX512: Change VPMOVB2M DAG lowering , use CVT2MASK node instead TRUNCATE.
Igor Breger [Sun, 27 Dec 2015 13:56:16 +0000 (13:56 +0000)]
AVX512: Change VPMOVB2M DAG lowering , use CVT2MASK node instead TRUNCATE.
Fix TRUNCATE lowering vector to vector i1, use LSB and not MSB.
Implement VPMOVB/W/D/Q2M intrinsic.

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

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

8 years ago[X86][AVX512] change broadcast to use maskable pattern
Asaf Badouh [Sun, 27 Dec 2015 12:14:34 +0000 (12:14 +0000)]
[X86][AVX512] change broadcast to use maskable pattern

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

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

8 years ago[attrs] Extract the pure inference of function attributes into
Chandler Carruth [Sun, 27 Dec 2015 08:41:34 +0000 (08:41 +0000)]
[attrs] Extract the pure inference of function attributes into
a standalone pass.

There is no call graph or even interesting analysis for this part of
function attributes -- it is literally inferring attributes based on the
target library identification. As such, we can do it using a much
simpler module pass that just walks the declarations. This can also
happen much earlier in the pass pipeline which has benefits for any
number of other passes.

In the process, I've cleaned up one particular aspect of the logic which
was necessary in order to separate the two passes cleanly. It now counts
inferred attributes independently rather than just counting all the
inferred attributes as one, and the counts are more clearly explained.

The two test cases we had for this code path are both ... woefully
inadequate and copies of each other. I've kept the superset test and
updated it. We need more testing here, but I had to pick somewhere to
stop fixing everything broken I saw here.

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

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

8 years ago[attrs] Split off the forced attributes utility into its own pass that
Chandler Carruth [Sun, 27 Dec 2015 08:13:45 +0000 (08:13 +0000)]
[attrs] Split off the forced attributes utility into its own pass that
is (by default) run much earlier than FuncitonAttrs proper.

This allows forcing optnone or other widely impactful attributes. It is
also a bit simpler as the force attribute behavior needs no specific
iteration order.

I've added the pass into the default module pass pipeline and LTO pass
pipeline which mirrors where function attrs itself was being run.

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

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

8 years ago[AVX-512] Remove alernate integer forms for VPERMILPS and VPERMILPD. There no tests...
Craig Topper [Sun, 27 Dec 2015 06:55:08 +0000 (06:55 +0000)]
[AVX-512] Remove alernate integer forms for VPERMILPS and VPERMILPD. There no tests for them and I don't see any way to select them anyway. If they are really needed they should be implemented as patterns and not full fledged instructions.

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

8 years agoMake the test properly constrained
David Majnemer [Sun, 27 Dec 2015 06:26:41 +0000 (06:26 +0000)]
Make the test properly constrained

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

8 years agoInstrProfTest.cpp: Don't assume string literals are always merged.
NAKAMURA Takumi [Sun, 27 Dec 2015 06:18:57 +0000 (06:18 +0000)]
InstrProfTest.cpp: Don't assume string literals are always merged.

MSC18 Debug didn't merge them.

FIXME: I tweaked just to appease a builder. Almost string literals should be addressed identically there.

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

8 years agoTry to passify buildbot
David Majnemer [Sun, 27 Dec 2015 06:18:48 +0000 (06:18 +0000)]
Try to passify buildbot

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

8 years agoPrune the feature "tls". No one is using it since TLS is enabled for Cygwin.
NAKAMURA Takumi [Sun, 27 Dec 2015 06:14:33 +0000 (06:14 +0000)]
Prune the feature "tls". No one is using it since TLS is enabled for Cygwin.

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

8 years ago[X86, Win64] Use a frame pointer if pushf is emitted
David Majnemer [Sun, 27 Dec 2015 06:07:26 +0000 (06:07 +0000)]
[X86, Win64] Use a frame pointer if pushf is emitted

A frame pointer must be used if stack pointer is modified after the
prologue.  LLVM will emit pushf/popf if we need to save/restore the
FLAGS register, requiring us to have a frame pointer for the function.

There is a small twist: this sequence might exist in user code via
inline-assembly.  For now, conservatively assume that such functions
require a frame pointer.  For real world justification, please see
clang's implementation of __readeflags.

This fixes PR25945.

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

8 years ago[WinEH] Add comments explaining the EH tables
David Majnemer [Sun, 27 Dec 2015 06:07:12 +0000 (06:07 +0000)]
[WinEH] Add comments explaining the EH tables

This is aids in debugging WinEH, similar functionality is present for
DWARF EH.

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

8 years ago[x86] lower calls to llvm.maxnum.v4f32 using maxps
Sanjay Patel [Sat, 26 Dec 2015 21:44:55 +0000 (21:44 +0000)]
[x86] lower calls to llvm.maxnum.v4f32 using maxps

This is a follow-on to:
http://reviews.llvm.org/rL255700

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

8 years ago[X86] Fix an unused variable warning in released builds.
Craig Topper [Sat, 26 Dec 2015 20:13:33 +0000 (20:13 +0000)]
[X86] Fix an unused variable warning in released builds.

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

8 years ago[X86] Add support for printing shuffle comments for AVX512 PSHUFB instructions.
Craig Topper [Sat, 26 Dec 2015 19:48:43 +0000 (19:48 +0000)]
[X86] Add support for printing shuffle comments for AVX512 PSHUFB instructions.

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

8 years ago[X86] Fold some variable declarations and initializations into if statements. NFC
Craig Topper [Sat, 26 Dec 2015 19:48:37 +0000 (19:48 +0000)]
[X86] Fold some variable declarations and initializations into if statements. NFC

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

8 years agoFix safepoint intrinsic signatures in test.
Benjamin Kramer [Sat, 26 Dec 2015 11:40:48 +0000 (11:40 +0000)]
Fix safepoint intrinsic signatures in test.

Should bring back the bots after r256443.

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

8 years ago[gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead...
Chen Li [Sat, 26 Dec 2015 07:54:32 +0000 (07:54 +0000)]
[gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead of i32 type

Summary: This patch changes gc.statepoint intrinsic's return type to token type instead of i32 type. Using token types could prevent LLVM to merge different gc.statepoint nodes into PHI nodes and cause further problems with gc relocations. The patch also changes the way on how gc.relocate and gc.result look for their corresponding gc.statepoint on unwind path. The current implementation uses the selector value extracted from a { i8*, i32 } landingpad as a hook to find the gc.statepoint, while the patch directly uses a token type landingpad (http://reviews.llvm.org/D15405) to find the gc.statepoint.

Reviewers: sanjoy, JosephTremoulet, pgavlin, igor-laevsky, mjacob

Subscribers: reames, mjacob, sanjoy, llvm-commits

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

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

8 years agoAdd test case for r256433. "[X86] Fix shuffle decoding for variable VPERMIL to be...
Craig Topper [Sat, 26 Dec 2015 04:58:05 +0000 (04:58 +0000)]
Add test case for r256433. "[X86] Fix shuffle decoding for variable VPERMIL to be tolerant of the Constant type not matching due to folding in the constant pool and to get VPERMILPD correct."

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

8 years agoRevert r256432 "Test"
Craig Topper [Sat, 26 Dec 2015 04:56:51 +0000 (04:56 +0000)]
Revert r256432 "Test"

This is the test case for r256433, but it got committed incorrectly in my local repo.

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

8 years ago[X86] Fix shuffle decoding for variable VPERMIL to be tolerant of the Constant type...
Craig Topper [Sat, 26 Dec 2015 04:50:07 +0000 (04:50 +0000)]
[X86] Fix shuffle decoding for variable VPERMIL to be tolerant of the Constant type not matching due to folding in the constant pool and to get VPERMILPD correct.

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

8 years agoTest
Craig Topper [Sat, 26 Dec 2015 04:50:01 +0000 (04:50 +0000)]
Test

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

8 years ago[X86] Fix copy and paste typo from pasting from another Makefile to restore code.
Craig Topper [Fri, 25 Dec 2015 23:27:57 +0000 (23:27 +0000)]
[X86] Fix copy and paste typo from pasting from another Makefile to restore code.

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

8 years ago[X86] Put back the include path to the main X86 sources in the AsmParser library...
Craig Topper [Fri, 25 Dec 2015 22:22:16 +0000 (22:22 +0000)]
[X86] Put back the include path to the main X86 sources in the AsmParser library to fix the bots.

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

8 years ago[X86] Remove X86CodeGen dependency from the AsmParser library.
Craig Topper [Fri, 25 Dec 2015 22:10:11 +0000 (22:10 +0000)]
[X86] Remove X86CodeGen dependency from the AsmParser library.

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

8 years ago[X86] Move getX86SubSuperRegisterOrZero to X86MCTargetDesc.cpp so it can be used...
Craig Topper [Fri, 25 Dec 2015 22:10:08 +0000 (22:10 +0000)]
[X86] Move getX86SubSuperRegisterOrZero to X86MCTargetDesc.cpp so it can be used by AsmParser library without depending on X86CodeGen library.

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

8 years agoRemove extra forward declarations and scrub includes for all in tree InstPrinters...
Craig Topper [Fri, 25 Dec 2015 22:10:01 +0000 (22:10 +0000)]
Remove extra forward declarations and scrub includes for all in tree InstPrinters. NFC

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

8 years ago[X86] Move AVX512 STATIC_ROUNDING enum to X86BaseInfo.h to fix a layering violation...
Craig Topper [Fri, 25 Dec 2015 22:09:49 +0000 (22:09 +0000)]
[X86] Move AVX512 STATIC_ROUNDING enum to X86BaseInfo.h to fix a layering violation in AsmParser.

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

8 years ago[X86] Replace MVT::SimpleValueType in the AsmParser library and getX86SubSuperRegiste...
Craig Topper [Fri, 25 Dec 2015 22:09:45 +0000 (22:09 +0000)]
[X86] Replace MVT::SimpleValueType in the AsmParser library and getX86SubSuperRegister with just an unsigned representing size.

This a is step towards fixing a layering violation so the X86 AsmParser won't depending on CodeGen types.

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

8 years ago[X86] Don't pass the default value to the High argument of getX86SubSuperRegister...
Craig Topper [Fri, 25 Dec 2015 19:44:16 +0000 (19:44 +0000)]
[X86] Don't pass the default value to the High argument of getX86SubSuperRegister. Most place don't care about this argument. NFC

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

8 years ago[llvm-objdump] Use stderr and not stdout for fatal errors.
Davide Italiano [Fri, 25 Dec 2015 18:16:45 +0000 (18:16 +0000)]
[llvm-objdump] Use stderr and not stdout for fatal errors.

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

8 years ago[X86] getX86SubSuperRegisterOrZero shouldn't call getX86SubSuperRegister recursively...
Craig Topper [Fri, 25 Dec 2015 17:07:32 +0000 (17:07 +0000)]
[X86] getX86SubSuperRegisterOrZero shouldn't call getX86SubSuperRegister recursively. It should call itself instead. Otherwise it might fire an assertion when it was designed not too.

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

8 years ago[X86] Add missing X86II::MRM_C4, MRM_C5, etc. encodings to getMemoryOperandNo. These...
Craig Topper [Fri, 25 Dec 2015 17:07:30 +0000 (17:07 +0000)]
[X86] Add missing X86II::MRM_C4, MRM_C5, etc. encodings to getMemoryOperandNo. These aren't used by any instructions, but could be someday. NFC

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

8 years ago[X86] Use assert instead of if and llvm_unreachable. NFC
Craig Topper [Fri, 25 Dec 2015 17:07:27 +0000 (17:07 +0000)]
[X86] Use assert instead of if and llvm_unreachable. NFC

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

8 years ago[X86] Minor identation fixes. NFC
Craig Topper [Fri, 25 Dec 2015 17:07:24 +0000 (17:07 +0000)]
[X86] Minor identation fixes. NFC

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

8 years ago[CodeGen] Use generic printAsOperand machinery instead of hand rolling it
David Majnemer [Fri, 25 Dec 2015 09:37:26 +0000 (09:37 +0000)]
[CodeGen] Use generic printAsOperand machinery instead of hand rolling it

We already know how to properly print out basic blocks in
printAsOperand, we should not roll it ourselves in
AsmPrinter::EmitBasicBlockStart.  No functionality change is intended.

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

8 years ago[IR] Mark the Type subclass helper methods 'inline' and move their definitions to...
Craig Topper [Fri, 25 Dec 2015 04:06:20 +0000 (04:06 +0000)]
[IR] Mark the Type subclass helper methods 'inline' and move their definitions to DerivedTypes.h so they can be inlined by the compiler.

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

8 years ago[Transforms] Use asserts instead of ifs around llvm_unreachable. NFC
Craig Topper [Fri, 25 Dec 2015 02:04:17 +0000 (02:04 +0000)]
[Transforms] Use asserts instead of ifs around llvm_unreachable. NFC

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

8 years ago[WebAssembly] Fix handling of COPY instructions in WebAssemblyRegStackify.
Dan Gohman [Fri, 25 Dec 2015 00:31:02 +0000 (00:31 +0000)]
[WebAssembly] Fix handling of COPY instructions in WebAssemblyRegStackify.

Move RegStackify after coalescing and teach it to use LiveIntervals instead
of depending on SSA form. This avoids a problem where a register in a COPY
instruction is stackified and then subsequently coalesced with a register
that is not stackified.

This also puts it after the scheduler, which allows us to simplify the
EXPR_STACK constraint, as we no longer have instructions being reordered
after stackification and before coloring.

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

8 years ago[InstCombine] transform more extract/insert pairs into shuffles (PR2109)
Sanjay Patel [Thu, 24 Dec 2015 21:17:56 +0000 (21:17 +0000)]
[InstCombine] transform more extract/insert pairs into shuffles (PR2109)

This is an extension of the shuffle combining from r203229:
http://reviews.llvm.org/rL203229

The idea is to widen a short input vector with undef elements so the
existing shuffle transform for extract/insert can kick in.

The motivation is to finally solve PR2109:
https://llvm.org/bugs/show_bug.cgi?id=2109

For that example, the IR becomes:

%1 = bitcast <2 x i32>* %P to <2 x float>*
%ld1 = load <2 x float>, <2 x float>* %1, align 8
%2 = shufflevector <2 x float> %ld1, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%i2 = shufflevector <4 x float> %A, <4 x float> %2, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
ret <4 x float> %i2

And x86 SSE output improves from:

movq (%rdi), %xmm1           ## xmm1 = mem[0],zero
movdqa %xmm1, %xmm2
shufps $229, %xmm2, %xmm2      ## xmm2 = xmm2[1,1,2,3]
shufps $48, %xmm0, %xmm1       ## xmm1 = xmm1[0,0],xmm0[3,0]
shufps $132, %xmm1, %xmm0      ## xmm0 = xmm0[0,1],xmm1[0,2]
shufps $32, %xmm0, %xmm2       ## xmm2 = xmm2[0,0],xmm0[2,0]
shufps $36, %xmm2, %xmm0       ## xmm0 = xmm0[0,1],xmm2[2,0]
retq

To the almost optimal:

movhpd (%rdi), %xmm0

Note: There's a tension in the existing transform related to generating
arbitrary shufflevector masks. We avoid that in other places in InstCombine
because we're scared that codegen can't handle strange masks, but it looks
like we're ok with producing those here. I purposely chose weird insert/extract
indexes for the regression tests to see the effect in these cases.
For PowerPC+Altivec, AArch64, and X86+SSE/AVX, I think the codegen is equal or
better for these examples.

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

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

8 years agoFix signed/unsigned warning in Line.h.
Dave Bartolomeo [Thu, 24 Dec 2015 19:17:54 +0000 (19:17 +0000)]
Fix signed/unsigned warning in Line.h.

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

8 years agoRemove unused constants from TypeTableBuilder.cpp.
Dave Bartolomeo [Thu, 24 Dec 2015 19:15:56 +0000 (19:15 +0000)]
Remove unused constants from TypeTableBuilder.cpp.

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

8 years agoFix case of path name
Bill Seurer [Thu, 24 Dec 2015 18:54:35 +0000 (18:54 +0000)]
Fix case of path name

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

8 years agoFix CodeView library name and non-CMake builds
Dave Bartolomeo [Thu, 24 Dec 2015 18:51:35 +0000 (18:51 +0000)]
Fix CodeView library name and non-CMake builds

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

8 years agoFix initializer order warning in TypeRecord.h
Dave Bartolomeo [Thu, 24 Dec 2015 18:25:54 +0000 (18:25 +0000)]
Fix initializer order warning in TypeRecord.h

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

8 years agoLLVM CodeView library
Dave Bartolomeo [Thu, 24 Dec 2015 18:12:38 +0000 (18:12 +0000)]
LLVM CodeView library

Summary: This diff is the initial implementation of the LLVM CodeView library. There is much more work to be done, namely a CodeView dumper and tests. This patch should help others make progress on the LLVM->CodeView debug info emission while I continue with the implementation of the dumper and tests.

This library implements support for emitting debug info in the CodeView format. This phase of the implementation only includes support for CodeView type records. Clients that need to emit type records will use a class derived from TypeTableBuilder. TypeTableBuilder provides member functions for writing each kind of type record; each of these functions eventually calls the writeRecord virtual function to emit the actual bits of the record. Derived classes override writeRecord to implement the folding of duplicate records and the actual emission to the appropriate destination. LLVMCodeView provides MemoryTypeTableBuilder, which creates the table in memory. In the future, other classes derived from TypeTableBuilder will write to other destinations, such as the type stream in a PDB.

The rest of the types in LLVMCodeView define the actual CodeView type records and all of the supporting enums and other types used in the type records. The TypeIndex class is of particular interest, because it is used by clients as a handle to a type in the type table.

The library provides a relatively low-level interface based on the actual on-disk format of CodeView. For example, type records refer to other type records by TypeIndex, rather than by an actual pointer to the referent record. This allows clients to emit type records one at a time, rather than having to keep the entire transitive closure of type records in memory until everything has been emitted. At some point, having a higher-level interface layered on top of this one may be useful for debuggers and other tools that want a more holistic view of the debug info. The lower-level interface should be sufficient for compilers and linkers to do the debug info manipulation that they need to do efficiently.

Reviewers: rnk, majnemer

Subscribers: silvas, rnk, jevinskie, llvm-commits

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

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

8 years ago[X86][ms-inline asm] Add support for memory operands that include structs
Marina Yatsina [Thu, 24 Dec 2015 12:09:51 +0000 (12:09 +0000)]
[X86][ms-inline asm] Add support for memory operands that include structs

Add ability to reference struct symbols in memory operands.
Test case will be added on the clang side (review http://reviews.llvm.org/D15749)

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

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

8 years ago[ProfileData] Make helper function static.
Benjamin Kramer [Thu, 24 Dec 2015 10:03:37 +0000 (10:03 +0000)]
[ProfileData] Make helper function static.

No functional change.

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

8 years ago[FunctionImport] Move pass into anonymous namespace.
Benjamin Kramer [Thu, 24 Dec 2015 10:03:35 +0000 (10:03 +0000)]
[FunctionImport] Move pass into anonymous namespace.

No functional change.

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

8 years agoAdd a missing const qualifier on the context instruction. This somehow
Chandler Carruth [Thu, 24 Dec 2015 09:08:08 +0000 (09:08 +0000)]
Add a missing const qualifier on the context instruction. This somehow
has always been missing. =/

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

8 years ago[X86][PKU] Add {RD,WR}PKRU encoding
Asaf Badouh [Thu, 24 Dec 2015 08:25:00 +0000 (08:25 +0000)]
[X86][PKU] Add {RD,WR}PKRU encoding

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

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

8 years agoAVX-512: Kreg set 0/1 optimization
Elena Demikhovsky [Thu, 24 Dec 2015 08:12:22 +0000 (08:12 +0000)]
AVX-512: Kreg set 0/1 optimization
The patterns that set a mask register to 0/1
KXOR %kn, %kn, %kn / KXNOR %kn, %kn, %kn
are replaced with
KXOR %k0, %k0, %kn / KXNOR %k0, %k0, %kn - AVX-512 targets optimization.

KNL does not recognize dependency-breaking idioms for mask registers,
so kxnor %k1, %k1, %k2 has a RAW dependence on %k1.
Using %k0 as the undef input register is a performance heuristic based
on the assumption that %k0 is used less frequently than the other mask
registers, since it is not usable as a write mask.

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

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

8 years agoAVX512: VPMOVM2B/W/D/Q intrinsic implementation.
Igor Breger [Thu, 24 Dec 2015 07:11:53 +0000 (07:11 +0000)]
AVX512: VPMOVM2B/W/D/Q intrinsic implementation.

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

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

8 years agoUse range-based for loops. NFC
Craig Topper [Thu, 24 Dec 2015 05:20:40 +0000 (05:20 +0000)]
Use range-based for loops. NFC

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