platform/upstream/llvm.git
8 years agodocs: Add doxygen mainpage
Tobias Grosser [Mon, 7 Mar 2016 21:17:48 +0000 (21:17 +0000)]
docs: Add doxygen mainpage

(and test if doxygen is updated on-commit)

llvm-svn: 262855

8 years agoAMDGPU: Remove a fixme for ptrrtoint handling
Matt Arsenault [Mon, 7 Mar 2016 21:12:46 +0000 (21:12 +0000)]
AMDGPU: Remove a fixme for ptrrtoint handling

llvm-svn: 262854

8 years agoAMDGPU: Move function only used by R600
Matt Arsenault [Mon, 7 Mar 2016 21:10:13 +0000 (21:10 +0000)]
AMDGPU: Move function only used by R600

llvm-svn: 262853

8 years agoDAGCombiner: Check legality before creating extract_vector_elt
Matt Arsenault [Mon, 7 Mar 2016 21:10:09 +0000 (21:10 +0000)]
DAGCombiner: Check legality before creating extract_vector_elt

Problem not hit by any in tree target.

llvm-svn: 262852

8 years agoModule Debugging: Fix a crash when emitting debug info for nested tag types
Adrian Prantl [Mon, 7 Mar 2016 20:58:52 +0000 (20:58 +0000)]
Module Debugging: Fix a crash when emitting debug info for nested tag types
whose DeclContext is not yet complete by deferring their emission.

rdar://problem/24918680

llvm-svn: 262851

8 years agoTest documentation rebuild
Tobias Grosser [Mon, 7 Mar 2016 20:44:20 +0000 (20:44 +0000)]
Test documentation rebuild

llvm-svn: 262850

8 years agoSelectionDAG: Remove some unused AtomicSDNode constructors. NFC
Justin Bogner [Mon, 7 Mar 2016 20:15:12 +0000 (20:15 +0000)]
SelectionDAG: Remove some unused AtomicSDNode constructors. NFC

llvm-svn: 262849

8 years agoAdd support for common symbols.
Rafael Espindola [Mon, 7 Mar 2016 19:15:57 +0000 (19:15 +0000)]
Add support for common symbols.

llvm-svn: 262848

8 years ago[CLANG][AVX512][BUILTIN] Add builtin vcomi{ss|sd}
Michael Zuckerman [Mon, 7 Mar 2016 19:15:00 +0000 (19:15 +0000)]
[CLANG][AVX512][BUILTIN] Add builtin vcomi{ss|sd}

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

llvm-svn: 262847

8 years agoDo not use "default" for a fully-covered switch.
Rui Ueyama [Mon, 7 Mar 2016 19:06:14 +0000 (19:06 +0000)]
Do not use "default" for a fully-covered switch.

llvm-svn: 262846

8 years agopython binding: expose compile command filename
Guillaume Papin [Mon, 7 Mar 2016 18:44:42 +0000 (18:44 +0000)]
python binding: expose compile command filename

Reviewers: compnerd, skalinichev

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

llvm-svn: 262845

8 years ago[LoopDataPrefetch] If prefetch distance is not set, skip pass
Adam Nemet [Mon, 7 Mar 2016 18:35:42 +0000 (18:35 +0000)]
[LoopDataPrefetch] If prefetch distance is not set, skip pass

This lets select sub-targets enable this pass.  The patch implements the
idea from the recent llvm-dev thread:
http://thread.gmane.org/gmane.comp.compilers.llvm.devel/94925

The goal is to enable the LoopDataPrefetch pass for the Cyclone
sub-target only within Aarch64.

Positive and negative tests will be included in an upcoming patch that
enables selective prefetching of large-strided accesses on Cyclone.

llvm-svn: 262844

8 years ago[ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag...
Marina Yatsina [Mon, 7 Mar 2016 18:11:16 +0000 (18:11 +0000)]
[ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag with curly braces

Until now curly braces could only be used in MS inline assembly to mark block start/end.
All curly braces were removed completely at a very early stage.
This approach caused bugs like:
"m{o}v eax, ebx" turned into "mov eax, ebx" without any error.

In addition, AVX-512 added special operands (e.g., k registers), which are also surrounded by curly braces that mark them as such.
Now, we need to keep the curly braces and identify at a later stage if they are marking block start/end (if so, ignore them), or surrounding special AVX-512 operands (if so, parse them as such).

This patch fixes the bug described above and enables the use of AVX-512 special operands.

This commit is the the llvm part of the patch.
The clang part of the review is: http://reviews.llvm.org/D17766
The llvm part of the review is: http://reviews.llvm.org/D17767

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

llvm-svn: 262843

8 years ago[ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag...
Marina Yatsina [Mon, 7 Mar 2016 18:10:25 +0000 (18:10 +0000)]
[ms-inline-asm][AVX512] Add ability to use k registers in MS inline asm + fix bag with curly braces

Until now curly braces could only be used in MS inline assembly to mark block start/end.
All curly braces were removed completely at a very early stage.
This approach caused bugs like:
"m{o}v eax, ebx" turned into "mov eax, ebx" without any error.

In addition, AVX-512 added special operands (e.g., k registers), which are also surrounded by curly braces that mark them as such.
Now, we need to keep the curly braces and identify at a later stage if they are marking block start/end (if so, ignore them), or surrounding special AVX-512 operands (if so, parse them as such).

This patch fixes the bug described above and enables the use of AVX-512 special operands.

This commit is the the clang part of the patch.
The clang part of the review is: http://reviews.llvm.org/D17766
The llvm part of the review is: http://reviews.llvm.org/D17767

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

llvm-svn: 262842

8 years ago[ScopedNoAliasAA] Make test basic.ll less confusing
Adam Nemet [Mon, 7 Mar 2016 17:49:10 +0000 (17:49 +0000)]
[ScopedNoAliasAA] Make test basic.ll less confusing

Summary:
This testcase had me confused.  It made me believe that you can use
alias scopes and alias scopes list interchangeably with alias.scope and
noalias.  Both langref and the other testcase use scope lists so I went
looking.

Turns out using scope directly only happens to work by chance.  When
ScopedNoAliasAAResult::mayAliasInScopes traverses this as a scope list:

!1 = !{!1, !0, !"some scope"}

, the first entry is in fact a scope but only because the scope is
happened to be defined self-referentially to make it unique globally.

The remaining elements in the tuple (!0, !"some scope") are considered
as scopes but AliasScopeNode::getDomain will just bail on those without
any error.

This change avoids this ambiguity in the test but I've also been
wondering if we should issue some sort of a diagnostics.

Reviewers: dexonsmith, hfinkel

Subscribers: mssimpso, llvm-commits

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

llvm-svn: 262841

8 years agoAdjust the .bss alignment to include common symbols.
Rafael Espindola [Mon, 7 Mar 2016 17:43:39 +0000 (17:43 +0000)]
Adjust the .bss alignment to include common symbols.

llvm-svn: 262840

8 years agoRevert "Enable LoopLoadElimination by default"
Adam Nemet [Mon, 7 Mar 2016 17:38:02 +0000 (17:38 +0000)]
Revert "Enable LoopLoadElimination by default"

This reverts commit r262250.

It causes SPEC2006/gcc to generate wrong result (166.s) in AArch64 when
running with *ref* data set.  The error happens with
"-Ofast -flto -fuse-ld=gold" or "-O3 -fno-strict-aliasing".

llvm-svn: 262839

8 years agoImplement __builtin_eh_return_data_regno for SPARC and SPARC64.
Joerg Sonnenberger [Mon, 7 Mar 2016 17:19:15 +0000 (17:19 +0000)]
Implement __builtin_eh_return_data_regno for SPARC and SPARC64.

llvm-svn: 262838

8 years agoDescribe the magic numbers returned by getEHDataRegisterNumber.
Joerg Sonnenberger [Mon, 7 Mar 2016 17:18:41 +0000 (17:18 +0000)]
Describe the magic numbers returned by getEHDataRegisterNumber.

llvm-svn: 262837

8 years agolto: Record visibility in defined symbols.
Rafael Espindola [Mon, 7 Mar 2016 17:14:36 +0000 (17:14 +0000)]
lto: Record visibility in defined symbols.

llvm-svn: 262835

8 years ago[CLANG][AVX512][BUILTIN] Adding new feature flag headed files and new BUILTIN vpermi2...
Michael Zuckerman [Mon, 7 Mar 2016 17:04:11 +0000 (17:04 +0000)]
[CLANG][AVX512][BUILTIN] Adding new feature flag headed files and new BUILTIN vpermi2varq{i|t}{128|256|512}{mask|maskz}

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

llvm-svn: 262834

8 years ago[OPENMP] Codegen for distribute directive: fix bug in ordering of parameters.
Carlo Bertolli [Mon, 7 Mar 2016 16:19:13 +0000 (16:19 +0000)]
[OPENMP] Codegen for distribute directive: fix bug in ordering of parameters.

llvm-svn: 262833

8 years agoReapply r262741 [OPENMP] Codegen for distribute directive
Carlo Bertolli [Mon, 7 Mar 2016 16:04:49 +0000 (16:04 +0000)]
Reapply r262741 [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: 262832

8 years ago[memdep] Switch to range based for loops.
Chandler Carruth [Mon, 7 Mar 2016 15:12:57 +0000 (15:12 +0000)]
[memdep] Switch to range based for loops.

llvm-svn: 262831

8 years agoResolved Bug 26414.
Amjad Aboud [Mon, 7 Mar 2016 14:22:46 +0000 (14:22 +0000)]
Resolved Bug 26414.
https://llvm.org/bugs/show_bug.cgi?id=26414
Since interrupt handler must be returned with iret, tail call can't be used.

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

llvm-svn: 262830

8 years ago[DFSan] Remove an overly aggressive assert reported in PR26068.
Chandler Carruth [Mon, 7 Mar 2016 14:05:09 +0000 (14:05 +0000)]
[DFSan] Remove an overly aggressive assert reported in PR26068.

This code has been successfully used to bootstrap libc++ in a no-asserts
mode for a very long time, so the code that follows cannot be completely
incorrect. I've added a test that shows the current behavior for this
kind of code with DFSan. If it is desirable for DFSan to do something
special when processing an invoke of a variadic function, it can be
added, but we shouldn't keep an assert that we've been ignoring due to
release builds anyways.

llvm-svn: 262829

8 years ago[sanitizer-common] Use @LINE in test.
Filipe Cabecinhas [Mon, 7 Mar 2016 13:44:20 +0000 (13:44 +0000)]
[sanitizer-common] Use @LINE in test.

llvm-svn: 262828

8 years ago[Fix r262785] Fix missing declaration when COMPILER_RT_BOOL_CMPXCHG was used but...
Filipe Cabecinhas [Mon, 7 Mar 2016 13:42:17 +0000 (13:42 +0000)]
[Fix r262785] Fix missing declaration when COMPILER_RT_BOOL_CMPXCHG was used but InstrProfilingUtil.h wasn't included.

Also fixed declaration which still had the pre-r262788 name.

llvm-svn: 262827

8 years ago[memdep] Switch a function to return true on success instead of false.
Chandler Carruth [Mon, 7 Mar 2016 12:45:07 +0000 (12:45 +0000)]
[memdep] Switch a function to return true on success instead of false.

This is much more clear and less surprising IMO. It also makes things
more consistent with the increasingly large chunk of LLVM code that
assumes true-on-success.

llvm-svn: 262826

8 years ago[memdep] Cleanup the implementation doxygen comments and remove
Chandler Carruth [Mon, 7 Mar 2016 12:30:06 +0000 (12:30 +0000)]
[memdep] Cleanup the implementation doxygen comments and remove
duplicated comments.

In several cases these had diverged making them especially nice to
canonicalize. I checked to make sure we weren't losing important
information of course.

llvm-svn: 262825

8 years ago[memdep] Finish cleaning up all of the comments' doxygen.
Chandler Carruth [Mon, 7 Mar 2016 11:27:56 +0000 (11:27 +0000)]
[memdep] Finish cleaning up all of the comments' doxygen.

llvm-svn: 262824

8 years ago[memdep] Switch from a hacky use of PointerIntPair and poorly chosen
Chandler Carruth [Mon, 7 Mar 2016 11:04:46 +0000 (11:04 +0000)]
[memdep] Switch from a hacky use of PointerIntPair and poorly chosen
arbitrary integers cast to Instruction pointers to a sum type over
Instruction * and a PointerEmbeddedInt.

No functionality changed.

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

llvm-svn: 262823

8 years ago[memdep] Update the comments' doxygen style and place them more clearly.
Chandler Carruth [Mon, 7 Mar 2016 10:35:02 +0000 (10:35 +0000)]
[memdep] Update the comments' doxygen style and place them more clearly.

Just cleaning this up, no functionality changed. Next up will be moving
it to use the sum type instead of arbitrary "pointer"-like enums.

llvm-svn: 262822

8 years ago[memdep] Run clang-format over the header before porting it to
Chandler Carruth [Mon, 7 Mar 2016 10:19:30 +0000 (10:19 +0000)]
[memdep] Run clang-format over the header before porting it to
the new pass manager.

The port will involve substantial edits here, and would likely introduce
bad formatting if formatted in isolation, so just get all the formatting
up to snuff. I'll also go through and try to freshen the doxygen here as
well as modernizing some of the code.

llvm-svn: 262821

8 years ago[CLANG][AVX512][BUILTIN] Adding new feature flag header file and new builtin vpmadd52...
Michael Zuckerman [Mon, 7 Mar 2016 09:55:55 +0000 (09:55 +0000)]
[CLANG][AVX512][BUILTIN] Adding new feature flag header file and new builtin vpmadd52{h|l}uq{128|256|512}{mask|maskz}

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

llvm-svn: 262820

8 years ago[LLDB][MIPS] Fix TestDisassembleBreakpoint
Mohit K. Bhakkad [Mon, 7 Mar 2016 09:12:49 +0000 (09:12 +0000)]
[LLDB][MIPS] Fix TestDisassembleBreakpoint

Patch by Nitesh Jain

Reviewers: clayborg, jaydeep.
Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits.
Differential Revision: http://reviews.llvm.org/D17597

llvm-svn: 262819

8 years ago[MS ABI] Mangle symbols names longer than 4096 characters correctly
David Majnemer [Mon, 7 Mar 2016 08:51:17 +0000 (08:51 +0000)]
[MS ABI] Mangle symbols names longer than 4096 characters correctly

Really long symbols are hashed using MD5 and prefixed/suffixed with the
usual sigils.  There is an additional reason beyond the usual
compatibility with MSVC, it is important to keep COFF symbols shorter
than 0xFFFF because the CodeView debugging format has a maximum
symbol/record size of 0xFFFF.

There are some quirks worth noting:
- Some mangled names reference other entities which are mangled
separately.  A quick example:

int I;
template <int *> struct S {};
S<I> s;

In this case, the mangling for 's' doesn't depend directly on the
mangling for 'I'.  While 's' would need an MD5 hash if 'I' also needed
one, the hash for 's' applied to the fully realized mangled name.  In
other words, the mangled name for 's' will not depend on the MD5 of the
mangled name for 'I'.

- Some mangled names, like the venerable CatchableType, embed the MD5
verbatim.

- Finally, the complete object locator is handled as a special case.
A complete object locators are mangled exactly like a VFTable except for
a small deviation in the prefix sigils.  However, complete object
locators for hashed vftables result in a complete object locator whose
name is identical to the vftable except for an additional suffix.

llvm-svn: 262818

8 years ago[CLANG][AVX512][BUILTIN] Adding vpmultishiftqb{128|256|512}
Michael Zuckerman [Mon, 7 Mar 2016 08:29:10 +0000 (08:29 +0000)]
[CLANG][AVX512][BUILTIN] Adding vpmultishiftqb{128|256|512}

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

llvm-svn: 262817

8 years agoMove SBLanguageRuntime.cpp from the lldb-core group to the LLDB
Jason Molenda [Mon, 7 Mar 2016 08:04:49 +0000 (08:04 +0000)]
Move SBLanguageRuntime.cpp from the lldb-core group to the LLDB
group to fix a build time issue.
<rdar://problem/24287153>

llvm-svn: 262816

8 years ago[CodeGen] Add space-optimized EmitMergeInputChains1_2 to the DAG isel matching tables...
Craig Topper [Mon, 7 Mar 2016 07:29:12 +0000 (07:29 +0000)]
[CodeGen] Add space-optimized EmitMergeInputChains1_2 to the DAG isel matching tables. Shaves about 5100 bytes from the X86 matcher table. NFC

llvm-svn: 262815

8 years ago[powerpc] mark setuid.c and setuid2.c as unsupported
Bill Seurer [Mon, 7 Mar 2016 01:30:02 +0000 (01:30 +0000)]
[powerpc] mark setuid.c and setuid2.c as unsupported

setuid(0) hangs on powerpc64 big endian.  When this is fixed remove
the unsupported flag.

https://llvm.org/bugs/show_bug.cgi?id=25799

llvm-svn: 262814

8 years agoSplit BitcodeFile::parse. NFC.
Rui Ueyama [Mon, 7 Mar 2016 00:54:17 +0000 (00:54 +0000)]
Split BitcodeFile::parse. NFC.

llvm-svn: 262813

8 years agoAdd a new insert_as() method to DenseMap and use it for ConstantUniqueMap
Mehdi Amini [Mon, 7 Mar 2016 00:51:00 +0000 (00:51 +0000)]
Add a new insert_as() method to DenseMap and use it for ConstantUniqueMap

Just like the existing find_as() method, the new insert_as() accepts
an extra parameter which is used as a key to find the bucket in the
map.
When creating a Constant, we want to check the map before actually
creating the object. In this case we have to perform two queries to
the map, and this extra parameter can save recomputing the hash value
for the second query.

This is a reapply of r260458, that was reverted because it was
suspected to be the cause of instability of an internal bot, but
wasn't confirmed.

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262812

8 years agoBitcode reader: Inline readAbbreviatedField in readRecord and move the enclosing...
Mehdi Amini [Mon, 7 Mar 2016 00:38:09 +0000 (00:38 +0000)]
Bitcode reader: Inline readAbbreviatedField in readRecord and move the enclosing loop in each case (NFC)

Summary: This make readRecord 20% faster, measured on an LTO build

Reviewers: rafael

Subscribers: llvm-commits

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262811

8 years agoRevert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check...
NAKAMURA Takumi [Mon, 7 Mar 2016 00:13:09 +0000 (00:13 +0000)]
Revert r130657, "Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries."

We may assume the type of 1st argument as PCSTR in PENUMLOADED_MODULES_CALLBACK. PSTR was in the ancient mingw32.

llvm-svn: 262810

8 years ago[X86][AVX512] Fixed VPERMT2* shuffle mask decoding and enabled target shuffle combining.
Simon Pilgrim [Sun, 6 Mar 2016 21:54:52 +0000 (21:54 +0000)]
[X86][AVX512] Fixed VPERMT2* shuffle mask decoding and enabled target shuffle combining.

Patch to add support for target shuffle combining of X86ISD::VPERMV3 nodes, including support for detecting unary shuffles.

This uncovered several issues with the X86ISD::VPERMV3 shuffle mask decoding of non-64 bit shuffle mask elements - the bit masking wasn't being correctly computed.

Removed non-constant pool mask decode path as we have no way of testing it right now.

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

llvm-svn: 262809

8 years ago[AMDGPU] Using table-driven amd_kernel_code_t field parser in assembler.
Valery Pykhtin [Sun, 6 Mar 2016 20:25:36 +0000 (20:25 +0000)]
[AMDGPU] Using table-driven amd_kernel_code_t field parser in assembler.

Engages code from r262804.

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

llvm-svn: 262808

8 years agoUpdate with work items passed in Jacksonville
Marshall Clow [Sun, 6 Mar 2016 17:45:24 +0000 (17:45 +0000)]
Update with work items passed in Jacksonville

llvm-svn: 262807

8 years ago[ASTMatchers] Document that isAnyPointer() matcher also matches Objective-C object...
Felix Berger [Sun, 6 Mar 2016 15:27:59 +0000 (15:27 +0000)]
[ASTMatchers] Document that isAnyPointer() matcher also matches Objective-C object pointers.

Summary: Add test for Objective-C object pointer matching.

Reviewers: aaron.ballman

Subscribers: klimek

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

llvm-svn: 262806

8 years agofix sanitizer-ppc64be-linux failure for r262804
Valery Pykhtin [Sun, 6 Mar 2016 15:13:54 +0000 (15:13 +0000)]
fix sanitizer-ppc64be-linux failure for r262804

error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]

http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/930

llvm-svn: 262805

8 years ago[AMDGPU] table-driven parser/printer for amd_kernel_code_t structure fields
Valery Pykhtin [Sun, 6 Mar 2016 13:27:13 +0000 (13:27 +0000)]
[AMDGPU] table-driven parser/printer for amd_kernel_code_t structure fields

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

llvm-svn: 262804

8 years agoAVX512BW: Support llvm intrinsic masked vector load/store for i8/i16 element types...
Igor Breger [Sun, 6 Mar 2016 12:38:58 +0000 (12:38 +0000)]
AVX512BW: Support llvm intrinsic masked vector load/store for i8/i16 element types on SKX

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

llvm-svn: 262803

8 years agoFix typo.
Wilfred Hughes [Sun, 6 Mar 2016 12:37:34 +0000 (12:37 +0000)]
Fix typo.

llvm-svn: 262802

8 years ago[AMDGPU] SOPxx instructions operand naming fixed in td files.
Valery Pykhtin [Sun, 6 Mar 2016 10:31:44 +0000 (10:31 +0000)]
[AMDGPU] SOPxx instructions operand naming fixed in td files.

dst -> sdst
ssrcN -> srcN

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

llvm-svn: 262801

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