Hal Finkel [Tue, 31 Mar 2015 20:35:26 +0000 (20:35 +0000)]
[SDAG] Handle non-integer preferred memset types for non-constant values
The existing code in getMemsetValue only handled integer-preferred types when
the fill value was not a constant. Make this more robust in two ways:
1. If the preferred type is a floating-point value, do the mul-splat trick on
the corresponding integer type and then bitcast.
2. If the preferred type is a vector, do the mul-splat trick on one vector
element, and then build a vector out of them.
Fixes PR22754 (although, we should also turn off use of vector types at -O0).
llvm-svn: 233749
Rui Ueyama [Tue, 31 Mar 2015 20:31:48 +0000 (20:31 +0000)]
ELF: Remove TargetHandler::getTargetLayout.
Only MIPS used that member function, and by removing the use of the
function, I removed a static_cast. Seems like it's a win.
llvm-svn: 233748
Lang Hames [Tue, 31 Mar 2015 20:31:14 +0000 (20:31 +0000)]
[ExecutionEngine] Fix MCJIT::addGlobalMapping.
This patch fixes MCJIT::addGlobalMapping by changing the implementation of the
ExecutionEngineState class. The new implementation maintains a bidirectional
mapping between symbol names (std::strings) and addresses (uint64_ts), rather
than a mapping between Value*s and void*s.
This has fix has been made for backwards compatibility, however the strongly
preferred way to resolve unknown symbols is by writing a custom
RuntimeDyld::SymbolResolver (formerly RTDyldMemoryManager) and overriding the
findSymbol method. The addGlobalMapping method is a hangover from the legacy JIT
(which has was removed in 3.6), and may be deprecated in a future release as
part of a clean-up of the ExecutionEngine interface.
Patch by Murat Bolat. Thanks Murat!
llvm-svn: 233747
Rui Ueyama [Tue, 31 Mar 2015 20:29:08 +0000 (20:29 +0000)]
Remove "_hexagon" prefix from some member variables.
At least in Mips we don't have a prefix for member variables.
Repeating the architecture is verbose.
llvm-svn: 233746
Kostya Serebryany [Tue, 31 Mar 2015 20:13:20 +0000 (20:13 +0000)]
[fuzzer] Add support for token-based fuzzing (e.g. for C++). Allow string flags.
llvm-svn: 233745
Matthias Braun [Tue, 31 Mar 2015 20:04:46 +0000 (20:04 +0000)]
Clarify that higher priority means higher values.
llvm-svn: 233744
Matthias Braun [Tue, 31 Mar 2015 19:57:53 +0000 (19:57 +0000)]
RegAllocGreedy: Allow target to specify register class ordering.
Specify an allocation order with a register class. This is used by register
allocators with a greedy heuristic. This is usefull as it is sometimes
beneficial to color more constrained classes first.
Differential Revision: http://reviews.llvm.org/D8626
llvm-svn: 233743
Matthias Braun [Tue, 31 Mar 2015 19:57:49 +0000 (19:57 +0000)]
RegAllocGreedy: Improve live interval order in ReverseLocal mode
When allocating live intervals in linear order and all of them are local
to a single basic block you get an optimal coloring. This is also true
if you reverse the order, but it is not true if you sort live ranges
beginnings in reverse order, change to sort live range endings in
reverse order. Take the following live ranges for example:
|---| |--------|
|----------| |-------|
They get colored suboptimally with 3 registers if you sort the live range
starting points in reverse order (but optimally with live range begins in order,
or live range ends in reverse order).
Apparently the previous strategy was intentional because of allocation
time considerations. I am having a hard time replicating these effects,
while I see substantial improvements in allocation quality with this
change.
No testcase as none of the (in tree) targets use reverse order mode.
Differential Revision: http://reviews.llvm.org/D8625
llvm-svn: 233742
Rui Ueyama [Tue, 31 Mar 2015 19:55:39 +0000 (19:55 +0000)]
Replace *(uniqueptr.get()) with *uniqueptr.
Apparently they are copy-pastes. They need to be merged, or otherwise
they will diverge needlessly as I did in r233723...
llvm-svn: 233741
Simon Atanasyan [Tue, 31 Mar 2015 19:43:47 +0000 (19:43 +0000)]
[Hexagon] Avoid an unused variable warning when assertions are off
No functional changes.
llvm-svn: 233740
Rui Ueyama [Tue, 31 Mar 2015 19:37:33 +0000 (19:37 +0000)]
Use C++ non-static member initialization.
llvm-svn: 233739
Rui Ueyama [Tue, 31 Mar 2015 19:35:35 +0000 (19:35 +0000)]
Rename _AArch64TargetLayout.
This change should have been done in r233737, but I made a mistake to
not include into that.
llvm-svn: 233738
Rui Ueyama [Tue, 31 Mar 2015 19:33:25 +0000 (19:33 +0000)]
Rename identifiers starting with an underscore and a uppercase letter.
Identifiers starting with _[A-Z] is reserved for the language.
User programs shouldn't use such identifiers.
llvm-svn: 233737
Ulrich Weigand [Tue, 31 Mar 2015 19:28:50 +0000 (19:28 +0000)]
[SystemZ] Address review comments for r233689
Change lowerCTPOP to:
- Gracefully handle a known-zero input value
- Simplify computation of significant bit size
Thanks to Jay Foad for the review!
llvm-svn: 233736
Rui Ueyama [Tue, 31 Mar 2015 19:21:43 +0000 (19:21 +0000)]
Remove virtual and add override.
llvm-svn: 233735
Simon Atanasyan [Tue, 31 Mar 2015 19:00:54 +0000 (19:00 +0000)]
[Mips] Use llvm::make_unique
No functional changes.
llvm-svn: 233727
Benjamin Kramer [Tue, 31 Mar 2015 18:47:05 +0000 (18:47 +0000)]
[lex] Bitfieldize some booleans.
Lets us fuse some branches into bit tests downstream. NFC.
llvm-svn: 233725
Sanjay Patel [Tue, 31 Mar 2015 18:43:43 +0000 (18:43 +0000)]
[X86, AVX] fix zero-extending integer operand load patterns to use integer instructions
This is a follow-on to r233704 and another partial fix for PR22685:
https://llvm.org/bugs/show_bug.cgi?id=22685
llvm-svn: 233724
Rui Ueyama [Tue, 31 Mar 2015 18:26:31 +0000 (18:26 +0000)]
If x is a unique_ptr, *x.get() is equivalent to *x.
llvm-svn: 233723
Lang Hames [Tue, 31 Mar 2015 18:19:25 +0000 (18:19 +0000)]
[Orc][MCJIT] Remove the small code model regression tests.
These regression tests are supposed to test small code model support, but have
been XFAIL'd because we don't have an in-tree memory manager that can guarantee
a small-code-model compatible memory layout. Unfortunately, they can
occasionally pass if they get lucky with memory allocation, causing unexpected
passes on the bots. That's not very helpful.
I'm going to remove these until we have the infrastructure (small-code-model
compatible memory manager) to run them properly.
llvm-svn: 233722
Rui Ueyama [Tue, 31 Mar 2015 18:19:06 +0000 (18:19 +0000)]
Use llvm::make_unique.
llvm-svn: 233721
Alexey Samsonov [Tue, 31 Mar 2015 18:16:42 +0000 (18:16 +0000)]
[Sanitizer] Be consistent about separating ==%PID== and logged data.
See https://code.google.com/p/address-sanitizer/issues/detail?id=385.
llvm-svn: 233720
Rui Ueyama [Tue, 31 Mar 2015 18:15:05 +0000 (18:15 +0000)]
ELF: Replace a macro with an inlined function.
FINDV4BITMASK macro is defined as a macro so that the macro body is inlined.
We should use inlined functions instead of macros.
llvm-svn: 233719
Rui Ueyama [Tue, 31 Mar 2015 18:10:24 +0000 (18:10 +0000)]
ELF: Do not use multiple inheritance.
Multiple inheritance is casually used here. Rewriting to not
using multiple inheritance reduces the complexity of the code
and also makes it shorter.
llvm-svn: 233718
Vince Harron [Tue, 31 Mar 2015 17:45:54 +0000 (17:45 +0000)]
TestPrintStackTraces - made XFAIL more precise
Works with x86_64 inferior, fails w/i386 inferior - updated test to
reflect
llvm-svn: 233717
Vince Harron [Tue, 31 Mar 2015 17:44:37 +0000 (17:44 +0000)]
Enabled a bunch of tests on Linux
Removed expectedFailureLinux from failures that I was unable to
reproduce, updated and improved some other comments near XFAIL tests
Differential Revision: http://reviews.llvm.org/D8676
llvm-svn: 233716
Eli Bendersky [Tue, 31 Mar 2015 17:03:16 +0000 (17:03 +0000)]
Add sm_37 target to Clang for NVPTX
Support for this target was added in LLVM r233575 and r233583
llvm-svn: 233715
Greg Clayton [Tue, 31 Mar 2015 17:02:36 +0000 (17:02 +0000)]
Fix DynamicLoaderMacOSXDYLD to deal with new shared cache changes.
<rdar://problem/
20357466>
llvm-svn: 233714
Tom Stellard [Tue, 31 Mar 2015 16:59:23 +0000 (16:59 +0000)]
Implement fmax using __builtin_fmax
This ensures correct handling of NaNi.
This has been tested with piglit, OpenCV, and the ocl conformance tests.
llvm-svn: 233713
Tom Stellard [Tue, 31 Mar 2015 16:59:21 +0000 (16:59 +0000)]
Implement fmin using __builtin_fmin
This ensures correct handling of NaN.
This has been tested with piglit, OpenCV, and the ocl conformance tests.
llvm-svn: 233712
Eric Fiselier [Tue, 31 Mar 2015 16:54:19 +0000 (16:54 +0000)]
[libcxx] Optimize vectors uninitialized construction of trivial types from an iterator range.
Summary:
In certain cases vector can use memcpy to construct a range of elements at the back of the vector. We currently don't do this resulting in terrible code gen in non-optimized mode and a
very large slowdown compared to libstdc++.
This patch adds a `__construct_forward_range(Allocator, Iter, Iter, _Ptr&)` and `__construct_forward_range(Allocator, Tp*, Tp*, Tp*&)` functions to `allocator_traits` which act similarly to the existing `__construct_forward(...)` functions.
This patch also changes vectors `__construct_at_end(Iter, Iter)` to be `__construct_at_end(Iter, Iter, SizeType)` where SizeType is the size of the range. `__construct_at_end(Iter, Iter, SizeType)` now calls `allocator_traits<Tp>::__construct_forward_range(...)`.
This patch is based off the design of `__swap_out_circular_buffer(...)` which uses `allocator_traits<Tp>::__construct_forward(...)`.
On my machine this code performs 4x better than the current implementation when tested against `std::vector<int>`.
Reviewers: howard.hinnant, titus, kcc, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8109
llvm-svn: 233711
Rui Ueyama [Tue, 31 Mar 2015 16:48:57 +0000 (16:48 +0000)]
Use DEBUG_TYPE and DEBUG instead of DEBUG_WITH_TYPE.
llvm-svn: 233710
Tim Northover [Tue, 31 Mar 2015 16:41:38 +0000 (16:41 +0000)]
AArch64: fix v8.1 sqrdmlah tests on Darwin platforms
llvm-svn: 233709
NAKAMURA Takumi [Tue, 31 Mar 2015 16:41:25 +0000 (16:41 +0000)]
Rework r233647, "llvm/examples: Suppress building a few JIT examples."
It didn't work with "install".
llvm-svn: 233708
Timur Iskhodzhanov [Tue, 31 Mar 2015 16:39:20 +0000 (16:39 +0000)]
[ASan/Win] UnmapOrDie should not fail on zero address / size
llvm-svn: 233707
Tom Stellard [Tue, 31 Mar 2015 16:39:02 +0000 (16:39 +0000)]
Sema: Accept pointers to any address space for builtin functions
As long as they don't have an address space explicitly defined.
This allows builtins with pointer arguments to be used with OpenCL.
llvm-svn: 233706
Ed Maste [Tue, 31 Mar 2015 16:37:10 +0000 (16:37 +0000)]
Fix FreeBSD test runs after r233311
On FreeBSD LLDB's triple ends up as e.g. "x86_64-unknown-freebsd10.1"
but getPlatform() consumers expect just the name with no version
number.
llvm-svn: 233705
Sanjay Patel [Tue, 31 Mar 2015 16:32:11 +0000 (16:32 +0000)]
[X86, AVX] try to lowerVectorShuffleAsElementInsertion() for all 256-bit vector sub-types
I suggested this change in D7898 (http://llvm.org/viewvc/llvm-project?view=revision&revision=231354)
It improves the v4i64 case although not optimally. This AVX codegen:
vmovq {{.*#+}} xmm0 = mem[0],zero
vxorpd %ymm1, %ymm1, %ymm1
vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1,2,3]
Becomes:
vmovsd {{.*#+}} xmm0 = mem[0],zero
Unfortunately, this doesn't completely solve PR22685. There are still at least 2 problems under here:
We're not handling v32i8 / v16i16.
We're not getting the FP / int domains right for instruction selection.
But since this patch alone appears to do no harm, reduces code duplication, and helps v4i64,
I'm submitting this patch ahead of fixing the above.
Differential Revision: http://reviews.llvm.org/D8341
llvm-svn: 233704
Hafiz Abid Qadeer [Tue, 31 Mar 2015 16:30:29 +0000 (16:30 +0000)]
Changed a function to static.
A temp object was being created to call StripOffFileName. This function
is not dependent on class members so I am making it static.
No regression on testsuite on Linux.
llvm-svn: 233703
Alexander Kornienko [Tue, 31 Mar 2015 16:24:44 +0000 (16:24 +0000)]
[clang-tidy] Clarify message for the google-explicit-constructor check
Use "constructors that are callable with a single argument" instead of
"single-argument constructors" when referring to constructors using default
arguments or parameter packs.
llvm-svn: 233702
Sanjay Patel [Tue, 31 Mar 2015 16:17:51 +0000 (16:17 +0000)]
typos; NFC
llvm-svn: 233701
Ulrich Weigand [Tue, 31 Mar 2015 15:16:13 +0000 (15:16 +0000)]
[SystemZ] Add Analysis to required_libraries (fall-out from r233688)
Should fix build failures with cmake builds
llvm-svn: 233700
Scott Douglass [Tue, 31 Mar 2015 15:07:53 +0000 (15:07 +0000)]
[docs] add cross-reference
llvm-svn: 233699
Daniel Jasper [Tue, 31 Mar 2015 14:34:15 +0000 (14:34 +0000)]
clang-format: [JS] Support getters, setters and methods in object literals.
llvm-svn: 233698
Samuel Benzaquen [Tue, 31 Mar 2015 13:53:03 +0000 (13:53 +0000)]
Force braces on the else branch if they are being added to the if branch.
Summary:
Force braces on the else branch if they are being added to the if branch.
This ensures consistency in the transformed code.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8708
llvm-svn: 233697
Krzysztof Parzyszek [Tue, 31 Mar 2015 13:35:12 +0000 (13:35 +0000)]
Expand MUX instructions early on Hexagon
This time with all files included.
llvm-svn: 233696
Krzysztof Parzyszek [Tue, 31 Mar 2015 13:32:32 +0000 (13:32 +0000)]
Revert 233694. Weak SVN-fu.
llvm-svn: 233695
Krzysztof Parzyszek [Tue, 31 Mar 2015 13:29:17 +0000 (13:29 +0000)]
Expand MUX instructions early on Hexagon
llvm-svn: 233694
Vladimir Sukharev [Tue, 31 Mar 2015 13:15:48 +0000 (13:15 +0000)]
[AArch64] Add v8.1a "Rounding Double Multiply Add/Subtract" extension
Reviewers: t.p.northover, jmolloy
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8502
llvm-svn: 233693
Simon Atanasyan [Tue, 31 Mar 2015 13:04:08 +0000 (13:04 +0000)]
[Mips] Remove redundant #include
No functional changes.
llvm-svn: 233692
Simon Atanasyan [Tue, 31 Mar 2015 13:04:01 +0000 (13:04 +0000)]
[Mips] Do not use MIPS assembler and disassembler in the tests
No functional changes.
llvm-svn: 233691
Ulrich Weigand [Tue, 31 Mar 2015 12:58:17 +0000 (12:58 +0000)]
[SystemZ] Support RISBGN instruction on zEC12
So far, we do not yet support any instruction specific to zEC12.
Most of the facilities added with zEC12 are indeed not very useful
to compiler code generation, but there is one exception: the
miscellaneous-extensions facility provides the RISBGN instruction,
which is a variant of RISBG that does not set the condition code.
Add support for this facility, MC support for RISBGN, and CodeGen
support for prefering RISBGN over RISBG on zEC12, unless we can
actually make use of the condition code set by RISBG.
llvm-svn: 233690
Ulrich Weigand [Tue, 31 Mar 2015 12:56:33 +0000 (12:56 +0000)]
[SystemZ] Use POPCNT instruction on z196
We already exploit a number of instructions specific to z196,
but not yet POPCNT. Add support for the population-count
facility, MC support for the POPCNT instruction, CodeGen
support for using POPCNT, and implement the getPopcntSupport
TargetTransformInfo hook.
llvm-svn: 233689
Ulrich Weigand [Tue, 31 Mar 2015 12:52:27 +0000 (12:52 +0000)]
[SystemZ] Provide basic TargetTransformInfo implementation
This hooks up the TargetTransformInfo machinery for SystemZ,
and provides an implementation of getIntImmCost.
In addition, the patch adds the isLegalICmpImmediate and
isLegalAddImmediate TargetLowering overrides, and updates
a couple of test cases where we now generate slightly
better code.
llvm-svn: 233688
Timur Iskhodzhanov [Tue, 31 Mar 2015 12:50:05 +0000 (12:50 +0000)]
[Sanitizer RT] Put the Symbolizer module name string ownership in order
Reviewed at http://reviews.llvm.org/D8666
llvm-svn: 233687
Rafael Espindola [Tue, 31 Mar 2015 12:31:55 +0000 (12:31 +0000)]
Fix the operand encoding in the test instruction.
Fixes pr22995.
llvm-svn: 233686
Mohit K. Bhakkad [Tue, 31 Mar 2015 12:01:27 +0000 (12:01 +0000)]
[LLDB][MIPS] Read/Write register for MIPS64
Patch by Sagar Thakur
Reviewers: clayborg, tberghammer.
Subscribers: jaydeep, bhushan, mohit.bhakkad, llvm-commits.
Differential Revision: http://reviews.llvm.org/D8695
llvm-svn: 233685
Ulrich Weigand [Tue, 31 Mar 2015 12:01:06 +0000 (12:01 +0000)]
[PowerPC] Remove TargetMachine CPU auto-detection
As was done for X86 in r206094.
llvm-svn: 233684
Tamas Berghammer [Tue, 31 Mar 2015 10:21:50 +0000 (10:21 +0000)]
Fix type detection for 'char' variables
A char can have signed and unsigned encoding but previously lldb always
assumed it is signed. This CL adds a logic to detect the encoding of
'char' types based on the default encoding on the target architecture.
It fixes variable printing and expression evaluation on architectures
where 'char' is signed by default.
Differential revision: http://reviews.llvm.org/D8636
llvm-svn: 233682
James Molloy [Tue, 31 Mar 2015 10:20:58 +0000 (10:20 +0000)]
[SDAG] Move TRUNCATE splitting logic into a helper, and use
it more liberally.
SplitVecOp_TRUNCATE has logic for recursively splitting oversize vectors
that need more than one round of splitting to become legal. There are many
other ISD nodes that could benefit from this logic, so factor it out and
use it for FP_TO_UINT,FP_TO_SINT,SINT_TO_FP,UINT_TO_FP and FTRUNC.
llvm-svn: 233681
Tamas Berghammer [Tue, 31 Mar 2015 10:11:04 +0000 (10:11 +0000)]
Fix Windows build after r233679
llvm-svn: 233680
Tamas Berghammer [Tue, 31 Mar 2015 09:52:22 +0000 (09:52 +0000)]
Move several plugin to its own namespace
Affected paths:
* Plugins/Platform/Android/*
* Plugins/Platform/Linux/*
* Plugins/Platform/gdb-server/*
* Plugins/Process/Linux/*
* Plugins/Process/gdb-remote/*
Differential revision: http://reviews.llvm.org/D8654
llvm-svn: 233679
Tamas Berghammer [Tue, 31 Mar 2015 09:48:53 +0000 (09:48 +0000)]
Create new test for expression evaluation where char type matters
char is a special type in C++ which can be signed/unsigned and have to
be distinguished both from "signed char" and from "unsigned char". This
test check for this behaviour during the expression evaluation with
different compiler settings.
Differential revision: http://reviews.llvm.org/D8657
llvm-svn: 233678
Daniel Jasper [Tue, 31 Mar 2015 09:08:16 +0000 (09:08 +0000)]
Make new test slightly more generic to allow running it under
non-standard test runners.
llvm-svn: 233677
Ed Schouten [Tue, 31 Mar 2015 07:59:53 +0000 (07:59 +0000)]
Also use dl_iterate_phdr() on CloudABI.
The unwinder now works on CloudABI. All exception-related libc++ tests
now pass.
This change was actually part of D8169, which also adds support for
FreeBSD. That, however, still requires some more polishing.
llvm-svn: 233676
Tobias Grosser [Tue, 31 Mar 2015 07:52:36 +0000 (07:52 +0000)]
Do not scale tile loops
We now generate tile loops as:
for (int c1 = 0; c1 <= 47; c1 += 1)
for (int c2 = 0; c2 <= 47; c2 += 1)
for (int c3 = 0; c3 <= 31; c3 += 1)
for (int c4 = 0; c4 <= 31; c4 += 4)
#pragma simd
for (int c5 = c4; c5 <= c4 + 3; c5 += 1)
Stmt_for_body3(32 * c1 + c3, 32 * c2 + c5);
instead of
for (int c1 = 0; c1 <= 1535; c1 += 32)
for (int c2 = 0; c2 <= 1535; c2 += 32)
for (int c3 = 0; c3 <= 31; c3 += 1)
for (int c4 = 0; c4 <= 31; c4 += 4)
#pragma simd
for (int c5 = c4; c5 <= c4 + 3; c5 += 1)
Stmt_for_body3(c1 + c3, c2 + c5);
Run-time performance-wise this makes little difference, but this gives a large
reduction in compile time (10-30% on 17 LNT benchmarks). Apparently the isl
AST generator is not yet very efficient in generating the latter.
llvm-svn: 233675
Craig Topper [Tue, 31 Mar 2015 06:18:31 +0000 (06:18 +0000)]
[X86] Stop changing result of getHostCPUName based on whether the processor supports AVX. getHostCPUFeatures should be used instead to determine whether to support AVX.
llvm-svn: 233674
Craig Topper [Tue, 31 Mar 2015 05:52:57 +0000 (05:52 +0000)]
Make llc use getHostCPUFeatures when 'native' is specified for cpu.
This is necessary for x86 where not all Sandybridge, Ivybrige, Haswell, and Broadwell CPUs support AVX. Currently we modify the CPU name back to Nehalem for this case, but that turns off additional features for these CPUs.
llvm-svn: 233673
Craig Topper [Tue, 31 Mar 2015 05:45:00 +0000 (05:45 +0000)]
[X86] Use getHostCPUFeatures when 'native' is specified for cpu.
This is necessary because not aall Sandybridge, Ivybrige, Haswell, and Broadwell CPUs support AVX. Currently we modify the CPU name back to Nehalem for this case, but that turns off additional features for these CPUs.
llvm-svn: 233672
Craig Topper [Tue, 31 Mar 2015 05:42:45 +0000 (05:42 +0000)]
[X86] Be more robust against unknown Intel family 6 models. Use feature flags to guess what it might be.
llvm-svn: 233671
Chaoren Lin [Tue, 31 Mar 2015 04:26:34 +0000 (04:26 +0000)]
Fix TestSendSignal.py for remote.
Summary: There is an extra eStateConnected before eStateRunning with remote.
Reviewers: clayborg, ovyalov
Reviewed By: clayborg, ovyalov
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8714
llvm-svn: 233670
Eric Fiselier [Tue, 31 Mar 2015 04:15:45 +0000 (04:15 +0000)]
[libcxx] Add code coverage configuration to CMake and LIT.
Summary:
This patch adds configuration to CMake and LIT for running the libc++ test-suite to generate code coverage.
To use code coverage use following instructions.
* Find the clang resource dir using `$CXX -print-search-dirs`. Let <library-dir> be the first library search directory.
* `cmake <regular-options> -DLIBCXX_GENERATE_COVERAGE=ON -DLIBCXX_COVERAGE_LIBRARY=<library-dir>/lib/<platform>/libclang_rt.profile.a <source>`
* `make cxx`
* `make check-libcxx`
* `make generate-libcxx-coverage`
The reason I want this patch upstreamed is so I can setup a bot that generates code coverage and posts in online for every revision.
Reviewers: mclow.lists, jroelofs, danalbert
Reviewed By: danalbert
Differential Revision: http://reviews.llvm.org/D8716
llvm-svn: 233669
Ahmed Bougacha [Tue, 31 Mar 2015 03:16:51 +0000 (03:16 +0000)]
[X86] Generate MOVNT for all vector types.
We used to miss non-Q YMM integer vectors, and, non-Q/D XMM integer
vectors.
While there, change the v4i32 patterns to prefer MOVNTDQ.
llvm-svn: 233668
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 03:07:23 +0000 (03:07 +0000)]
tools: Unify how verifyModule() is called
Unify the error messages for the various tools when `verifyModule()`
fails on an input module. The "brave new way" is:
lltool: path/to/input.ll: error: input module is broken!
llvm-svn: 233667
Alexei Starovoitov [Tue, 31 Mar 2015 02:49:58 +0000 (02:49 +0000)]
[bpf] mark mov instructions as ReMaterializable
loading immediate into register is cheap, so take advantage of remat.
llvm-svn: 233666
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 02:37:13 +0000 (02:37 +0000)]
Verifier: Don't return early from verifyTypeRefs()
We'll no longer crash in the `verifyTypeRefs()` (used to be called
`verifyDebugInfo()`), so there's no reason to return early here. Remove
the `EverBroken` member since this was the only use!
llvm-svn: 233665
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 02:27:32 +0000 (02:27 +0000)]
Verifier: Explicitly verify type references
`verifyDebugInfo()` was doing two things:
- Asserting on unresolved type references.
- Calling `Verify()` functions for various types of debug info.
The `Verify()` functions have been gutted, so rename the function to
`verifyTypeRefs()` and explicitly check those. Instead of assertions,
we get nice error messages now.
llvm-svn: 233664
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 02:09:55 +0000 (02:09 +0000)]
Verifier: Move over DISubprogram::Verify()
Move over the remaining (somewhat complicated) check from
`DISubprogram::Verify()`. I suspect this check could be optimized --
e.g., it would be nice not to do another full traversal here -- but it's
not exactly obvious how. For now, just bring it over as is.
Once we have a better model for the "canonical" subprogram of a
`Function`, we should enforce that all `!dbg` attachments lead to the
canonical one.
llvm-svn: 233663
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 02:06:28 +0000 (02:06 +0000)]
DebugInfo: Rewrite llvm::getDISubprogram(), NFC
Simplify implementation of `llvm::getDISubprogram()`. I might go
through and see how difficult it is to update the users, since this
function doesn't really seem necessary anymore.
llvm-svn: 233662
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 01:47:55 +0000 (01:47 +0000)]
DebugInfo: Hide isScopeRef() and isTypeRef() behind NDEBUG
The copies of these in `lib/IR/DebugInfo.cpp` are apparently [1] only
used in assertions now, so hide them behind `#ifndef NDEBUG`.
[1]: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/9238
llvm-svn: 233661
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 01:47:37 +0000 (01:47 +0000)]
DebugInfo: Factor out RETURN_FROM_RAW, etc.
Remove the helper macros `RETURN_FROM_RAW()`,
`RETURN_DESCRIPTOR_FROM_RAW()`, and `RETURN_REF_FROM_RAW()`, since they
don't do anything too special anymore. This loses an `assert(get())`,
but I'm hoping any crashes were shaken out when r232844 landed a few
weeks ago.
llvm-svn: 233660
Eric Fiselier [Tue, 31 Mar 2015 01:41:32 +0000 (01:41 +0000)]
Allow enabling CCache through an env variable. This helps enable/disable the option on buildbots.
llvm-svn: 233659
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 01:28:58 +0000 (01:28 +0000)]
Verifier: Check reference flags in debug info
Move over checks of `&` and `&&` flags.
llvm-svn: 233658
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 01:28:22 +0000 (01:28 +0000)]
Verifier: Move more debug info checks away from Verify()
Most of these checks were already in the `Verifier` so this is more of a
cleanup. Now almost everything is over there.
Now that require a `name:` for `MDGlobalVariable`, add a check in
`LLParser` for it.
llvm-svn: 233657
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 01:19:51 +0000 (01:19 +0000)]
DebugInfo: Move debug info flags to the new hierarchy
Move definition of the debug info flags to the new hierarchy, but leave
them duplicated in `DIDescriptor` for now to reduce code churn. My
current plan is to remove `DIDescriptor` entirely, so the duplication
should go away naturally.
llvm-svn: 233656
Chaoren Lin [Tue, 31 Mar 2015 00:59:13 +0000 (00:59 +0000)]
Fix call to llvm::Target::createMCInstPrinter.
llvm-svn: 233655
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 00:47:15 +0000 (00:47 +0000)]
Verifier: Move checks over from DIDescriptor::Verify()
Move over some more checks from `DIDescriptor::Verify()`, and change
`LLParser` to require non-null `file:` fields in compile units.
I've ignored the comment in test/Assembler/metadata-null-operands.ll
since I disagree with it. At the time that test was written (r229960),
the debug info verifier wasn't on by default, so my comment there is in
the context of not expecting the verifier to be useful. It is now, and
besides that, since r233394 we can check when parsing textual IR whether
an operand is null that shouldn't be.
llvm-svn: 233654
Quentin Colombet [Tue, 31 Mar 2015 00:31:13 +0000 (00:31 +0000)]
[AArch64] Fix poor codegen for add immediate.
We used to match the register variant before the immediate when the register
argument could be implicitly zero-extended.
llvm-svn: 233653
Vince Harron [Tue, 31 Mar 2015 00:27:10 +0000 (00:27 +0000)]
Increate backlog of lldb-platform's listener socket
lldb-platform's listener socket only had a backlog of one connection.
That means that if more than one client connected simultaneously, the
connection would be refused. The test suite can be run remotely with
dozens of threads connecting simultaneously. Raised this limit to 100
to effectively eliminate lost connections.
Test Plan:
run tests against a remote target
Differential Revision: http://reviews.llvm.org/D8696
llvm-svn: 233652
Vince Harron [Tue, 31 Mar 2015 00:24:51 +0000 (00:24 +0000)]
Fix socket leak in lldb-server platform
lldb-server server process was holding on to a connection to every
client that connected. This continued until the process hit it's
file limit and exited.
lldb-server p --listen *:5432 --server
run remote tests against that server more than 1000 times
Differential Revision: http://reviews.llvm.org/D8697
llvm-svn: 233651
Duncan P. N. Exon Smith [Tue, 31 Mar 2015 00:10:37 +0000 (00:10 +0000)]
DebugInfo: Remove LexicalBlockFile scope/context distinction
Two things here:
1. I read `getScope()` and `getContext()` backwards in r233640. There
was no need for `getScopeOfScope()`. Obviously not enough test
coverage here (as I said in that commit, I'm going to come back to
that), but anyway I'm reverting to the behaviour before r233640.
2. The callers that use `DILexicalBlockFile::getContext()` don't seem
to care about the difference. Just have it redirect to `getScope()`
so I can't get confused again.
llvm-svn: 233650
Eric Christopher [Tue, 31 Mar 2015 00:10:23 +0000 (00:10 +0000)]
Update for llvm commit r233648.
llvm-svn: 233649
Eric Christopher [Tue, 31 Mar 2015 00:10:04 +0000 (00:10 +0000)]
Replace the MCSubtargetInfo parameter with a Triple when creating
an MCInstPrinter. Update all callers and use where we wanted a Triple
previously.
llvm-svn: 233648
NAKAMURA Takumi [Tue, 31 Mar 2015 00:03:43 +0000 (00:03 +0000)]
llvm/examples: Suppress building a few JIT examples.
examples/ExceptionDemo/CMakeFiles/ExceptionDemo.dir/ExceptionDemo.cpp.o:(.data.rel.ro._ZTIN4llvm18MCJITMemoryManagerE[_ZTIN4llvm18MCJITMemoryManagerE]+0x10): undefined reference to `typeinfo for llvm::RuntimeDyld::MemoryManager'
llvm-svn: 233647
NAKAMURA Takumi [Tue, 31 Mar 2015 00:03:36 +0000 (00:03 +0000)]
llvm/examples: Add RuntimeDyld as libdeps.
llvm-svn: 233646
Chaoren Lin [Tue, 31 Mar 2015 00:03:00 +0000 (00:03 +0000)]
Fix .gitignore to ignore symlinks.
llvm-svn: 233645
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 23:58:59 +0000 (23:58 +0000)]
LexicalScopes: Cleanup remaining uses of DebugLoc
llvm-svn: 233644
Duncan P. N. Exon Smith [Mon, 30 Mar 2015 23:47:26 +0000 (23:47 +0000)]
DebugLoc: Remove getFromDILexicalBlock()
The only user of `DebugLoc::getFromDILexicalBlock()` was creating a new
`MDLocation` as convenient API for passing an `MDScope`. Stop doing
that, and remove the API. If in the future we actually *want* to create
new DebugLocs, calling `MDLexicalBlock::get()` makes more sense.
llvm-svn: 233643
Fariborz Jahanian [Mon, 30 Mar 2015 23:30:24 +0000 (23:30 +0000)]
[Objective-C patch]. Amend TransformObjCMessageExpr to handle call
to 'super' of instance/class methods and not assert.
rdar://
20350364
llvm-svn: 233642
Marshall Clow [Mon, 30 Mar 2015 23:26:16 +0000 (23:26 +0000)]
Make the new tests better; make sure that we're testing the case where no reallocation has to happen
llvm-svn: 233641