Lang Hames [Wed, 16 Nov 2016 17:31:09 +0000 (17:31 +0000)]
[Orc] Re-enable the RPC unit test disabled in r286917.
This unit test infinite-looped on s390x due to a thread_yield being optimized
out. I've updated the QueueChannel class (where thread_yield was called) to use
a condition variable instead. This should cause the unit test to behave
correctly.
llvm-svn: 287121
George Rimar [Wed, 16 Nov 2016 17:24:06 +0000 (17:24 +0000)]
[ELF] - Improve diagnostic messages.
Particulaty "cannot preempt symbol" message
is extended with locations now.
Differential revision: https://reviews.llvm.org/D26738
llvm-svn: 287120
Rui Ueyama [Wed, 16 Nov 2016 17:14:11 +0000 (17:14 +0000)]
Define -build-id=tree as a synonym for -build-id=sha1.
Our build-id is a tree hash anyway, so I'll define this as a synonym
for sha1. GNU gold takes this parameter, so this is for compatibility
with that.
llvm-svn: 287119
Eric Liu [Wed, 16 Nov 2016 16:54:53 +0000 (16:54 +0000)]
[change-namespace] handle constructor initializer: Derived : Base::Base() {} and added conflict detections
Summary:
namespace nx { namespace ny { class Base { public: Base(i) {}} } }
namespace na {
namespace nb {
class X : public nx::ny {
public:
X() : Base::Base(1) {}
};
}
}
When changing from na::nb to x::y, "Base::Base" will be changed to "nx::ny::Base" and
"Base::" in "Base::Base" will be replaced with "nx::ny::Base" too, which causes
conflict. This conflict should've been detected when adding replacements but was hidden by `addOrMergeReplacement`. We now also detect conflict when adding replacements where conflict must not happen.
The namespace lookup is tricky here, we simply replace "Base::Base()" with "nx::ny::Base()" as a workaround, which compiles but not perfect.
Reviewers: hokein
Subscribers: bkramer, cfe-commits
Differential Revision: https://reviews.llvm.org/D26637
llvm-svn: 287118
Reid Kleckner [Wed, 16 Nov 2016 16:50:43 +0000 (16:50 +0000)]
[sancov] Name the global containing the main source file name
If the global name doesn't start with __sancov_gen, ASan will insert
unecessary red zones around it.
llvm-svn: 287117
Daniil Fukalov [Wed, 16 Nov 2016 16:41:40 +0000 (16:41 +0000)]
test commit, changed tab to spaces, NFC
llvm-svn: 287116
Pekka Jaaskelainen [Wed, 16 Nov 2016 16:21:59 +0000 (16:21 +0000)]
target-data test update for TCE and TCELE
llvm-svn: 287115
Simon Pilgrim [Wed, 16 Nov 2016 16:11:08 +0000 (16:11 +0000)]
Remove duplicate condition (PR30648). NFCI.
We only need to check that the bitstream entry is a Record.
llvm-svn: 287114
Adrian McCarthy [Wed, 16 Nov 2016 16:04:14 +0000 (16:04 +0000)]
Remove Windows-specific minidump plugin
With the cross-platform minidump plugin working, the Windows-specific one is no longer needed. This eliminates the unnecessary code.
This does not eliminate the Windows-specific tests, as they hit a few cases the general tests don't. (The Windows-specific tests are currently passing.) I'll look into a separate patch to make sure we're not doing too much duplicate testing.
After that I might do a little re-org in the Windows plugin, as there was some factoring there (Common & Live) that probably isn't necessary anymore.
Differential Revision: https://reviews.llvm.org/D26697
llvm-svn: 287113
Pekka Jaaskelainen [Wed, 16 Nov 2016 15:22:31 +0000 (15:22 +0000)]
Add a little endian variant of TCE.
llvm-svn: 287112
Pekka Jaaskelainen [Wed, 16 Nov 2016 15:22:23 +0000 (15:22 +0000)]
Add a little endian variant of TCE.
llvm-svn: 287111
Simon Pilgrim [Wed, 16 Nov 2016 14:54:34 +0000 (14:54 +0000)]
[X86] Add integer division test for PR23590
Shows missed opportunity to recognise reduced integer division result size
llvm-svn: 287110
Eric Fiselier [Wed, 16 Nov 2016 14:48:42 +0000 (14:48 +0000)]
Fix -verify tests for older ccache versions
llvm-svn: 287109
Simon Pilgrim [Wed, 16 Nov 2016 14:48:32 +0000 (14:48 +0000)]
[X86][AVX512] Autoupgrade lossless i32/u32 to f64 conversion intrinsics with generic IR
Both the (V)CVTDQ2PD (i32 to f64) and (V)CVTUDQ2PD (u32 to f64) conversion instructions are lossless and can be safely represented as generic SINT_TO_FP/UINT_TO_FP calls instead of x86 intrinsics without affecting final codegen.
LLVM counterpart to D26686
Differential Revision: https://reviews.llvm.org/D26736
llvm-svn: 287108
Gabor Horvath [Wed, 16 Nov 2016 14:42:10 +0000 (14:42 +0000)]
[clang-tidy] New check to prefer transparent functors to non-transparent ones.
llvm-svn: 287107
Simon Pilgrim [Wed, 16 Nov 2016 14:24:04 +0000 (14:24 +0000)]
[X86][AVX512] Added some mask/maskz tests for sitofp/uitofp i32 to f64
llvm-svn: 287106
Devin Coughlin [Wed, 16 Nov 2016 14:23:41 +0000 (14:23 +0000)]
[www] Fix spelling error in checker release notes.
llvm-svn: 287105
Simon Pilgrim [Wed, 16 Nov 2016 14:12:11 +0000 (14:12 +0000)]
[X86] Regenerated integer divide tests to test on 32 and 64 bit targets
llvm-svn: 287104
Simon Pilgrim [Wed, 16 Nov 2016 13:59:03 +0000 (13:59 +0000)]
[X86][SSE] Added PSUBUS from SELECT tests from D25987
llvm-svn: 287103
Yaron Keren [Wed, 16 Nov 2016 13:45:34 +0000 (13:45 +0000)]
Rangify for loop, NFC.
llvm-svn: 287102
Haojian Wu [Wed, 16 Nov 2016 13:05:19 +0000 (13:05 +0000)]
[clang-move] Support moving function.
Reviewers: ioeric
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26665
llvm-svn: 287101
Joey Gouly [Wed, 16 Nov 2016 11:34:09 +0000 (11:34 +0000)]
[OpenCL] Use the semantic spelling of the Access attribute, rather than a string.
Also fix a latent bug, due to an incorrect traversal of the AttributeList.
llvm-svn: 287100
Simon Dardis [Wed, 16 Nov 2016 11:29:07 +0000 (11:29 +0000)]
[mips] Fix unsigned/signed type error
MipsFastISel uses a a class to represent addresses with a signed member
to represent the offset. MipsFastISel::emitStore, emitLoad and computeAddress
all treated the offset as being positive. In cases where the offset was
actually negative and a frame pointer was used, this would cause the constant
synthesis routine to crash as it would generate an unexpected instruction
sequence when frame indexes are replaced.
Reviewers: vkalintiris
Differential Revision: https://reviews.llvm.org/D26192
llvm-svn: 287099
Tobias Grosser [Wed, 16 Nov 2016 11:06:47 +0000 (11:06 +0000)]
Update to isl-0.17.1-267-gbf9723d
This update corrects an incorrect generation of min/max expressions in the isl
AST generator and a problematic nullptr dereference.
llvm-svn: 287098
Simon Dardis [Wed, 16 Nov 2016 11:04:49 +0000 (11:04 +0000)]
[mips] not instruction alias
This patch adds the single operand form of the not alias to microMIPS and
MIPS along with additional tests.
This partially resolves PR/30381.
Thanks to Sean Bruno for reporting the issue!
llvm-svn: 287097
Pavel Labath [Wed, 16 Nov 2016 10:54:22 +0000 (10:54 +0000)]
Remove TimeValue class
Summary:
All usages have been replaced by appropriate std::chrono funcionality, and the
class is now unused. The only used part of the cpp file is the DumpTimePoint
function, which I have moved into the only caller (CommandObjectTarget.cpp).
Reviewers: clayborg, zturner
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D26451
llvm-svn: 287096
Pavel Labath [Wed, 16 Nov 2016 10:54:17 +0000 (10:54 +0000)]
Fix printf warning I introduced in ModuleSpec.h
llvm-svn: 287095
Pavel Labath [Wed, 16 Nov 2016 10:46:48 +0000 (10:46 +0000)]
Remove TimeValue class
Summary:
All uses have been replaced by appropriate std::chrono types, and the class is
now unused.
Reviewers: zturner, mehdi_amini
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D26447
llvm-svn: 287094
Eugene Leviant [Wed, 16 Nov 2016 10:02:27 +0000 (10:02 +0000)]
[ELF] Convert RelocationSection to input section
Differential revision: https://reviews.llvm.org/D26669
llvm-svn: 287092
Malcolm Parsons [Wed, 16 Nov 2016 09:51:40 +0000 (09:51 +0000)]
[clang-tidy] Handle template instantiations in modenize-use-default check
Summary:
Duplicate fixes were being created for explicit template instantiations
of out-of-line constructors or destructors.
Fixes PR30921.
Reviewers: alexfh, aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26582
llvm-svn: 287091
Eugene Leviant [Wed, 16 Nov 2016 09:49:39 +0000 (09:49 +0000)]
[ELF] Add Section() to expression object
This allows making symbols containing ADDR(section) synthetic,
and defining synthetic symbols outside SECTIONS block.
Differential revision: https://reviews.llvm.org/D25441
llvm-svn: 287090
Diana Picus [Wed, 16 Nov 2016 09:32:23 +0000 (09:32 +0000)]
[XRay][compiler-rt] Attempt to fix ARM buildbots after r287068
Include xray_defs.h in xray_arm.cc (seems to be the only one that doesn't
include it).
Buildbot errors:
[...]/compiler-rt/lib/xray/xray_arm.cc:31:58: error: expected initializer before 'XRAY_NEVER_INSTRUMENT'
inline static uint32_t getMovwMask(const uint32_t Value) XRAY_NEVER_INSTRUMENT {
llvm-svn: 287089
Simon Pilgrim [Wed, 16 Nov 2016 09:27:40 +0000 (09:27 +0000)]
[X86][AVX512] Replace lossless i32/u32 to f64 conversion intrinsics with generic IR
Both the (V)CVTDQ2PD (i32 to f64) and (V)CVTUDQ2PD (u32 to f64) conversion instructions are lossless and can be safely represented as generic __builtin_convertvector calls instead of x86 intrinsics without affecting final codegen.
This patch removes the clang builtins and their use in the headers - a future patch will deal with removing the llvm intrinsics.
This is an extension patch to D20528 which dealt with the equivalent sse/avx cases.
Differential Revision: https://reviews.llvm.org/D26686
llvm-svn: 287088
Ayman Musa [Wed, 16 Nov 2016 09:00:28 +0000 (09:00 +0000)]
[X86][AVX512] Removing llvm x86 intrinsics for _mm_mask_move_{ss|sd} intrinsics.
Differential Revision: https://reviews.llvm.org/D26128
llvm-svn: 287087
George Rimar [Wed, 16 Nov 2016 08:34:19 +0000 (08:34 +0000)]
[ELF] - Better diagnostic for "can't create dynamic relocation" error.
Patch improves message to show locations for
"can't create dynamic relocation" error.
Differential revision: https://reviews.llvm.org/D26548
llvm-svn: 287086
Mehdi Amini [Wed, 16 Nov 2016 07:07:28 +0000 (07:07 +0000)]
Improve handling of __FUNCTION__ and other predefined expression for Objective-C Blocks
Instead of always displaying the mangled name, try to do better
and get something closer to regular functions.
Recommit r287039 (that was reverted in r287039) with a tweak to
be more generic, and test fixes!
Differential Revision: https://reviews.llvm.org/D26522
llvm-svn: 287085
Steven Wu [Wed, 16 Nov 2016 06:06:44 +0000 (06:06 +0000)]
[Driver] Infer the correct option to ld64 for -fembed-bitcode
Summary:
-fembed-bitcode infers -bitcode_bundle to ld64 but it is not correctly
passed when using LTO. LTO is a special case of -fembed-bitcode which
it doesn't require embed the bitcode in a special section in the object
file but it requires linker to save that as part of the final executable.
rdar://problem/
29274226
Reviewers: mehdi_amini
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26690
llvm-svn: 287084
Craig Topper [Wed, 16 Nov 2016 05:24:10 +0000 (05:24 +0000)]
[X86] Remove the scalar intrinsics for fadd/fsub/fdiv/fmul
Summary: These intrinsics have been unused for clang for a while. This patch removes them. We auto upgrade them to extractelements, a scalar operation and then an insertelement. This matches the sequence used by clangs intrinsic file.
Reviewers: zvi, delena, RKSimon
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26660
llvm-svn: 287083
Davide Italiano [Wed, 16 Nov 2016 05:11:30 +0000 (05:11 +0000)]
[ELF] Update lld now that ELF.h in LLVM has been converted to Expected.
llvm-svn: 287082
Davide Italiano [Wed, 16 Nov 2016 05:10:28 +0000 (05:10 +0000)]
[ELF] Convert ELF.h to Expected<T>.
This has two advantages:
1) We slowly move away from ErrorOr to the new handling interface,
in the hope of having an uniform error handling in LLVM, eventually.
2) We're starting to have *meaningful* error messages for invalid
object ELF files, rather than a generic "parse error". At some point
we should include also the offset to improve the quality of the
diagnostic.
llvm-svn: 287081
Eric Fiselier [Wed, 16 Nov 2016 04:45:32 +0000 (04:45 +0000)]
Fix non-reserved name usage
llvm-svn: 287080
Saleem Abdulrasool [Wed, 16 Nov 2016 04:08:46 +0000 (04:08 +0000)]
test: use separate input file for test
Rather than using sed to generate the input and pipe the result to
strings, use the static input instead.
llvm-svn: 287079
Mike Aizatsky [Wed, 16 Nov 2016 04:03:27 +0000 (04:03 +0000)]
fixing binary search for cases when element is not in array
Subscribers: kubabrecka
Differential Revision: https://reviews.llvm.org/D26707
llvm-svn: 287078
Konstantin Zhuravlyov [Wed, 16 Nov 2016 03:39:12 +0000 (03:39 +0000)]
[AMDGPU] Refactor v_mac_{f16, f32} patterns into a class NFC
Differential Revision: https://reviews.llvm.org/D26711
llvm-svn: 287077
Matthias Braun [Wed, 16 Nov 2016 03:38:27 +0000 (03:38 +0000)]
AArch64: Use DeadRegisterDefinitionsPass before regalloc.
Doing this before register allocation reduces register pressure as we do
not even have to allocate a register for those dead definitions.
Differential Revision: https://reviews.llvm.org/D26111
llvm-svn: 287076
Richard Smith [Wed, 16 Nov 2016 03:36:29 +0000 (03:36 +0000)]
Fix build break when the host C compiler is C89.
llvm-svn: 287075
Konstantin Zhuravlyov [Wed, 16 Nov 2016 03:16:26 +0000 (03:16 +0000)]
[AMDGPU] Handle f16 select{_cc}
- Select `select` to `v_cndmask_b32`
- Expand `select_cc`
- Refactor patterns
Differential Revision: https://reviews.llvm.org/D26714
llvm-svn: 287074
Dean Michael Berris [Wed, 16 Nov 2016 02:18:23 +0000 (02:18 +0000)]
[XRay][docs] Define requirements on installed log handlers.
Summary:
We update the documentation to define what the requirements are for the
provided XRay log handler. This is to make it clear that the function
pointer provided must do internal synchronisation and that there are no
guarantees provided by XRay on when the function shall be invoked once
it has been installed as a log handler.
Reviewers: rSerge, rengolin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26651
llvm-svn: 287073
Rui Ueyama [Wed, 16 Nov 2016 01:39:50 +0000 (01:39 +0000)]
Add -no-threads option that negates the effect of -threads.
llvm-svn: 287072
Rui Ueyama [Wed, 16 Nov 2016 01:10:46 +0000 (01:10 +0000)]
PDB: Add "* Linker *" module.
The added module contains nothing, but it is still useful as a test
to ensure that we are emitting modules that can be read back.
llvm-svn: 287071
Quentin Colombet [Wed, 16 Nov 2016 01:07:12 +0000 (01:07 +0000)]
[RegAllocGreedy] Record missed hint for late recoloring.
In https://reviews.llvm.org/D25347, Geoff noticed that we still have
useless copy that we can eliminate after register allocation. At the
time the allocation is chosen for those copies, they are not useless
but, because of changes in the surrounding code, later on they might
become useless.
The Greedy allocator already has a mechanism to deal with such cases
with a late recoloring. However, we missed to record the some of the
missed hints.
This commit fixes that.
llvm-svn: 287070
Vitaly Buka [Wed, 16 Nov 2016 01:01:22 +0000 (01:01 +0000)]
Revert "[OPENMP] Fixed codegen for 'omp cancel' construct."
Summary:
r286944 introduced bugs detected by ASAN as use-after-return.
r287025 have not fixed them completely.
This reverts commit r286944 and r287025.
Reviewers: ABataev
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26720
llvm-svn: 287069
Dean Michael Berris [Wed, 16 Nov 2016 01:01:13 +0000 (01:01 +0000)]
[XRay][compiler-rt] Disable XRay instrumentation of the XRay runtime.
Summary:
Adds a CMake check for whether the compiler used to build the XRay
library supports XRay-instrumentation. If the compiler we're using does
support the `-fxray-instrument` flag (i.e. recently-built Clang), we
define the XRAY_NEVER_INSTRUMENT macro that then makes sure that the
XRay runtime functions never get XRay-instrumented.
This prevents potential weirdness involved with building the XRay
library with a Clang that supports XRay-instrumentation, and is
attempting to XRay-instrument the build of compiler-rt.
Reviewers: majnemer, rSerge, echristo
Subscribers: mehdi_amini, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D26597
llvm-svn: 287068
Rui Ueyama [Wed, 16 Nov 2016 00:59:27 +0000 (00:59 +0000)]
Align Modi and FileInfo substreams on 32-byte offsets.
This is required by DbiStream, but DbiStreamBuilder didn't align
these substreams, so the output of DbiSTreamBuilder couldn't be
read by DbiStream.
Test will be added to LLD.
llvm-svn: 287067
Richard Smith [Wed, 16 Nov 2016 00:57:23 +0000 (00:57 +0000)]
Outline evaluation of calls to builtins to avoid inflating stack usage for the
common case of a call to a non-builtin, particularly for unoptimized ASan
builds (where the per-variable stack usage can be quite high).
llvm-svn: 287066
Vyacheslav Klochkov [Wed, 16 Nov 2016 00:55:50 +0000 (00:55 +0000)]
Fixed the lost FastMathFlags for CALL operations in SLPVectorizer.
Reviewer: Michael Zolotukhin.
Differential Revision: https://reviews.llvm.org/D26575
llvm-svn: 287064
Devin Coughlin [Wed, 16 Nov 2016 00:47:56 +0000 (00:47 +0000)]
[www] Update analyzer website for release of checker-279
llvm-svn: 287063
Justin Lebar [Wed, 16 Nov 2016 00:44:47 +0000 (00:44 +0000)]
[BypassSlowDivision] Handle division by constant numerators better.
Summary:
We don't do BypassSlowDivision when the denominator is a constant, but
we do do it when the numerator is a constant.
This patch makes two related changes to BypassSlowDivision when the
numerator is a constant:
* If the numerator is too large to fit into the bypass width, don't
bypass slow division (because we'll never run the smaller-width
code).
* If we bypass slow division where the numerator is a constant, don't
OR together the numerator and denominator when determining whether
both operands fit within the bypass width. We need to check only the
denominator.
Reviewers: tra
Subscribers: llvm-commits, jholewinski
Differential Revision: https://reviews.llvm.org/D26699
llvm-svn: 287062
Justin Lebar [Wed, 16 Nov 2016 00:44:43 +0000 (00:44 +0000)]
[BypassSlowDivision] Simplify partially-tautological if statement.
if (A || (B && A)) --> if (A).
llvm-svn: 287061
Rui Ueyama [Wed, 16 Nov 2016 00:38:33 +0000 (00:38 +0000)]
Fix Modi and File count if there are more than 65535 modules/files.
These numbers are intended to be capped at 65535, but
`std::max<uint16_t>(UINT16_MAX, N)` always returns N for any N because
the expression is the same as `std::max((uint16_t)UINT16_MAX, (uint16_t)N)`.
llvm-svn: 287060
Joerg Sonnenberger [Wed, 16 Nov 2016 00:37:30 +0000 (00:37 +0000)]
Always use relative jump table encodings on PowerPC64.
For the default, small and medium code model, use the existing
difference from the jump table towards the label. For all other code
models, setup the picbase and use the difference between the picbase and
the block address.
Overall, this results in smaller data tables at the expensive of one or
two more arithmetic operation at the jump site. Given that we only create
jump tables with a lot more than two entries, it is a net win in size.
For larger code models the assumption remains that individual functions
are no larger than 2GB.
Differential Revision: https://reviews.llvm.org/D26336
llvm-svn: 287059
Richard Smith [Wed, 16 Nov 2016 00:03:24 +0000 (00:03 +0000)]
PR23281: Fix implementation of DR1891 to implement the intent: that is, a
lambda-expression does not have a move-assignment operator.
llvm-svn: 287057
Jan Vesely [Tue, 15 Nov 2016 23:55:15 +0000 (23:55 +0000)]
AMDGPU/GCN: Exit early in hazard recognizer if there is no vreg argument
wbinvl.* are vector instruction that do not sue vector registers.
v2: check only M?BUF instructions
Differential Revision: https://reviews.llvm.org/D26633
llvm-svn: 287056
Zachary Turner [Tue, 15 Nov 2016 23:36:43 +0000 (23:36 +0000)]
Change Property::GetName() and GetDescription() to return StringRef.
llvm-svn: 287055
Sanjay Patel [Tue, 15 Nov 2016 23:09:53 +0000 (23:09 +0000)]
[x86] regenerate checks; NFC
llvm-svn: 287051
Kevin Enderby [Tue, 15 Nov 2016 23:07:41 +0000 (23:07 +0000)]
General clean up of Mach-O error handling in llvm-objdump.
To get a good error message for all files that could contain Mach-O
files the code in llvm-objdump needs to use the archive member name
and name of the architecture of a slice of a universal file in those cases
where the error come from a Mach-O file in an archive or a universal file.
Most of this is fixed by moving the call to checkSymbolTable() into
ProcessMachO() and calling it when the operation needs the symbol
table. And then calling the form of report_error() that has the
ArchiveName and ArchitectureName arguments. One other place
needed to call this form of report_error() also with these arguments.
Also changed the code in MachODump.cpp to not use report_fatal_error()
and use report_error() instead to make the code smaller and cleaner. All
cases of this are for errors with the symbol table which should now never
be tripped since checkSymbolTable() should be called first to get a good
error message in these cases.
llvm-svn: 287050
Sanjay Patel [Tue, 15 Nov 2016 23:01:11 +0000 (23:01 +0000)]
[x86] auto-generate better checks; NFC
llvm-svn: 287049
Sanjay Patel [Tue, 15 Nov 2016 22:42:20 +0000 (22:42 +0000)]
[x86] auto-generate better checks; NFC
llvm-svn: 287048
Filipe Cabecinhas [Tue, 15 Nov 2016 22:37:30 +0000 (22:37 +0000)]
[AddressSanitizer] Add support for (constant-)masked loads and stores.
This patch adds support for instrumenting masked loads and stores under
ASan, if they have a constant mask.
isInterestingMemoryAccess now supports returning a mask to be applied to
the loads, and instrumentMop will use it to generate additional checks.
Added tests for v4i32 v8i32, and v4p0i32 (~v4i64) for both loads and
stores (as well as a test to verify we don't add checks to non-constant
masks).
Differential Revision: https://reviews.llvm.org/D26230
llvm-svn: 287047
Sanjay Patel [Tue, 15 Nov 2016 22:33:16 +0000 (22:33 +0000)]
[x86] auto-generate better checks; NFC
llvm-svn: 287046
Artem Dergachev [Tue, 15 Nov 2016 22:22:57 +0000 (22:22 +0000)]
[analyzer] NumberObjectConversion: Workaround for a linker error with modules.
A combination of C++ modules, variadic functions with more than one argument,
and const globals in headers (all three being necessary) causes some releases
of clang to misplace the matcher objects, which causes the linker to fail.
No functional change - the extra allOf() matcher is no-op here.
llvm-svn: 287045
Amaury Sechet [Tue, 15 Nov 2016 22:19:59 +0000 (22:19 +0000)]
[C API] Prevent nullptr dereferences in C API for counting attributes.
See https://reviews.llvm.org/D26392
Patch by @maleadt
llvm-svn: 287044
Mehdi Amini [Tue, 15 Nov 2016 22:19:50 +0000 (22:19 +0000)]
Revert "Improve handling of __FUNCTION__ and other predefined expression for Objective-C Blocks"
This reverts commit r287039, tests are broken.
llvm-svn: 287043
Rafael Espindola [Tue, 15 Nov 2016 22:13:16 +0000 (22:13 +0000)]
Use one task per iteration in parallel_for_loop.
This seems far more natural. A user can create larger chunks if the
overhead is too large.
With this linking xul with "--threads --build-id=sha1 goes from
13.
938177535 to 11.
035953538 seconds on linux.
llvm-svn: 287042
Justin Lebar [Tue, 15 Nov 2016 22:03:29 +0000 (22:03 +0000)]
[libcxx] Mark xonstexpr-fns.pass.cpp as XFAIL: gcc.
This fails with gcc because __builtin_isnan and friends, which
libcpp_isnan and friends call, are not themselves constexpr-evaluatable.
llvm-svn: 287041
Reid Kleckner [Tue, 15 Nov 2016 21:54:58 +0000 (21:54 +0000)]
Allow users to call ASan's deadly exception report mechanism
Users often have their own unhandled exception filters installed. ASan
already goes to great lengths to install its own filter, but our core
wars with Chrome crashpad have escalated to the point that its time to
declare a truce. By exposing this hook, they can call us directly when
they want ASan crash reporting without worrying about who initializes
when.
llvm-svn: 287040
Mehdi Amini [Tue, 15 Nov 2016 21:47:11 +0000 (21:47 +0000)]
Improve handling of __FUNCTION__ and other predefined expression for Objective-C Blocks
Instead of always displaying the mangled name, try to do better
and get something closer to regular functions.
Differential Revision: https://reviews.llvm.org/D26522
llvm-svn: 287039
Peter Collingbourne [Tue, 15 Nov 2016 21:36:35 +0000 (21:36 +0000)]
Object: replace backslashes with slashes in embedded relative thin archive paths on Windows.
This makes these thin archives portable between *nix and Windows.
Differential Revision: https://reviews.llvm.org/D26696
llvm-svn: 287038
Chad Rosier [Tue, 15 Nov 2016 21:34:31 +0000 (21:34 +0000)]
[AArch64] Add driver tests for Qualcomm's Falkor CPU.
Differential Revision: https://reviews.llvm.org/D26674
llvm-svn: 287037
Chad Rosier [Tue, 15 Nov 2016 21:34:12 +0000 (21:34 +0000)]
[AArch64] Add support for Qualcomm's Falkor CPU.
Differential Revision: https://reviews.llvm.org/D26673
llvm-svn: 287036
Tom Stellard [Tue, 15 Nov 2016 21:25:56 +0000 (21:25 +0000)]
AMDGPU/SI: Fix pattern for i16 = sign_extend i1
Reviewers: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye
Differential Revision: https://reviews.llvm.org/D26670
llvm-svn: 287035
Rui Ueyama [Tue, 15 Nov 2016 21:25:20 +0000 (21:25 +0000)]
[COFF] Fix manifest resource file creation on Windows.
createManifestRes was generating a MemoryBuffer from a TemporaryFile,
keeping the data but removing the file, before passing the file path
to CVTRES.exe, leading to the following error:
CVTRES : fatal error CVT1101: cannot open 'C:\Users\user\AppData\
Local\Temp\lld-output-resource-bfee19.res' for reading
With this, we instead create a new TemporaryFile before passing it to cvtres.
Patch from Rudy Pons!
llvm-svn: 287034
Sanjay Patel [Tue, 15 Nov 2016 21:19:28 +0000 (21:19 +0000)]
[x86] add tests for FP-logic equivalent instruction replacement
The ANDN test needs at least 3 different fixes.
llvm-svn: 287032
Chad Rosier [Tue, 15 Nov 2016 21:18:18 +0000 (21:18 +0000)]
[AArch64] Refactor test per Matthias' request.
llvm-svn: 287031
Kostya Serebryany [Tue, 15 Nov 2016 21:12:50 +0000 (21:12 +0000)]
[sanitizer-coverage] make sure asan does not instrument coverage guards (reported in https://github.com/google/oss-fuzz/issues/84)
llvm-svn: 287030
Kuba Brecka [Tue, 15 Nov 2016 21:08:51 +0000 (21:08 +0000)]
[asan] Re-enable the use-after-scope-types.cc test on Darwin, now that r287028 fixed the llvm-symbolizer issue that broke this test.
Differential Revision: https://reviews.llvm.org/D26537
llvm-svn: 287029
Kuba Brecka [Tue, 15 Nov 2016 21:07:03 +0000 (21:07 +0000)]
Fix llvm-symbolizer to correctly sort a symbol array and calculate symbol sizes
Sometimes, llvm-symbolizer gives wrong results due to incorrect sizes of some symbols. The reason for that was an incorrectly sorted array in computeSymbolSizes. The comparison function used subtraction of unsigned types, which is incorrect. Let's change this to return explicit -1 or 1.
Differential Revision: https://reviews.llvm.org/D26537
llvm-svn: 287028
Tim Northover [Tue, 15 Nov 2016 21:06:07 +0000 (21:06 +0000)]
GlobalISel: remove unused variable to silence warning.
llvm-svn: 287027
Kuba Brecka [Tue, 15 Nov 2016 21:00:55 +0000 (21:00 +0000)]
[tsan] Call pthread interceptors directly in TSan RTL unit tests
On Darwin, we're running the TSan unit tests without interceptors. To make sure TSan observes all the pthread events (thread creating, thread join, condvar signal, etc.) in tsan_posix.cc, we should call the pthread interceptors directly, as we already do in tsan_test_util_posix.cc. This fixes some flaky failures on Darwin bots.
Differential Revision: https://reviews.llvm.org/D26639
llvm-svn: 287026
Alexey Bataev [Tue, 15 Nov 2016 20:57:18 +0000 (20:57 +0000)]
[OPENMP] Fix stack use after delete, NFC.
Fixed possible use of stack variable after deletion.
llvm-svn: 287025
Argyrios Kyrtzidis [Tue, 15 Nov 2016 20:51:46 +0000 (20:51 +0000)]
[libclang] Generalize clang_getNumTemplateArguments and clang_getTemplateArgumentAsType to other kind of specializations.
Patch by Emilio Cobos Álvarez!
https://reviews.llvm.org/D26663
llvm-svn: 287024
Tim Northover [Tue, 15 Nov 2016 20:26:01 +0000 (20:26 +0000)]
llvm-objdump: deal with unexpected object files more gracefully.
Specifically, we don't want to segfault on release builds, so print the problem
instead.
llvm-svn: 287022
Matt Arsenault [Tue, 15 Nov 2016 20:22:55 +0000 (20:22 +0000)]
AMDGPU: Enable store clustering
Also respect the TII hook for these like the generic code does
in case we want a flag later to disable this.
llvm-svn: 287021
Eric Fiselier [Tue, 15 Nov 2016 20:21:30 +0000 (20:21 +0000)]
Add .clang-format to libc++
Adding a Clang Format file to libc++ and which style it should use has been
discussed a couple of times. This patch finally adds a .clang-format file
which specifies LLVM styles.
Personally I dislike how the LLVM style handles much of the meta-programming
in libc++. However the general consensus was that libc++ should prefer the
LLVM style and make adjustments where needed.
Note that using clang-format on changes is not required, especially for
changes within the headers. However formatting tests should be encouraged.
llvm-svn: 287020
Haicheng Wu [Tue, 15 Nov 2016 20:16:48 +0000 (20:16 +0000)]
[AArch64] Lower multiplication by a constant int to shl+add+shl
Lower a = b * C where C = (2^n + 1) * 2^m to
add w0, w0, w0, lsl n
lsl w0, w0, m
Differential Revision: https://reviews.llvm.org/D229245
llvm-svn: 287019
Matt Arsenault [Tue, 15 Nov 2016 20:14:27 +0000 (20:14 +0000)]
AMDGPU: Analyze mubuf with immediate soffset
Fixes giving up on clustering common addr64 accesses with
constant 0 soffset.
llvm-svn: 287018
Zachary Turner [Tue, 15 Nov 2016 20:13:14 +0000 (20:13 +0000)]
Make some code not manipulate the underlying string of a StreamString.
Differential Revision: https://reviews.llvm.org/D26618
llvm-svn: 287017
Zachary Turner [Tue, 15 Nov 2016 20:11:01 +0000 (20:11 +0000)]
One more fix for Printf. Apparently I fail at incremental builds.
llvm-svn: 287016
Matt Arsenault [Tue, 15 Nov 2016 19:58:54 +0000 (19:58 +0000)]
AMDGPU: Fix return after else
llvm-svn: 287015
Wei Mi [Tue, 15 Nov 2016 19:42:05 +0000 (19:42 +0000)]
Revert r286999 which caused buildbot test failures. Some testcases need to be made target specific.
llvm-svn: 287014