platform/upstream/llvm.git
8 years ago[X86] Use high bits of return value from getEncoding instead of predicate functions...
Craig Topper [Sun, 6 Mar 2016 08:12:47 +0000 (08:12 +0000)]
[X86] Use high bits of return value from getEncoding instead of predicate functions to populate the REX and VEX prefix bits that extend register encodings. NFC

llvm-svn: 262800

8 years ago[X86] Remove unnecessary masking. The assert above it already guaranteed it. NFC
Craig Topper [Sun, 6 Mar 2016 08:12:44 +0000 (08:12 +0000)]
[X86] Remove unnecessary masking. The assert above it already guaranteed it. NFC

llvm-svn: 262799

8 years ago[X86] Use uint8_t instead of unsigned char as it shortens the code and more explicitl...
Craig Topper [Sun, 6 Mar 2016 08:12:42 +0000 (08:12 +0000)]
[X86] Use uint8_t instead of unsigned char as it shortens the code and more explicitly reflects the desired size.

llvm-svn: 262798

8 years agoAVX512: Remove VSHRI kmask patterns from TD file. It is incorrect to use kshiftw...
Igor Breger [Sun, 6 Mar 2016 07:46:03 +0000 (07:46 +0000)]
AVX512: Remove VSHRI kmask patterns from TD file. It is incorrect to use kshiftw to implement VSHRI v4i1 , bits 15-4 is undef so the upper bits of v4i1 may not be zeroed. v4i1 should be zero_extend to v16i1 ( or any natively supported vector).

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

llvm-svn: 262797

8 years ago[ELF] - Simplify a SymbolBody class interface a bit.
George Rimar [Sun, 6 Mar 2016 06:26:18 +0000 (06:26 +0000)]
[ELF] - Simplify a SymbolBody class interface a bit.

Get rid of few accessors in that class, and replace
them with direct fields access.

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

llvm-svn: 262796

8 years agoFixed formatting issues in AArch64 target methods. NFC.
George Rimar [Sun, 6 Mar 2016 06:16:05 +0000 (06:16 +0000)]
Fixed formatting issues in AArch64 target methods. NFC.

llvm-svn: 262795

8 years ago[ELF] - Changed return type of Target::relaxTls()
George Rimar [Sun, 6 Mar 2016 06:09:50 +0000 (06:09 +0000)]
[ELF] - Changed return type of Target::relaxTls()

Patch changes the return type of Target::relaxTls
to size_t from unsigned. That is consistent with
its use from other code.

Change was reviewed http://reviews.llvm.org/D17882
and asked to commit separately from that patch above.

llvm-svn: 262794

8 years ago[ELF] - Use the uint32_t instead of unsigned in Target class for relocations types
George Rimar [Sun, 6 Mar 2016 06:01:07 +0000 (06:01 +0000)]
[ELF] - Use the uint32_t instead of unsigned in Target class for relocations types

Patch changes all relocations types to be uint32_t and also
fixes some dependent inconsistency in callers code.

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

llvm-svn: 262793

8 years agocleanup: remove dead preprocessing branch /nfc
Xinliang David Li [Sun, 6 Mar 2016 04:56:55 +0000 (04:56 +0000)]
cleanup: remove dead preprocessing branch /nfc

llvm-svn: 262792

8 years ago[PGO] cleanup: move one support method into InstrProfilingUtil.h /NFC
Xinliang David Li [Sun, 6 Mar 2016 04:52:45 +0000 (04:52 +0000)]
[PGO] cleanup: move one support method into InstrProfilingUtil.h /NFC

llvm-svn: 262791

8 years agounitests: add some ARM TargetParser tests
Saleem Abdulrasool [Sun, 6 Mar 2016 04:50:55 +0000 (04:50 +0000)]
unitests: add some ARM TargetParser tests

The ARM TargetParser would construct invalid StringRefs.  This would cause
asserts to trigger.  Add some tests in LLVM to ensure that we dont regress on
this in the future.  Although there is a test for this in clang, this ensures
that the changes would get caught in the same repository.

llvm-svn: 262790

8 years ago[Modules] Don't swallow errors when parsing optional attributes.
Davide Italiano [Sun, 6 Mar 2016 04:20:05 +0000 (04:20 +0000)]
[Modules] Don't swallow errors when parsing optional attributes.

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

llvm-svn: 262789

8 years ago[PGO] internal API name cleanups (for better consistency)
Xinliang David Li [Sun, 6 Mar 2016 04:18:13 +0000 (04:18 +0000)]
[PGO] internal API name cleanups (for better consistency)

llvm-svn: 262788

8 years ago[docs] Clean up doxygen comments a bit.
Alexander Kornienko [Sun, 6 Mar 2016 04:05:59 +0000 (04:05 +0000)]
[docs] Clean up doxygen comments a bit.

llvm-svn: 262787

8 years ago[docs] Updated docs to work with Doxygen 1.8.11
Alexander Kornienko [Sun, 6 Mar 2016 03:50:08 +0000 (03:50 +0000)]
[docs] Updated docs to work with Doxygen 1.8.11

llvm-svn: 262786

8 years agoMinor cleanup
Xinliang David Li [Sun, 6 Mar 2016 00:55:20 +0000 (00:55 +0000)]
Minor cleanup

move a function def to InstrProfilingUtil.c

llvm-svn: 262785

8 years ago[X86][AVX] Improved VPERMILPS variable shuffle mask decoding.
Simon Pilgrim [Sat, 5 Mar 2016 22:53:31 +0000 (22:53 +0000)]
[X86][AVX] Improved VPERMILPS variable shuffle mask decoding.

Added support for decoding VPERMILPS variable shuffle masks that aren't in the constant pool.

Added target shuffle mask decoding for SCALAR_TO_VECTOR+VZEXT_MOVL cases - these can happen for v2i64 constant re-materialization

Followup to D17681

llvm-svn: 262784

8 years agoFixed -Wdocumentation warning - typo in a parameter name
Simon Pilgrim [Sat, 5 Mar 2016 22:35:55 +0000 (22:35 +0000)]
Fixed -Wdocumentation warning - typo in a parameter name

llvm-svn: 262783

8 years ago[X86] AMD Bobcat CPU (btver1) doesn't support XSAVE
Simon Pilgrim [Sat, 5 Mar 2016 22:00:50 +0000 (22:00 +0000)]
[X86] AMD Bobcat CPU (btver1) doesn't support XSAVE

btver1 is a SSSE3/SSE4a only CPU - it doesn't have AVX and doesn't support XSAVE.

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

llvm-svn: 262782

8 years ago[clang-tidy] Extend UnnecessaryCopyInitialization check to trigger on non-const copie...
Felix Berger [Sat, 5 Mar 2016 21:17:58 +0000 (21:17 +0000)]
[clang-tidy] Extend UnnecessaryCopyInitialization check to trigger on non-const copies that can be safely converted to const references.

Summary:
Move code shared between UnnecessaryCopyInitialization and ForRangeCopyCheck into utilities files.
Add more test cases for UnnecessaryCopyInitialization and disable fixes inside of macros.

Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 262781

8 years agoMisc: add a test for TargetParser usage
Saleem Abdulrasool [Sat, 5 Mar 2016 21:12:33 +0000 (21:12 +0000)]
Misc: add a test for TargetParser usage

Ensure that an invalid value passed to target parser does not cause an assertion
in +Asserts builds.

Supporting test for PR26839.

llvm-svn: 262780

8 years ago[GCDA] Unlock arc file before closing it
Vedant Kumar [Sat, 5 Mar 2016 20:10:25 +0000 (20:10 +0000)]
[GCDA] Unlock arc file before closing it

The GCDA writer closed the arc file before unlocking it. This causes an
EBADF while unlocking the file, and opens us up to racy behavior.

Fixes PR26847.

llvm-svn: 262779

8 years agoSupport: catch invalid accesses
Saleem Abdulrasool [Sat, 5 Mar 2016 20:00:44 +0000 (20:00 +0000)]
Support: catch invalid accesses

It is possible to invoke these methods on an invalid input resulting in an
invalid substring construction.  It seems that we do not have unit tests for
these methods.  Tests to ensure that the invalid call is caught to follow in
clang.

Resolves PR26839.

llvm-svn: 262778

8 years agoExecutionEngine: tweak debug log
Saleem Abdulrasool [Sat, 5 Mar 2016 20:00:41 +0000 (20:00 +0000)]
ExecutionEngine: tweak debug log

Add a newline to separate the log message.  NFC.

llvm-svn: 262777

8 years agoclang-format: [JS] Support destructuring assignments in for loops.
Daniel Jasper [Sat, 5 Mar 2016 18:34:26 +0000 (18:34 +0000)]
clang-format: [JS] Support destructuring assignments in for loops.

Before:
  for (let { a, b } of x) {
  }

After:
  for (let {a, b} of x) {
  }

llvm-svn: 262776

8 years agoReplace GlobalScopeAsm[GlobalScopeAsm.size()-1] with GlobalScopeAsm.back(), NFC.
Yaron Keren [Sat, 5 Mar 2016 16:02:09 +0000 (16:02 +0000)]
Replace GlobalScopeAsm[GlobalScopeAsm.size()-1] with GlobalScopeAsm.back(), NFC.

llvm-svn: 262775

8 years agoAdd DAG mutation interface to the post-RA scheduler
Krzysztof Parzyszek [Sat, 5 Mar 2016 15:45:23 +0000 (15:45 +0000)]
Add DAG mutation interface to the post-RA scheduler

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

llvm-svn: 262774

8 years agoUse IRMover directly.
Rafael Espindola [Sat, 5 Mar 2016 14:51:51 +0000 (14:51 +0000)]
Use IRMover directly.

This has a few advantages:
* If lld selected a non bitcode symbol, be the bitcode GV is not merged
* lib/Linker is not redoing symbol resolution.

llvm-svn: 262773

8 years ago[X86] AMD Bobcat CPU (btver1) doesn't support XSAVE
Simon Pilgrim [Sat, 5 Mar 2016 14:35:44 +0000 (14:35 +0000)]
[X86] AMD Bobcat CPU (btver1) doesn't support XSAVE

btver1 is a SSSE3/SSE4a only CPU - it doesn't have AVX and doesn't support XSAVE.

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

llvm-svn: 262772

8 years agolibc++: fix typo
JF Bastien [Sat, 5 Mar 2016 14:22:02 +0000 (14:22 +0000)]
libc++: fix typo

llvm-svn: 262771

8 years ago[cmake] Address Samsonov's post-commit review of r262723
Filipe Cabecinhas [Sat, 5 Mar 2016 10:01:04 +0000 (10:01 +0000)]
[cmake] Address Samsonov's post-commit review of r262723

Reviewers: samsonov

Subscribers: llvm-commits

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

llvm-svn: 262770

8 years ago[aa-eval] Enhance the comments to better describe the overview of why
Chandler Carruth [Sat, 5 Mar 2016 08:20:15 +0000 (08:20 +0000)]
[aa-eval] Enhance the comments to better describe the overview of why
this pass exists.

This is based on feedback received when moving this comment from the source
file to a new header file.

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

llvm-svn: 262769

8 years agoRegisterCoalescer: Remap subregister lanemasks before exchanging operands
Matthias Braun [Sat, 5 Mar 2016 04:36:13 +0000 (04:36 +0000)]
RegisterCoalescer: Remap subregister lanemasks before exchanging operands

Rematerializing and merging into a bigger register class at the same
time, requires the subregister range lanemasks getting remapped to the
new register class.

This fixes http://llvm.org/PR26805

llvm-svn: 262768

8 years agoRegisterCoalescer: Need to check DstReg+SrcReg for missing undef flags
Matthias Braun [Sat, 5 Mar 2016 04:36:10 +0000 (04:36 +0000)]
RegisterCoalescer: Need to check DstReg+SrcReg for missing undef flags

copy coalescing with enabled subregister liveness can reveal undef uses,
previously this was only checked for the SrcReg in updateRegDefsUses()
but we need to check DstReg as well.

llvm-svn: 262767

8 years agoRegisterPressure: Small cleanup
Matthias Braun [Sat, 5 Mar 2016 04:36:08 +0000 (04:36 +0000)]
RegisterPressure: Small cleanup

llvm-svn: 262766

8 years agoAdd null check to diagnostic path for lambda captures.
Richard Trieu [Sat, 5 Mar 2016 04:04:57 +0000 (04:04 +0000)]
Add null check to diagnostic path for lambda captures.

Previously, the failed capture of a variable in nested lambdas may crash when
the lambda pointer is null.  Only give the note if a location can be retreived
from the lambda pointer.

llvm-svn: 262765

8 years agoTest commit: Fix run-on sentence in comment
Mike Spertus [Sat, 5 Mar 2016 01:56:07 +0000 (01:56 +0000)]
Test commit: Fix run-on sentence in comment

llvm-svn: 262764

8 years ago[analyzer] Nullability: add option to not report on calls to system headers.
Devin Coughlin [Sat, 5 Mar 2016 01:32:43 +0000 (01:32 +0000)]
[analyzer] Nullability: add option to not report on calls to system headers.

Add an -analyzer-config 'nullability:NoDiagnoseCallsToSystemHeaders' option to
the nullability checker. When enabled, this option causes the analyzer to not
report about passing null/nullable values to functions and methods declared
in system headers.

This option is motivated by the observation that large projects may have many
nullability warnings. These projects may find warnings about nullability
annotations that they have explicitly added themselves higher priority to fix
than warnings on calls to system libraries.

llvm-svn: 262763

8 years ago[X86] Fix the lowering of setjmp intrinsic on i386.
Quentin Colombet [Sat, 5 Mar 2016 00:31:04 +0000 (00:31 +0000)]
[X86] Fix the lowering of setjmp intrinsic on i386.
When the lowering of the setjmp intrinsic requires
a global base pointer to be set, make sure such pointer
gets defined by the CGBR pass.

This fixes PR26742.

llvm-svn: 262762

8 years agolto: Start taking symbol visibility into consideration.
Rafael Espindola [Sat, 5 Mar 2016 00:09:37 +0000 (00:09 +0000)]
lto: Start taking symbol visibility into consideration.

llvm-svn: 262761

8 years agoAdd missing triple in my previous commit!
Quentin Colombet [Fri, 4 Mar 2016 23:36:32 +0000 (23:36 +0000)]
Add missing triple in my previous commit!

llvm-svn: 262760

8 years ago[X86] Do not use cmpxchgXXb when we need the base pointer (RBX).
Quentin Colombet [Fri, 4 Mar 2016 23:29:39 +0000 (23:29 +0000)]
[X86] Do not use cmpxchgXXb when we need the base pointer (RBX).
cmpxchgXXb uses RBX as one of its implicit argument. I.e., when
we use that instruction we need to clobber RBX. This is generally
fine, expect when RBX is a reserved register because in that case,
the register allocator will not track its value and will not
save and restore it when interferences occur.

rdar://problem/24851412

llvm-svn: 262759

8 years ago[x86] add tests for masked loads with constant masks
Sanjay Patel [Fri, 4 Mar 2016 23:28:07 +0000 (23:28 +0000)]
[x86] add tests for masked loads with constant masks

llvm-svn: 262758

8 years ago[libfuzzer] adding std:string to allowed adaptable argument.
Mike Aizatsky [Fri, 4 Mar 2016 23:18:01 +0000 (23:18 +0000)]
[libfuzzer] adding std:string to allowed adaptable argument.

llvm-svn: 262757

8 years agoFix build breakage
David Majnemer [Fri, 4 Mar 2016 23:02:15 +0000 (23:02 +0000)]
Fix build breakage

llvm-svn: 262756

8 years ago[X86] Support cleaning more than 2**16 bytes of stack
David Majnemer [Fri, 4 Mar 2016 22:56:17 +0000 (22:56 +0000)]
[X86] Support cleaning more than 2**16 bytes of stack

The x86 ret instruction has a 16 bit immediate indicating how many bytes
to pop off of the stack beyond the return address.

There is a problem when extremely large structs are passed by value: we
might not be able to fit the number of bytes to pop into the return
instruction.

To fix this, expand RET_FLAG a little later and use a special sequence
to clean the stack:

pop  %ecx     ; return address is now in %ecx
add  $n, %esp ; clean the stack
push %ecx     ; bring the return address back on the stack
ret           ; pop the return address and jmp to it's value

llvm-svn: 262755

8 years ago[libFuzzer] log less when re-loading files; fix a silly bug: when running single...
Kostya Serebryany [Fri, 4 Mar 2016 22:35:40 +0000 (22:35 +0000)]
[libFuzzer] log less when re-loading files; fix a silly bug: when running single files actually run all of them, not just the first one

llvm-svn: 262754

8 years agoUpdate diagnostics now that hexadecimal literals look likely to be part of C++17.
Richard Smith [Fri, 4 Mar 2016 22:32:06 +0000 (22:32 +0000)]
Update diagnostics now that hexadecimal literals look likely to be part of C++17.

llvm-svn: 262753

8 years agoPR5941 - improve diagnostic for * vs & confusion when choosing overload candidate...
David Blaikie [Fri, 4 Mar 2016 22:29:11 +0000 (22:29 +0000)]
PR5941 - improve diagnostic for * vs & confusion when choosing overload candidate with a parameter of incomplete (ref or pointer) type

Reviewers: dblaikie

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

llvm-svn: 262752

8 years ago[LVI] Fix a bug which prevented use of !range metadata within a query
Philip Reames [Fri, 4 Mar 2016 22:27:39 +0000 (22:27 +0000)]
[LVI] Fix a bug which prevented use of !range metadata within a query

The diff is relatively large since I took a chance to rearrange the code I had to touch in a more obvious way, but the key bit is merely using the !range metadata when we can't analyze the instruction further.  The previous !range metadata code was essentially just dead since no binary operator or cast will have !range metadata (per Verifier) and it was otherwise dropped on the floor.

llvm-svn: 262751

8 years ago[PGO] Add a commandline option to control number of the VP annotation metadata.
Rong Xu [Fri, 4 Mar 2016 22:08:44 +0000 (22:08 +0000)]
[PGO] Add a commandline option to control number of the VP annotation metadata.

llvm-svn: 262750

8 years agoclang-cl: Enable PCH flags by default.
Nico Weber [Fri, 4 Mar 2016 21:59:42 +0000 (21:59 +0000)]
clang-cl: Enable PCH flags by default.

Now that pragma comment and pragma detect_mismatch are implemented, this might
just work.

Some pragmas aren't serialized yet (from the top of my head: code_seg, bss_seg,
data_seg, const_seg, init_seg, section, vtordisp), but these are as far as I
know usually pushed and popped within the header and usually don't leak out.
If it turns out the current PCH support isn't good enough yet, we can turn it
off again.

llvm-svn: 262749

8 years agoRefactor target independent code.
Rafael Espindola [Fri, 4 Mar 2016 21:37:09 +0000 (21:37 +0000)]
Refactor target independent code.

The rules for when we can relax tls relocations are target independent.
The only things that are target dependent are the relocation values.

llvm-svn: 262748

8 years agoImplement P0036R0: remove support for empty unary folds of +, *, |, &.
Richard Smith [Fri, 4 Mar 2016 21:27:21 +0000 (21:27 +0000)]
Implement P0036R0: remove support for empty unary folds of +, *, |, &.

llvm-svn: 262747

8 years ago[DAGCombine] Fix divrem combine not to assume div/rem type is simple.
Michael Kuperstein [Fri, 4 Mar 2016 21:23:29 +0000 (21:23 +0000)]
[DAGCombine] Fix divrem combine not to assume div/rem type is simple.

The divrem combine assumed the type of the div/rem is simple, which isn't
necessarily true. This probably worked fine until r250825, since it only
saw legal types, but now breaks when it runs as a pre-type-legalization
combine.

This fixes PR26835.

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

llvm-svn: 262746

8 years agoFix new gold test to specify emulation mode.
Teresa Johnson [Fri, 4 Mar 2016 21:19:08 +0000 (21:19 +0000)]
Fix new gold test to specify emulation mode.

The thinlto_linkonceresolution.ll gold linker test introduced in r262727
included a target triple, but didn't set the emulation mode, which is
necessary since the default linker target may be different.

Patch by H.J. Lu

llvm-svn: 262745

8 years agoRevert r262741 - [OPENMP] Codegen for distribute directive
Samuel Antao [Fri, 4 Mar 2016 21:02:14 +0000 (21:02 +0000)]
Revert r262741 - [OPENMP] Codegen for distribute directive

Was causing a failure in one of the buildbot slaves.

llvm-svn: 262744

8 years agoUpdate cxx_status with likely new features from Jacksonville WG21 meeting.
Richard Smith [Fri, 4 Mar 2016 21:01:14 +0000 (21:01 +0000)]
Update cxx_status with likely new features from Jacksonville WG21 meeting.

llvm-svn: 262743

8 years agoSwitch krait to use -mcpu=cortex-a15 for assembler tool invocations.
Stephen Hines [Fri, 4 Mar 2016 20:57:22 +0000 (20:57 +0000)]
Switch krait to use -mcpu=cortex-a15 for assembler tool invocations.

Summary:
Using -no-integrated-as causes -mcpu=krait to be transformed into
-march=armv7-a today. This precludes the assembler from using
instructions like sdiv, which are present for krait. Cortex-a15 is the
closest subset of functionality for krait, so we should switch the
assembler to use that instead.

Reviewers: cfe-commits, apazos, weimingz

Subscribers: aemerson

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

llvm-svn: 262742

8 years ago[OPENMP] Codegen for distribute directive
Carlo Bertolli [Fri, 4 Mar 2016 20:24:58 +0000 (20:24 +0000)]
[OPENMP] Codegen for distribute directive

This patch provide basic implementation of codegen for teams directive, excluding all clauses except dist_schedule. It also fixes parts of AST reader/writer to enable correct pre-compiled header handling.

http://reviews.llvm.org/D17170

llvm-svn: 262741

8 years ago[WebAssembly] Add another possible code-size optimization to README.txt
Dan Gohman [Fri, 4 Mar 2016 20:09:57 +0000 (20:09 +0000)]
[WebAssembly] Add another possible code-size optimization to README.txt

llvm-svn: 262740

8 years agoUpdate after r262737 in clang changed the accessor.
James Y Knight [Fri, 4 Mar 2016 19:30:53 +0000 (19:30 +0000)]
Update after r262737 in clang changed the accessor.

llvm-svn: 262739

8 years ago[ARM] Merging 64-bit divmod lib calls into one
Renato Golin [Fri, 4 Mar 2016 19:19:36 +0000 (19:19 +0000)]
[ARM] Merging 64-bit divmod lib calls into one

When div+rem calls on the same arguments are found, the ARM back-end merges the
two calls into one __aeabi_divmod call for up to 32-bits values. However,
for 64-bit values, which also have a lib call (__aeabi_ldivmod), it wasn't
merging the calls, and thus calling ldivmod twice and spilling the temporary
results, which generated pretty bad code.

This patch legalises 64-bit lib calls for divmod, so that now all the spilling
and the second call are gone. It also relaxes the DivRem combiner a bit on the
legal type check, since it was already checking for isLegalOrCustom on every
value, so the extra check for isTypeLegal was redundant.

Second attempt, creating TLI.isOperationCustom like isOperationExpand, to make
sure we only emit valid types or the ones that were explicitly marked as custom.
Now, passing check-all and test-suite on x86, ARM and AArch64.

This patch fixes PR17193 (and a long time FIXME in the tests).

llvm-svn: 262738

8 years agoMake TargetInfo store an actual DataLayout instead of a string.
James Y Knight [Fri, 4 Mar 2016 19:00:41 +0000 (19:00 +0000)]
Make TargetInfo store an actual DataLayout instead of a string.

Use it to calculate UserLabelPrefix, instead of specifying it (often
incorrectly).

Note that the *actual* user label prefix has always come from the
DataLayout, and is handled within LLVM. The main thing clang's
TargetInfo::UserLabelPrefix did was to set the #define value. Having
these be different from each-other is just silly.

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

llvm-svn: 262737

8 years ago[PGO] Add API to check compatibility of profile data in buffer
Xinliang David Li [Fri, 4 Mar 2016 18:58:30 +0000 (18:58 +0000)]
[PGO] Add API to check compatibility of profile data in buffer

This is needed by client which uses in-process merge API.

llvm-svn: 262736

8 years agoAdd a comment about _DYNAMIC.
Rui Ueyama [Fri, 4 Mar 2016 18:34:14 +0000 (18:34 +0000)]
Add a comment about _DYNAMIC.

llvm-svn: 262735

8 years agoFix api visibility
Xinliang David Li [Fri, 4 Mar 2016 18:33:49 +0000 (18:33 +0000)]
Fix api visibility

llvm-svn: 262734

8 years ago[ubsan/float-cast-overflow] Make the test also work with C++11 narrowing
Filipe Cabecinhas [Fri, 4 Mar 2016 18:33:44 +0000 (18:33 +0000)]
[ubsan/float-cast-overflow] Make the test also work with C++11 narrowing

llvm-svn: 262733

8 years agoAMDGPU/SI: Add support for spiling SGPRs to scratch buffer
Tom Stellard [Fri, 4 Mar 2016 18:31:18 +0000 (18:31 +0000)]
AMDGPU/SI: Add support for spiling SGPRs to scratch buffer

Summary:
This is necessary for when we run out of VGPRs and can no
longer use v_{read,write}_lane for spilling SGPRs.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 262732

8 years agoFix bot failure from r262721: unintented change in gold-plugin save-temps
Teresa Johnson [Fri, 4 Mar 2016 18:16:00 +0000 (18:16 +0000)]
Fix bot failure from r262721: unintented change in gold-plugin save-temps

The split code gen task ID should not be appended to save-temps output
file when the parallelism factor is 1 (not actually splitting).

llvm-svn: 262731

8 years ago[Statepoint docs] Delete trailing whitespace
Sanjoy Das [Fri, 4 Mar 2016 18:14:09 +0000 (18:14 +0000)]
[Statepoint docs] Delete trailing whitespace

llvm-svn: 262730

8 years ago[analyzer] Add diagnostic in ObjCDeallocChecker for use of -dealloc instead of -release.
Devin Coughlin [Fri, 4 Mar 2016 18:09:58 +0000 (18:09 +0000)]
[analyzer] Add diagnostic in ObjCDeallocChecker for use of -dealloc instead of -release.

In dealloc methods, the analyzer now warns when -dealloc is called directly on
a synthesized retain/copy ivar instead of -release. This is intended to find mistakes of
the form:

- (void)dealloc {
  [_ivar dealloc]; // Mistaken call to -dealloc instead of -release

  [super dealloc];
}

rdar://problem/16227989

llvm-svn: 262729

8 years agoAMDGPU/SI: Enable frame index scavenging during PrologEpilogueInserter
Tom Stellard [Fri, 4 Mar 2016 18:02:01 +0000 (18:02 +0000)]
AMDGPU/SI: Enable frame index scavenging during PrologEpilogueInserter

Summary:
This allows us to use virtual registers when we need extra registers
for inserting spill instructions in SIRegisterInfo:eliminateFrameIndex().

Once all the frame indices have been eliminated, the
PrologEpilogueInserter does an extra pass over the program to replace
all virtual registers with physical ones.

This allows us to make more efficient use of our emergency spill slots,
so we only need to create one.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 262728

8 years ago[ThinLTO] Ensure prevailing linkonce emitted as weak in ThinLTO backends
Teresa Johnson [Fri, 4 Mar 2016 17:48:35 +0000 (17:48 +0000)]
[ThinLTO] Ensure prevailing linkonce emitted as weak in ThinLTO backends

Summary:
Since IR files are all compiled into separate independent object files
in ThinLTO mode, the prevailing linkonce symbols must be emitted in its
object file even if it is no longer referenced there, e.g. if no
references remain in the module after inlining, since it may be
referenced by another ThinLTO compiled object file. This is done by
changing LDPR_PREVAILING_DEF_IRONLY* symbols to LDPR_PREVAILING_DEF,
which converts the prevailing linkonce to weak. We also don't need the
other prevailing IRONLY handling for internalization, which is not
currently performed for ThinLTO.

Test case included.

Reviewers: davidxl, rafael

Subscribers: rafael, joker.eph, llvm-commits

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

llvm-svn: 262727

8 years ago[Hexagon] Fix lowering of calls with the return type of i1
Krzysztof Parzyszek [Fri, 4 Mar 2016 17:38:05 +0000 (17:38 +0000)]
[Hexagon] Fix lowering of calls with the return type of i1

This fixes an assertion in test/CodeGen/Hexagon/ifcvt-edge-weight.ll
when run with -debug-only=isel

llvm-svn: 262726

8 years ago[mips][microMIPS] Prevent usage of OR16_MMR6 instruction when code for microMIPS...
Zoran Jovanovic [Fri, 4 Mar 2016 17:34:31 +0000 (17:34 +0000)]
[mips][microMIPS] Prevent usage of OR16_MMR6 instruction when code for microMIPS is generated.

Author: milena.vujosevic.janicic
Reviewers: dsanders
Differential Revision: http://reviews.llvm.org/D17373

llvm-svn: 262725

8 years ago[ThinLTO] Launch importing backends in parallel threads from gold plugin
Teresa Johnson [Fri, 4 Mar 2016 17:06:02 +0000 (17:06 +0000)]
[ThinLTO] Launch importing backends in parallel threads from gold plugin

Summary:
Launch ThinLTO backends (LTO and codegen pipelines with importing) in
parallel using a ThreadPool, after creating the combined index.
The number of threads is controlled by the existing -jobs gold plugin
option, or the hardware concurrency if not specified.

The old behavior of exiting after creating the combined index can be
invoked via a new thinlto-index-only plugin option.

This commit involves just the ThinLTO-specific pieces of D15390, the NFC
and other restructuring pieces were committed independently:
  r262677: Add hardware_concurrency interface to llvm::thread (NFC)
  r262719: Change split code gen to use ThreadPool
  r262721: Refactor gold-plugin codegen to prepare for ThinLTO threads (NFC)

Reviewers: pcc, joker.eph, rafael

Subscribers: rafael, davidxl, llvm-commits, joker.eph

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

llvm-svn: 262724

8 years ago[ubsan/cmake] Make sure we end up adding -frtti to ubsan_type_hash_itanium.cc, even...
Filipe Cabecinhas [Fri, 4 Mar 2016 17:02:06 +0000 (17:02 +0000)]
[ubsan/cmake] Make sure we end up adding -frtti to ubsan_type_hash_itanium.cc, even if -fno-rtti is the default for the platform

llvm-svn: 262723

8 years agoRefactor gold-plugin codegen to prepare for ThinLTO threads (NFC)
Teresa Johnson [Fri, 4 Mar 2016 16:36:06 +0000 (16:36 +0000)]
Refactor gold-plugin codegen to prepare for ThinLTO threads (NFC)

This is the NFC part remaining from D15390, which refactors the
current codegen() into a CodeGen class with various modular methods and
other helper functions that will be used by the follow-on ThinLTO piece.

llvm-svn: 262721

8 years agoRefactor duplicated code.
Rafael Espindola [Fri, 4 Mar 2016 16:14:19 +0000 (16:14 +0000)]
Refactor duplicated code.

llvm-svn: 262720

8 years agoChange split code gen to use ThreadPool
Teresa Johnson [Fri, 4 Mar 2016 15:39:13 +0000 (15:39 +0000)]
Change split code gen to use ThreadPool

Part of D15390.

llvm-svn: 262719

8 years ago[X86][AVX512] Added some basic X86ISD::VPERMV3 shuffle combining tests
Simon Pilgrim [Fri, 4 Mar 2016 15:19:42 +0000 (15:19 +0000)]
[X86][AVX512] Added some basic X86ISD::VPERMV3 shuffle combining tests

None of these actually combine yet as we haven't enabled X86ISD::VPERMV3 for target shuffle combining

llvm-svn: 262718

8 years agoReducing stack usage of test
Ben Craig [Fri, 4 Mar 2016 14:25:13 +0000 (14:25 +0000)]
Reducing stack usage of test

This test has a lot of classes with large amounts of manually inserted padding in them, presumably to prevent various optimizations. The test then creates lots of these objects on the stack. On embedded targets, this was usually enough to overflow the stack.

I moved the objects to global / namespace scope. Since the tests are each in their own namespace, there should be no cross-test conflicts.

llvm-svn: 262717

8 years agoMove class into anonymous namespace. NFC.
Benjamin Kramer [Fri, 4 Mar 2016 14:18:52 +0000 (14:18 +0000)]
Move class into anonymous namespace. NFC.

llvm-svn: 262716

8 years agoAdd a log statement
Pavel Labath [Fri, 4 Mar 2016 12:43:05 +0000 (12:43 +0000)]
Add a log statement

llvm-svn: 262715

8 years agoTest commit access
Sam Kolton [Fri, 4 Mar 2016 12:29:14 +0000 (12:29 +0000)]
Test commit access

llvm-svn: 262714

8 years agoResumbit "Fetch remote log files from LLGS tests"
Pavel Labath [Fri, 4 Mar 2016 11:27:00 +0000 (11:27 +0000)]
Resumbit "Fetch remote log files from LLGS tests"

The problem with the original patch (and my first attempt to fix) was that the value debug
monitor flags could persist from one test to another. Resetting the value in the setUp() function
fixes the problem.

llvm-svn: 262713

8 years agoFix warning in IRExecutionUnit.cpp
Pavel Labath [Fri, 4 Mar 2016 11:26:56 +0000 (11:26 +0000)]
Fix warning in IRExecutionUnit.cpp

llvm-svn: 262712

8 years agoAdd reverse file remapping for breakpoint set
Tamas Berghammer [Fri, 4 Mar 2016 11:26:44 +0000 (11:26 +0000)]
Add reverse file remapping for breakpoint set

LLDB can remap a source file to a new directory based on the
"target.sorce-map" to handle the usecase when the source code moved
between the compliation and the debugging. Previously the remapping
was only used to display the content of the file. This CL fixes the
scenario when a breakpoint is set based on the new an absolute path
with adding an inverse remapping step before looking up the breakpoint
location.

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

llvm-svn: 262711

8 years ago[X86][SSSE3] Added combine test for unary shuffle (pshufb) only referencing elements...
Simon Pilgrim [Fri, 4 Mar 2016 11:15:23 +0000 (11:15 +0000)]
[X86][SSSE3] Added combine test for unary shuffle (pshufb) only referencing elements from the second input of a binary shuffle (punpcklbw)

llvm-svn: 262710

8 years agotest commit
Valery Pykhtin [Fri, 4 Mar 2016 10:59:50 +0000 (10:59 +0000)]
test commit

llvm-svn: 262709

8 years ago[ELF][MIPS] Factor out the code reading and sign-extending low 16-bits of 32-bit...
Simon Atanasyan [Fri, 4 Mar 2016 10:55:29 +0000 (10:55 +0000)]
[ELF][MIPS] Factor out the code reading and sign-extending low 16-bits of 32-bit word. NFC

llvm-svn: 262708

8 years ago[ELF][MIPS] Factor out the code writing relocation result into low 16-bit of destinat...
Simon Atanasyan [Fri, 4 Mar 2016 10:55:24 +0000 (10:55 +0000)]
[ELF][MIPS] Factor out the code writing relocation result into low 16-bit of destination. NFC

llvm-svn: 262707

8 years ago[ELF][MIPS] Factor out the code reading and calculating AHL addend into the separate...
Simon Atanasyan [Fri, 4 Mar 2016 10:55:20 +0000 (10:55 +0000)]
[ELF][MIPS] Factor out the code reading and calculating AHL addend into the separate function. NFC

llvm-svn: 262706

8 years ago[ELF][MIPS] Use writeMipsHi16 to apply result of R_MIPS_PCHI16 relocation. NFC
Simon Atanasyan [Fri, 4 Mar 2016 10:55:16 +0000 (10:55 +0000)]
[ELF][MIPS] Use writeMipsHi16 to apply result of R_MIPS_PCHI16 relocation. NFC

llvm-svn: 262705

8 years ago[ELF][MIPS] Replace S and A arguments of the writeMipsHi16 function by the single...
Simon Atanasyan [Fri, 4 Mar 2016 10:55:12 +0000 (10:55 +0000)]
[ELF][MIPS] Replace S and A arguments of the writeMipsHi16 function by the single argument V. NFC

llvm-svn: 262704

8 years ago[ELF][MIPS] s/applyMipsHi16Reloc/writeMipsHi16/ NFC
Simon Atanasyan [Fri, 4 Mar 2016 10:55:04 +0000 (10:55 +0000)]
[ELF][MIPS] s/applyMipsHi16Reloc/writeMipsHi16/ NFC

llvm-svn: 262703

8 years agoMake headers self-contained again.
Benjamin Kramer [Fri, 4 Mar 2016 10:49:30 +0000 (10:49 +0000)]
Make headers self-contained again.

llvm-svn: 262702

8 years agoAMDGPU/SI: add llvm.amdgcn.image.atomic.* intrinsics
Nikolay Haustov [Fri, 4 Mar 2016 10:39:50 +0000 (10:39 +0000)]
AMDGPU/SI: add llvm.amdgcn.image.atomic.* intrinsics

These correspond to IMAGE_ATOMIC_* and are going to be used by Mesa for the
GL_ARB_shader_image_load_store extension.

Initial change by Nicolai H.hnle

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

llvm-svn: 262701

8 years ago[SemaExprCXX] Avoid calling isInSystemHeader for invalid source locations
Pavel Labath [Fri, 4 Mar 2016 10:00:08 +0000 (10:00 +0000)]
[SemaExprCXX] Avoid calling isInSystemHeader for invalid source locations

Summary:
While diagnosing a CXXNewExpr warning, we were calling isInSystemHeader(), which expect to be
called with a valid source location. This causes an assertion failure if the location is unknown.
A quick grep shows it's not without precedent to guard calls to the function with a
"Loc.isValid()".

This fixes a test failure in LLDB, which always creates object with invalid source locations as it
does not (always) have access to the source.

Reviewers: nlewycky

Subscribers: lldb-commits, cfe-commits

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

llvm-svn: 262700