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
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
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
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
Rafael Espindola [Mon, 7 Mar 2016 17:43:39 +0000 (17:43 +0000)]
Adjust the .bss alignment to include common symbols.
llvm-svn: 262840
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
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
Joerg Sonnenberger [Mon, 7 Mar 2016 17:18:41 +0000 (17:18 +0000)]
Describe the magic numbers returned by getEHDataRegisterNumber.
llvm-svn: 262837
Rafael Espindola [Mon, 7 Mar 2016 17:14:36 +0000 (17:14 +0000)]
lto: Record visibility in defined symbols.
llvm-svn: 262835
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
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
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
Chandler Carruth [Mon, 7 Mar 2016 15:12:57 +0000 (15:12 +0000)]
[memdep] Switch to range based for loops.
llvm-svn: 262831
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
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
Filipe Cabecinhas [Mon, 7 Mar 2016 13:44:20 +0000 (13:44 +0000)]
[sanitizer-common] Use @LINE in test.
llvm-svn: 262828
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Rui Ueyama [Mon, 7 Mar 2016 00:54:17 +0000 (00:54 +0000)]
Split BitcodeFile::parse. NFC.
llvm-svn: 262813
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
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
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
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
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
Marshall Clow [Sun, 6 Mar 2016 17:45:24 +0000 (17:45 +0000)]
Update with work items passed in Jacksonville
llvm-svn: 262807
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
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
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
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
Wilfred Hughes [Sun, 6 Mar 2016 12:37:34 +0000 (12:37 +0000)]
Fix typo.
llvm-svn: 262802
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
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
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
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
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
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
George Rimar [Sun, 6 Mar 2016 06:16:05 +0000 (06:16 +0000)]
Fixed formatting issues in AArch64 target methods. NFC.
llvm-svn: 262795
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
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
Xinliang David Li [Sun, 6 Mar 2016 04:56:55 +0000 (04:56 +0000)]
cleanup: remove dead preprocessing branch /nfc
llvm-svn: 262792
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
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
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
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
Alexander Kornienko [Sun, 6 Mar 2016 04:05:59 +0000 (04:05 +0000)]
[docs] Clean up doxygen comments a bit.
llvm-svn: 262787
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
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
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
Simon Pilgrim [Sat, 5 Mar 2016 22:35:55 +0000 (22:35 +0000)]
Fixed -Wdocumentation warning - typo in a parameter name
llvm-svn: 262783
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
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
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
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
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
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
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
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
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
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
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
JF Bastien [Sat, 5 Mar 2016 14:22:02 +0000 (14:22 +0000)]
libc++: fix typo
llvm-svn: 262771
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
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
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
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
Matthias Braun [Sat, 5 Mar 2016 04:36:08 +0000 (04:36 +0000)]
RegisterPressure: Small cleanup
llvm-svn: 262766
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
Mike Spertus [Sat, 5 Mar 2016 01:56:07 +0000 (01:56 +0000)]
Test commit: Fix run-on sentence in comment
llvm-svn: 262764
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
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
Rafael Espindola [Sat, 5 Mar 2016 00:09:37 +0000 (00:09 +0000)]
lto: Start taking symbol visibility into consideration.
llvm-svn: 262761
Quentin Colombet [Fri, 4 Mar 2016 23:36:32 +0000 (23:36 +0000)]
Add missing triple in my previous commit!
llvm-svn: 262760
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
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
Mike Aizatsky [Fri, 4 Mar 2016 23:18:01 +0000 (23:18 +0000)]
[libfuzzer] adding std:string to allowed adaptable argument.
llvm-svn: 262757
David Majnemer [Fri, 4 Mar 2016 23:02:15 +0000 (23:02 +0000)]
Fix build breakage
llvm-svn: 262756
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
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
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
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
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
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
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
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
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
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
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
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