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
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
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
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
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
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
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
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
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
Rui Ueyama [Fri, 4 Mar 2016 18:34:14 +0000 (18:34 +0000)]
Add a comment about _DYNAMIC.
llvm-svn: 262735
Xinliang David Li [Fri, 4 Mar 2016 18:33:49 +0000 (18:33 +0000)]
Fix api visibility
llvm-svn: 262734
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
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
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
Sanjoy Das [Fri, 4 Mar 2016 18:14:09 +0000 (18:14 +0000)]
[Statepoint docs] Delete trailing whitespace
llvm-svn: 262730
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
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
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
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
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
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
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
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
Rafael Espindola [Fri, 4 Mar 2016 16:14:19 +0000 (16:14 +0000)]
Refactor duplicated code.
llvm-svn: 262720
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