Commit Graph

145172 Commits

Author SHA1 Message Date
Matt Arsenault
e67c4a1dbe Bug 31948: Fix assertion when bitcasting constantexpr pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295387 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 00:32:19 +00:00
Chandler Carruth
59a5fdf3ae FileCheck-ize some tests in test/CodeGen/X86/
Patch by Jorge Gorbe!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295386 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 00:29:59 +00:00
Teresa Johnson
0640903d30 Handle link of NoDebug CU with a CU that has debug emission enabled
Summary:
This is an issue both with regular and Thin LTO. When we link together
a DICompileUnit that is marked NoDebug (e.g when compiling with -g0
but applying an AutoFDO profile, which requires location tracking
in the compiler) and a DICompileUnit with debug emission enabled,
we can have failures during dwarf debug generation. Specifically,
when we have inlined from the NoDebug compile unit into the debug
compile unit, we can fail during construction of the abstract and
inlined scope DIEs. This is because the SPMap does not include NoDebug
CUs (they are skipped in the debug_compile_units_iterator).

This patch fixes the failures by skipping locations from NoDebug CUs
when extracting lexical scopes.

Reviewers: dblaikie, aprantl

Subscribers: mehdi_amini, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295384 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 00:21:19 +00:00
Eugene Zelenko
b1df787d2c [IR] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295383 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-17 00:00:09 +00:00
Zachary Turner
3e9ce61e33 [pdb] Add the ability to resolve TypeServer PDBs.
Some PDBs or object files can contain references to other PDBs
where the real type information lives.  When this happens,
all type indices in the original PDB are meaningless because
their records are not there.

With this patch we add the ability to pull type info from those
secondary PDBs.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295382 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 23:35:45 +00:00
Wei Mi
49302a7d90 [LSR] Prevent formula with SCEVAddRecExpr type of Reg from Sibling loops
In rL294814, we allow formula with SCEVAddRecExpr type of Reg from loops
other than current loop. This is good for the case when induction variable
of outerloop being used in expr in innerloop. But it is very bad to allow
such Reg from sibling loop because we may need to add lsr.iv in other sibling
loops when scev expanding those SCEVAddRecExpr type exprs. For the testcase
below, one loop can be inserted with a bunch of lsr.iv because of LSR for
other loops. 

// The induction variable j from a loop in the middle will have initial
// value generated from previous sibling loop and exit value used by its
// next sibling loop.
void goo(long i, long j); 
long cond; 

void foo(long N) { 
long i = 0; 
long j = 0; 
i = 0; do { goo(i, j); i++; j++; } while (cond); 
i = 0; do { goo(i, j); i++; j++; } while (cond); 
i = 0; do { goo(i, j); i++; j++; } while (cond); 
i = 0; do { goo(i, j); i++; j++; } while (cond); 
i = 0; do { goo(i, j); i++; j++; } while (cond); 
i = 0; do { goo(i, j); i++; j++; } while (cond); 
} 

The fix is to only allow formula with SCEVAddRecExpr type of Reg from current
loop or its parents.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295378 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 21:27:31 +00:00
David Blaikie
c257cb9d41 Fix -Wunused-lambda-capture by removing some unused lambda captures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295373 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 20:55:48 +00:00
Benjamin Kramer
878598debf [MachinePipeliner] Remove redundant destructor. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295372 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 20:26:51 +00:00
Krzysztof Parzyszek
075abc4ae8 [Hexagon] Start using regmasks on calls
All the cool targets are doing it...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295371 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 20:25:23 +00:00
Erich Keane
24d2821338 Change default TimerGroup singleton to use magic statics
TimerGroup was showing up on a leak in valigrind, and 
used some pretty complex code to implement a singleton.
This patch replaces the implementation with a vastly simpler
one.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295370 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 20:19:49 +00:00
Krzysztof Parzyszek
ff2120a9ec [RDF] Aggregate shadow phi uses into one cluster when propagating live info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295366 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 19:28:06 +00:00
Simon Pilgrim
ae993c4e92 [X86][SSE] Add PR31309 test case (load-extend i32 to i128).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295363 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 19:17:36 +00:00
Matt Arsenault
0b229143d8 AMDGPU: Remove llvm.AMDGPU.cube intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295359 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 19:09:04 +00:00
Matt Arsenault
81cfbfa738 AMDGPU: Remove llvm.AMDGPU.rsq intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295358 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 19:08:58 +00:00
Hans Wennborg
a8edb5cd90 Re-apply r282920 "X86: Allow conditional tail calls in Win64 "leaf" functions (PR26302)"
The original commit was reverted in r283329 due to a miscompile in
Chromium. That turned out to be the same issue as PR31257, which was
fixed in r295262.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295357 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 19:04:42 +00:00
Krzysztof Parzyszek
150b7ab23e [RDF] Differentiate between defining and clobbering nodes
Defining nodes should not alias with one another, while clobbering
nodes can. When pushing defs on stacks, push clobbers first, link
non-clobbering defs, then push the defs.

The data flow in a statement is now: uses -> clobbers -> defs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 18:53:04 +00:00
David Blaikie
b42dbbf6b5 Refactor DebugHandlerBase a bit to common non-debug-having-function filtering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295354 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 18:48:33 +00:00
Matt Arsenault
89f19b28dd InstCombine: Canonicalize fast fmuladd to fmul + fadd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295353 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 18:46:24 +00:00
Krzysztof Parzyszek
62209f2721 [RDF] Move normalize(RegisterRef) to PhysicalRegisterInfo
Remove the duplicate from DFG and make some members of PRI private.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295351 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 18:45:23 +00:00
Andrea Di Biagio
8458f17381 x86 interrupt calling convention: only save xmm registers if the target supports SSE
The existing code always saves the xmm registers for 64-bit targets even if the
target doesn't support SSE (which is common for kernels). Thus, the compiler
inserts movaps instructions which lead to CPU exceptions when an interrupt
handler is invoked.

This commit fixes this bug by returning a register set without xmm registers
from getCalleeSavedRegs and getCallPreservedMask for such targets.

Patch by Philipp Oppermann.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295347 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 18:25:37 +00:00
Sanjay Patel
861192db76 [x86] add more tests of select of constants; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295346 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 18:15:16 +00:00
Artur Pilipenko
e97e1b5918 [DAGCombiner] Support {a|s}ext, {a|z|s}ext load nodes in load combine
Resubmit -r295314 with PowerPC and AMDGPU tests updated.

Support {a|s}ext, {a|z|s}ext load nodes as a part of load combine patters.

Reviewed By: filcab

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295336 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 17:07:27 +00:00
Sjoerd Meijer
e61e0955b7 [AArch64] AArch64AsmParser clean up of isImmediate functions. NFC
Regression test neon-diagnostics.s needed changing because it now
produces a more specific diagnostic about the immediate ranges. One
change in the expected error message is not obvious, but there multiple
candidate and it happens to pick the immediate diagnostic.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295331 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 15:52:22 +00:00
Dan Gohman
8073df7f9a [WebAssembly] Add a cast to void to fix an unused private member warning, for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295327 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 15:21:37 +00:00
Simon Pilgrim
d69a69b212 [X86] Remove local areOnlyUsersOf helper and use SDNode::areOnlyUsersOf instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295326 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 15:11:49 +00:00
Marshall Clow
bdbb2951ee Remove uses of deprecated std::random_shuffle in the LLVM code base. Reviewed as https://reviews.llvm.org/D29780.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295325 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 14:37:03 +00:00
Diana Picus
f3d4a249cc [ARM] GlobalISel: Select floating point loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295321 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 14:10:50 +00:00
Artur Pilipenko
914d7a67a3 Rever -r295314 "[DAGCombiner] Support {a|s}ext, {a|z|s}ext load nodes in load combine"
This change causes some of AMDGPU and PowerPC tests to fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295316 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 13:04:46 +00:00
Artur Pilipenko
40edfac454 [DAGCombiner] Support {a|s}ext, {a|z|s}ext load nodes in load combine
Support {a|s}ext, {a|z|s}ext load nodes as a part of load combine patters.

Reviewed By: filcab

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295314 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 12:53:26 +00:00
Diana Picus
0c9edc1bdb [ARM] GlobalISel: Select G_SEQUENCE and G_EXTRACT
Since they're only used for passing around double precision floating point
values into the general purpose registers, we'll lower them to VMOVDRR and
VMOVRRD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295310 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 12:19:57 +00:00
Diana Picus
126f155f7f [ARM] GlobalISel: Select double G_FADD and copies
Just use VADDD if available, bail out if not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295309 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 12:19:52 +00:00
Diana Picus
4a21a19ad4 [ARM] GlobalISel: Assert that we don't use the FPR bank if we don't have VFP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295308 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 11:25:09 +00:00
Diana Picus
6095db1743 [ARM] GlobalISel: Add reg bank mappings for G_SEQUENCE and G_EXTRACT
Support G_SEQUENCE and G_EXTRACT as needed for passing double precision floating
point values in the soft-fp float mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295306 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 11:00:31 +00:00
Diana Picus
bfc030ced0 [ARM] GlobalISel: Make the FPR bank 64-bit wide
Also add mappings for single and double precision FP, and use them for G_FADD
and G_LOAD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295302 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 10:12:49 +00:00
Diana Picus
b07be54dc6 [ARM] GlobalISel: Legalize 64-bit G_FADD and G_LOAD
For now we just mark them as legal all the time and let the other passes bail
out if they can't handle it. In the future, we'll want to move more of the
brains into the legalizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295300 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 09:09:49 +00:00
NAKAMURA Takumi
3a075ee236 RWMutex.h: Use llvm-config.h instead of config.h in installed headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295297 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 08:22:08 +00:00
Diana Picus
cb363f5625 [ARM] GlobalISel: Lower double precision FP args
For the hard float calling convention, we just use the D registers.

For the soft-fp calling convention, we use the R registers and move values
to/from the D registers by means of G_SEQUENCE/G_EXTRACT. While doing so, we
make sure to honor the endianness of the target, since the CCAssignFn doesn't do
that for us.

For pure soft float targets, we still bail out because we don't support the
libcalls yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295295 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 07:53:07 +00:00
Craig Topper
4c2f2e48dc [AVX-512][InstCombine] Teach InstCombine to optimize 512-bit packss/packus intrinsics like it does 128/256-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295294 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 07:35:23 +00:00
Craig Topper
fdf5214704 [AVX-512] Remove masked packss/packus intrinsics and autoupgrade to unmasked intrinsics with select instructions. For 512-bit add new unmasked intrinsics.
The new 512-bit unmasked intrinsics will make it easy to handle these with the SSE/AVX intrinsics in InstCombine where we currently have a TODO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295290 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 06:31:54 +00:00
Rui Ueyama
458e24287e Split WinCOFFObjectWriter::writeSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295276 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 02:56:06 +00:00
Rui Ueyama
1e5304f32f Split WinCOFFObjectWriter::writeObject function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295273 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 02:35:48 +00:00
Matt Arsenault
61239b090d AMDGPU: Remove llvm.SI.sendmsg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295270 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 02:01:17 +00:00
Matt Arsenault
a0240d6d1a AMDGPU: Remove SI_fs_constant and SI_fs_interp intrinsics
Update test uses with expansion in terms of new intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295269 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 02:01:13 +00:00
Rui Ueyama
0ddf101757 Remove useless local variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295268 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 01:41:04 +00:00
Rui Ueyama
5ececce5a8 Rename variables to match the LLVM style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295265 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 01:06:45 +00:00
Hans Wennborg
b6ae6ad928 [X86] Re-enable conditional tail calls and fix PR31257.
This reverts r294348, which removed support for conditional tail calls
due to the PR above. It fixes the PR by marking live registers as
implicitly used and defined by the now predicated tailcall. This is
similar to how IfConversion predicates instructions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295262 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-16 00:04:05 +00:00
Peter Collingbourne
f24f18c0ea PMB: Add an importing WPD pass to the start of the ThinLTO backend pipeline.
Differential Revision: https://reviews.llvm.org/D30008

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295260 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 23:48:38 +00:00
Teresa Johnson
f9ea9a3e8b Collapse my two entries in CODE_OWNERS.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295259 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 23:45:21 +00:00
Tim Northover
5562e17d88 GlobalISel: legalize va_arg on AArch64.
Uses a Custom implementation because the slot sizes being a multiple of the
pointer size isn't really universal, even for the architectures that do have a
simple "void *" va_list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295255 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 23:22:50 +00:00
Tim Northover
432026394b GlobalISel: support translating va_arg
Since (say) i128 and [16 x i8] map to the same type in generic MIR, we also
need to attach the required alignment info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295254 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15 23:22:33 +00:00