142522 Commits

Author SHA1 Message Date
Mehdi Amini
b78d89e96e [ThinLTO] Save 8B per summary entry by rearranging the fields (NFC)
Size goes from 72B to 64B per entry.

Differential Revision: https://reviews.llvm.org/D27970

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 04:09:29 +00:00
Matt Arsenault
46e5f1c88d AMDGPU: Swap order of operands in fadd/fsub combine
FMA is canonicalized to constant in the middle operand. Do
the same so fmad matches and avoid an extra combine step.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290313 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 04:03:40 +00:00
Matt Arsenault
121f8654d3 AMDGPU: Check fast math flags in fadd/fsub combines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290312 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 04:03:35 +00:00
Matt Arsenault
ff4096b8f8 AMDGPU: Form more FMAs if fusion is allowed
Extend the existing fadd/fsub->fmad combines to produce
FMA if allowed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290311 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 03:55:35 +00:00
Matt Arsenault
121cd504bf AMDGPU: Move combines into separate functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290309 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 03:44:42 +00:00
Matt Arsenault
75c32f5150 AMDGPU: Enable some f32 fadd/fsub combines for f16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 03:40:39 +00:00
Matt Arsenault
cee1c4614a AMDGPU: Implement isFMAFasterThanFMulAndFAdd for f16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 03:21:48 +00:00
Matt Arsenault
998b18c570 AMDGPU: setcc test cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290306 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 03:21:45 +00:00
Matt Arsenault
a8dff18ebc AMDGPU: Allow rcp and rsq usage with f16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290302 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 03:05:44 +00:00
Matt Arsenault
4bb99910b0 AMDGPU: Custom lower f16 fdiv
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290301 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 03:05:41 +00:00
Matt Arsenault
0bb2ef4a14 AMDGPU: Implement f16 fcanonicalize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 03:05:37 +00:00
Matt Arsenault
15a4f4e4ce AMDGPU: Update isFPImmLegal for f16
I don't think this matters because ConstantFP is legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 03:05:30 +00:00
Peter Collingbourne
50b4952766 Clear the PendingTypeTests vector after moving from it.
This is to put the vector into a well defined state. Apparently the state of a
vector after being moved from is valid but unspecified. Found with clang-tidy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 02:52:23 +00:00
Haicheng Wu
48addbf5f8 [AArch64] Correct the check of signed 9-bit imm in getIndexedAddressParts().
-256 is a legal indexed address part.

Differential Revision: https://reviews.llvm.org/D27537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 01:39:24 +00:00
Easwaran Raman
94201fb8e7 Pass GetAssumptionCache to InlineFunctionInfo constructor
Differential revision: https://reviews.llvm.org/D28038


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290295 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 01:07:01 +00:00
David Majnemer
f35020be62 [NVVMIntrRange] Only set range metadata if none is already present
The range metadata inserted by NVVMIntrRange is pessimistic, range
metadata already present could be more precise.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290294 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 00:51:59 +00:00
Adrian Prantl
c271bc0481 Renumber testcase metadata nodes after r290153.
This patch renumbers the metadata nodes in debug info testcases after
https://reviews.llvm.org/D26769. This is a separate patch because it
causes so much churn. This was implemented with a python script that
pipes the testcases through llvm-as - | llvm-dis - and then goes
through the original and new output side-by side to insert all
comments at a close-enough location.

Differential Revision: https://reviews.llvm.org/D27765

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 00:45:21 +00:00
Adrian Prantl
ee92d2e1b2 [LLParser] Make the line field of DIMacro(File) optional.
Otherwise these records do not survive roundtrips.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290291 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 00:29:00 +00:00
Adrian Prantl
5cfe3c370f Legalize metadata in legacy testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290288 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 23:38:17 +00:00
Adrian Prantl
7d9914dcc1 Legalize metadata in legacy testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 23:36:06 +00:00
Adrian Prantl
0f7c9fbaa2 Legalize metadata in legacy testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290286 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 23:30:35 +00:00
Adrian Prantl
6b556068df Legalize metadata in legacy testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290285 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 23:28:49 +00:00
Ahmed Bougacha
8097fcb40b [GlobalISel] Add basic Selector-emitter tblgen backend.
This adds a basic tablegen backend that analyzes the SelectionDAG
patterns to find simple ones that are eligible for GlobalISel-emission.

That's similar to FastISel, with one notable difference: we're not fed
ISD opcodes, so we need to map the SDNode operators to generic opcodes.
That's done using GINodeEquiv in TargetGlobalISel.td.

Otherwise, this is mostly boilerplate, and lots of filtering of any kind
of "complicated" pattern. On AArch64, this is sufficient to match G_ADD
up to s64 (to ADDWrr/ADDXrr) and G_BR (to B).

Differential Revision: https://reviews.llvm.org/D26878

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290284 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 23:26:20 +00:00
Ahmed Bougacha
9cccec8198 [AsmWriter] Remove redundant cast<>s. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 23:26:13 +00:00
Dan Gohman
54f9742d29 [WebAssembly] Fix the opcode value for i64.rotr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 23:09:42 +00:00
Peter Collingbourne
ea3f918aec IR: Function summary representation for type tests.
Each function summary has an attached list of type identifier GUIDs. The
idea is that during the regular LTO phase we would match these GUIDs to type
identifiers defined by the regular LTO module and store the resolutions in
a top-level "type identifier summary" (which will be implemented separately).

Differential Revision: https://reviews.llvm.org/D27967

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 23:03:45 +00:00
Mike Aizatsky
57e4fa8aaa [sancov] skip duplicated points
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 22:10:01 +00:00
Mike Aizatsky
fd40c60332 [sancov] hash prefix results in huge merge files, use shorter prefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290277 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 22:09:57 +00:00
Haicheng Wu
c2dfb0aa15 [AArch64] Remove a redundant check. NFC.
The case AM.Scale == 0 is already handled by the code right above.

Differential Revision: https://reviews.llvm.org/D28003

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290275 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 21:40:47 +00:00
Greg Clayton
c880b7343b Add the ability for DWARFDie objects to get the parent DWARFDie.
In order for the llvm DWARF parser to be used in LLDB we will need to be able to get the parent of a DIE. This patch adds that functionality by changing the DWARFDebugInfoEntry class to store a depth field instead of a sibling index. Using a depth field allows us to easily calculate the sibling and the parent without increasing the size of DWARFDebugInfoEntry.

I tested llvm-dsymutil on a debug version of clang where this fully parses DWARF in over 1200 .o files to verify there was no serious regression in performance.

Added a full suite of unit tests to test this functionality.

Differential Revision: https://reviews.llvm.org/D27995



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290274 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 21:37:06 +00:00
Justin Bogner
8bddda3652 cmake: Don't build llvm-config and tblgen concurrently in cross builds
This sets USES_TERMINAL for the native llvm-config build, so that it
doesn't run at the same time as builds of other native tools (namely,
tablegen). Without this, if you're very unlucky with the timing it's
possible to be relinking libSupport as one of the tools is linking,
causing a spurious failure.

The tablegen build adopted USES_TERMINAL for this same reason in
r280748.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290271 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 21:19:00 +00:00
Ed Maste
91d837c186 Update mailing list post URL and add libunwind reference
RTDyldMemoryManager.cpp describes the differing __register_frame
API between libunwind and libgcc, with a mailing list posting URL.

The original link was 404; replace it with what I believe is the
intended post, as well as a reference to the "OS X" implementation in
libunwind.

Differential Revision:	https://reviews.llvm.org/D27965


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 20:51:42 +00:00
Simon Pilgrim
373eadc326 [X86][SSE] Improve lowering of vXi64 multiplies
As mentioned on PR30845, we were performing our vXi64 multiplication as:

AloBlo = pmuludq(a, b);
AloBhi = pmuludq(a, psrlqi(b, 32));
AhiBlo = pmuludq(psrlqi(a, 32), b);
return AloBlo + psllqi(AloBhi, 32)+ psllqi(AhiBlo, 32);

when we could avoid one of the upper shifts with:

AloBlo = pmuludq(a, b);
AloBhi = pmuludq(a, psrlqi(b, 32));
AhiBlo = pmuludq(psrlqi(a, 32), b);
return AloBlo + psllqi(AloBhi + AhiBlo, 32);

This matches the lowering on gcc/icc.

Differential Revision: https://reviews.llvm.org/D27756

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290267 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 20:00:10 +00:00
David Majnemer
6be18b9049 Revert "[InstCombine] New opportunities for FoldAndOfICmp and FoldXorOfICmp"
This reverts commit r289813, it caused PR31449.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290266 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 19:21:59 +00:00
Tom Stellard
7080d37a8d AMDGPU/SI: Fix file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 19:06:24 +00:00
Peter Collingbourne
fa98a04f68 TypeMetadataUtils: Simplify; spotted by Mehdi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290264 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 19:00:47 +00:00
Zachary Turner
d364009440 Add missing includes on Windows.
Patch by Andrey Khalyavin
Differential Revision: https://reviews.llvm.org/D27915

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 18:50:52 +00:00
Michael Kuperstein
f4bf651085 [LLParser] Parse vector GEP constant expression correctly
The constantexpr parsing was too constrained and rejected legal vector GEPs.
This relaxes it to be similar to the ones for instruction parsing.

This fixes PR30816.

Differential Revision: https://reviews.llvm.org/D28013


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290261 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 18:29:47 +00:00
Michael Kuperstein
57ab82784d [ConstantFolding] Fix vector GEPs harder
For vector GEPs, CastGEPIndices can end up in an infinite recursion, because
we compare the vector type to the scalar pointer type, find them different,
and then try to cast a type to itself.

Differential Revision: https://reviews.llvm.org/D28009


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290260 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 17:34:21 +00:00
Simon Pilgrim
12220058cf [CostModel] Pass shuffle mask args with ArrayRef. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290257 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 15:49:01 +00:00
Michael Zuckerman
2f4b616c0b revert first commit . removing empty line in X86.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 12:48:01 +00:00
Michael Zuckerman
3c3803e952 First commit adding new line to X86.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290254 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 12:44:47 +00:00
Elena Demikhovsky
b4e27a00f1 Added a template for building target specific memory node in DAG.
I added API for creation a target specific memory node in DAG. Today, all memory nodes are common for all targets and their constructors are located in SelectionDAG.cpp.
There are some cases in X86 where we need to create a special node - truncation-with-saturation store, float-to-half-store. 
In the current patch I added truncation-with-saturation nodes and I'm using them for intrinsics. In the future I plan to implement DAG lowering for truncation-with-saturation pattern.

Differential Revision: https://reviews.llvm.org/D27899



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290250 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 10:43:36 +00:00
Davide Italiano
0a9fce6bda [AMDGPU] Garbage collect dead code. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 10:19:00 +00:00
Oren Ben Simhon
7cd6c62eea [X86] Vectorcall Calling Convention - Adding CodeGen Complete Support
Fixing a warning.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290248 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 09:47:31 +00:00
Oren Ben Simhon
92d5336efa [X86] Vectorcall Calling Convention - Adding CodeGen Complete Support
Fixing failing test.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290246 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 09:18:37 +00:00
Oren Ben Simhon
c934c63c3a [X86] Vectorcall Calling Convention - Adding CodeGen Complete Support
Fixing build issues.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290244 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 08:59:42 +00:00
Oren Ben Simhon
7327d6f7aa [X86] Vectorcall Calling Convention - Adding CodeGen Complete Support
The vectorcall calling convention specifies that arguments to functions are to be passed in registers, when possible.
vectorcall uses more registers for arguments than fastcall or the default x64 calling convention use. 
The vectorcall calling convention is only supported in native code on x86 and x64 processors that include Streaming SIMD Extensions 2 (SSE2) and above.

The current implementation does not handle Homogeneous Vector Aggregates (HVAs) correctly and this review attempts to fix it.
This aubmit also includes additional lit tests to cover better HVAs corner cases.

Differential Revision: https://reviews.llvm.org/D27392



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 08:31:45 +00:00
Adam Nemet
0e3e0fb2d5 [LDist] Match behavior between invoking via optimization pipeline or opt -loop-distribute
In r267672, where the loop distribution pragma was introduced, I tried
it hard to keep the old behavior for opt: when opt is invoked
with -loop-distribute, it should distribute the loop (it's off by
default when ran via the optimization pipeline).

As MichaelZ has discovered this has the unintended consequence of
breaking a very common developer work-flow to reproduce compilations
using opt: First you print the pass pipeline of clang
with -debug-pass=Arguments and then invoking opt with the returned
arguments.

clang -debug-pass will include -loop-distribute but the pass is invoked
with default=off so nothing happens unless the loop carries the pragma.
While through opt (default=on) we will try to distribute all loops.

This changes opt's default to off as well to match clang.  The tests are
modified to explicitly enable the transformation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 04:07:40 +00:00
Sebastian Pop
5f9dad751b remove pretty-print test that requires debug
There is no need to test the pretty printer. Remove the boggus test to make the
build bots happy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290234 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 03:37:39 +00:00