Commit Graph

178044 Commits

Author SHA1 Message Date
Benjamin Kramer a054343415 As funny as it might look, this wasn't what I intended to test.
llvm-svn: 212549
2014-07-08 16:42:54 +00:00
Todd Fiala 9189e034f1 Remove hack from dotest.py to fix extra output on -P command, and fix MacOSX multi-threaded test run collisions on crashlog.dylib.
On MacOSX, we need to adjust the way we clean up the crashlog dylib in deleteCrashInfoDylib().
Right now it is only geared to run one test at a time.  For now I'm just skipping the delete.
I'll work with Apple on a fix that handles this.  It seems to only cause one dylib total to
hang around that might otherwise have been deleted.  Fixes MacOSX multiple tests running
at the same time.  (I didn't hit this on Yosemite, might be an issue that only shows up
on Mavericks?)

llvm-svn: 212548
2014-07-08 16:29:54 +00:00
Ulrich Weigand 862d8b8d06 [PowerPC] Implement atomic NAND operations as actual NAND
This changes the implementation of atomic NAND operations
from "a & ~b" (compatible with GCC < 4.4) to actual "~(a & b)"
(compatible with GCC >= 4.4).

This is in line with the common-code and ARM back-end change
implemented in r212433.

llvm-svn: 212547
2014-07-08 16:16:02 +00:00
Benjamin Kramer 5fc40fe28c Use explicit if and restore lost FileCheck error code checking.
llvm-svn: 212546
2014-07-08 16:15:48 +00:00
Benjamin Kramer 46741758c1 Update unit test for signature change.
llvm-svn: 212545
2014-07-08 16:07:39 +00:00
Benjamin Kramer ce416398ef Turn some Twine locals into const char * variables.
No functionality change, just stylistic cleanup. Change made by clang-tidy
and clang-format.

llvm-svn: 212544
2014-07-08 16:07:36 +00:00
Todd Fiala 9734280f33 Fix broken tests due to new error output.
This reverses out the options validators changes.  We'll get these
back in once the changes to the output can be resolved.

Restores broken tests on FreeBSD, Linux, MacOSX.

Changes reverted: r212500, r212317, r212290.

llvm-svn: 212543
2014-07-08 15:55:32 +00:00
Simon Atanasyan e693e8f8f0 [Mips] Make rel-dynamic-07.test test case independent from external input files.
llvm-svn: 212542
2014-07-08 15:47:55 +00:00
David Blaikie 326ffb3683 Improve memory ownership of vfs::Files in the FileSystemStatCache by using std::unique_ptr
Spotted after a memory leak (due to the complexities of manual memory
management) was fixed in 212466.

llvm-svn: 212541
2014-07-08 15:46:02 +00:00
Benjamin Kramer ee58721875 [clang-tidy] Address review comments for the Twine checker.
- Remove unused includes.
- Minor wording fix.
- Added support to check for clang-tidy messages to check_clang_tidy_fix.sh
= Updated test case.

llvm-svn: 212540
2014-07-08 15:41:20 +00:00
Andrea Di Biagio d261e98f3d [DAG] Teach how to combine a pair of shuffles into a single shuffle if the resulting mask is legal.
This patch teaches how to fold a shuffle according to rule:
  shuffle (shuffle (x, undef, M0), undef, M1) -> shuffle(x, undef, M2)

We do this only if the resulting mask M2 is legal; this is to avoid introducing
illegal shuffles that are potentially expanded into a sub-optimal sequence
of target specific dag nodes.

This patch has the advantage of being target independent, since it works on ISD
nodes. Therefore, all targets (not only x86) can take advantage of this rule.
The idea behind this patch is that most shuffle pairs can be safely combined
before we run the legalizer on vector operations. This allows us to
combine/simplify dag nodes earlier in the process and not only immediately
before instruction selection stage.

That said. This patch is not meant to replace any existing target specific
combine rules; backends might still introduce new shuffles during legalization
stage. Also, this rule is very simple and avoids to aggressively optimize
shuffles.

llvm-svn: 212539
2014-07-08 15:22:29 +00:00
Marshall Clow 56cca89fc3 Fix some failing tests for the standard containers. The tests were failing in 32-bit mode because they assumed that std::size_type and make_unsigned<ptrdiff_t>::type were always the same type. No change to libc++, just the tests.
llvm-svn: 212538
2014-07-08 15:19:40 +00:00
Benjamin Kramer cccdadca45 Fix some Twine locals.
Two of those are use after frees. Found by clang-tidy, fixed by me.

llvm-svn: 212537
2014-07-08 14:55:06 +00:00
Todd Fiala 57fd7abd58 Fix broken MacOSX Xcode build for CommandOptionValidators.cpp.
llvm-svn: 212536
2014-07-08 14:52:11 +00:00
Benjamin Kramer 190e2cfd74 [clang-tidy] Add a little checker for Twine locals in LLVM.
Those often cause use after free bugs and should be generally avoided.
Technically it is safe to have a Twine with >=2 components in a variable
but I don't think it is a good pattern to follow. The almost trivial checker
comes with elaborated fix-it hints that turn the Twine into a std::string
if necessary and otherwise fall back to the original type if the Twine
is created from a single value.

llvm-svn: 212535
2014-07-08 14:32:17 +00:00
Evgeniy Stepanov eb893a1fd6 [msan] Fix out of bounds access in origin copying.
llvm-svn: 212534
2014-07-08 14:15:23 +00:00
Kostya Serebryany 6136aae323 [tsan] Enable tsan's deadlock detector by default.
The tsan's deadlock detector has been used in Chromium for a while;
it found a few real bugs and reported no false positives.
So, it's time to give it a bit more exposure.

llvm-svn: 212533
2014-07-08 13:40:08 +00:00
Dmitry Vyukov edbb54d60c tsan: fix a potential hang
idx0 is not updated in the branch,
so if we take that branch idx0 will stay updated forever

llvm-svn: 212532
2014-07-08 13:36:59 +00:00
Dmitry Vyukov a480d3013a tsan: fix a bug in metamap
The bug happens in the following case:
Mutex is located at heap block beginning,
when we call MutexDestroy, s->next is set to 0,
so free can't find the MBlock related to the block.

llvm-svn: 212531
2014-07-08 13:28:01 +00:00
Timur Iskhodzhanov a4212c244a [ASan/Win] Don't instrument private COMDAT globals until PR20244 is properly fixed
llvm-svn: 212530
2014-07-08 13:18:58 +00:00
Kostya Serebryany 3d570b960e [tsan] fix deadlock detector's interoperation with java locks (https://code.google.com/p/thread-sanitizer/issues/detail?id=67)
llvm-svn: 212529
2014-07-08 13:16:03 +00:00
Daniel Sanders 324ad956e0 [mips] Fixed struct/class mismatch introduced in r212522.
Clang emits a warning about this.

llvm-svn: 212528
2014-07-08 13:13:42 +00:00
Dmitry Vyukov b0250948c6 tsan: remove unnecessary line split
llvm-svn: 212527
2014-07-08 13:07:23 +00:00
Kostya Serebryany 7e49b06446 [tsan] fix pthread_rwlock_tryrdlock interceptor, don't try to detect deadlocks when reporting bad unlock
llvm-svn: 212526
2014-07-08 12:46:30 +00:00
Alexander Musman af89c4e51f [OPENMP] Allow ‘reduction’ clause on ‘omp simd’ directive.
llvm-svn: 212525
2014-07-08 11:33:21 +00:00
Richard Sandiford dcb8d9cc80 Move misplaced x86_32 ABI code
r184166 added an X86_32 function in the middle of the SystemZ code.
The SystemZ port had been added only a couple of weeks earlier and
the original patch probably predated that.

No behavioral change intended.

llvm-svn: 212524
2014-07-08 11:10:34 +00:00
Daniel Sanders 7201a3e3bb Fix r212522 - [mips] Improve encapsulation of the .MIPS.abiflags implementation and limit scope of related enums
Added two lines that should have been in r212522.

llvm-svn: 212523
2014-07-08 10:35:52 +00:00
Daniel Sanders c7dbc630e5 [mips] Improve encapsulation of the .MIPS.abiflags implementation and limit scope of related enums
Summary:
Follow on to r212519 to improve the encapsulation and limit the scope of the enums.

Also merged two very similar parser functions, fixed a bug where ASE's
were not being reported, and marked CPR1's as being 128-bit when MSA is
enabled.

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

llvm-svn: 212522
2014-07-08 10:11:38 +00:00
Renato Golin b8a86c43c0 Revert "Refactor ARM subarchitecture parsing"
This reverts commit 7b4a6882467e7fef4516a0cbc418cbfce0fc6f6d.

llvm-svn: 212521
2014-07-08 10:06:16 +00:00
Arnaud A. de Grandmaison d7827606de Truncate the immediate in logical operation to the register width
And continue to produce an error if the 32 most significant bits are not all ones or zeros.

llvm-svn: 212520
2014-07-08 09:53:04 +00:00
Vladimir Medic fb8a2a95cd Mips.abiflags is a new implicitly generated section that will be present on all new modules. The section contains a versioned data structure which represents essentially information to allow a program loader to determine the requirements of the application. This patch implements mips.abiflags section and provides test cases for it.
llvm-svn: 212519
2014-07-08 08:59:22 +00:00
Viktor Kutuzov cc02abbb20 Support building floating-point facilities on FreeBSD 9.2 in 32-bit mode
Differential Revision: http://reviews.llvm.org/D3909

llvm-svn: 212518
2014-07-08 08:52:57 +00:00
Chandler Carruth 142e966261 [x86,SDAG] Sink the logic for folding shuffles of splats more
aggressively from the x86 shuffle lowering to the generic SDAG vector
shuffle formation code.

This code already tried to fold away shuffles of splats! It just had
lots of bugs and couldn't handle the case my new x86 shuffle lowering
needed.

First, it failed to correctly compute whether N2 was undef because it
pre-computed this, then did transformations which could *make* N2 undef,
then failed to ever re-consider the precomputed state.

Second, it didn't look through bitcasts at all, even in the safe cases
where they are just element-type bitcasts with no change to the number
of elements.

Third, it didn't handle all-zero bit casts nicely the way my code in the
x86 side of things did, which is essential to getting good zext-shuffle
lowerings.

But all of these are generic. I just ported the code down to this layer
and fixed the surrounding bugs. Tests exercising this in the x86 backend
still pass and some silly code in widen_cast-6.ll gets better. I updated
that test to be a bit more precise but it's still pretty unclear what
the value of the test is in this day and age.

llvm-svn: 212517
2014-07-08 08:45:38 +00:00
Alexey Bataev 84d0b3efee [OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.
llvm-svn: 212516
2014-07-08 08:12:03 +00:00
Chandler Carruth efbce58775 [SDAG] Actually check for a non-constant splat and clarify comments
around the handling of UNDEF lanes in boolean vector content analysis.

The code before my changes here also failed to check for non-constant
splats in a buildvector. I have no idea how to trigger this, I just
spotted by inspection when trying to understand the code. It seems
extremely unlikely to be worth the trouble to teach the only caller of
this code (DAG combining setcc patterns) how to cleverly handle undef
lanes, so I've just commented more thoroughly that we're giving up
there.

llvm-svn: 212515
2014-07-08 07:44:15 +00:00
Chandler Carruth b844e72e85 [SDAG] Build up a more rich set of APIs for querying build-vector SDAG
nodes about whether they are splats. This is factored out and improved
from r212324 which got reverted as it was far too aggressive. The new
API should help more conservatively handle buildvectors that are
a mixture of splatted and undef values.

No functionality change at this point. The hope is to slowly
re-introduce the undef-tolerant optimization of splats, but each time
being forced to make a concious decision about how to handle the undefs
in a way that doesn't lead to contradicting assumptions about the
collapsed value.

Hal has pointed out in discussions that this may not end up being the
desired API and instead it may be more convenient to get a mask of the
undef elements or something similar. I'm starting simple and will expand
the API as I adapt actual callers and see exactly what they need.

llvm-svn: 212514
2014-07-08 07:19:55 +00:00
Todd Fiala 3f0a360f18 Enable multi-process testing for MacOSX.
This change modifies the way the multi-threaded test runner works.
It uses the Python multiprocessing library rather than the threading
library.  Investigation showed that all MacOSX threads were waiting on
the global python lock when using the threading approach.  Not sure
why that differed from the Linux/FreeBSD implementations.

The new approach uses the multiprocessing library's Pool class.  It's
mildly cleaner than the other version, runs multithreaded on MacOSX,
and seems to have caused no performance regression on Linux.  The
worker thread logic is simpler with the Pool managing the worker
processes.

This also includes a minor change to the test runner's python
lldb dir logic using the -P option.  It now looks at the last line
of output rather than the first line.  This covers part of the issue
of extra options validation logic getting spit out.  The test runner
will now pick up the right python library directory.  It does not
fix all the issues, though, as a ton of tests (50+ on Linux) are
failing due to unexpected output when running lldb.

llvm-svn: 212513
2014-07-08 06:42:37 +00:00
Saleem Abdulrasool c4ebb129b7 Headers: conditionalise more declarations
Protect MMX specific declarations under a __MMX__ guard.  This header can be
included on non-x86 architectures (e.g. ARM) which do not support the MMX ISA.
Use the preprocessor to prevent these declarations from being processed.

llvm-svn: 212512
2014-07-08 05:46:04 +00:00
Saleem Abdulrasool 60df0615b6 Headers: mark arm_acle.h with extern "C"
Although the functions are marked as always_inline, the compiler with which they
are used may not honour the extended attributes and emit them as functions.  In
such a case, indicate that they should have extern "C" linkage and should not be
mangled in C++ style if used within C++.

llvm-svn: 212511
2014-07-08 05:46:00 +00:00
Zachary Turner 310035a4f9 Implment "platform process list" for Windows.
This patch implements basic functionality of the "platform process
list" command for Windows.  Currently this has the following
limitations.

* Certain types of filtering are not enabled (e.g. filtering by
  architecture with -a), although most filters work.
* The username of the process is not yet obtained.
* Using -v to list verbose information generates an error.
* The architecture column displays the entire triple, leading to
  misaligned formatting of the printed table.

Reviewed by: Greg Clayton
Differential Revision: http://reviews.llvm.org/D4413

llvm-svn: 212510
2014-07-08 04:52:15 +00:00
Zachary Turner 24f3dee6ca Fix a compilation failure caused by a non-const reference.
llvm-svn: 212509
2014-07-08 04:28:07 +00:00
Reid Kleckner afba553ede MS ABI: "Fix" passing non-POD structs by value to variadic functions
Of course, such code is horribly broken and will explode on impact.
That said, ATL does it, and we have to support them, at least a little
bit.

Fixes PR20191.

llvm-svn: 212508
2014-07-08 02:24:27 +00:00
Jim Ingham 3f762ef111 Add docs for the "thread.completed-expression" format entry.
llvm-svn: 212507
2014-07-08 01:10:49 +00:00
Jim Ingham 30fadafefe If a hand-called function is interrupted by hitting a breakpoint, then
when you continue to finish off the function call, the expression result
will be included as part of the thread stop info.

llvm-svn: 212506
2014-07-08 01:07:32 +00:00
Alexey Samsonov c94285a1a0 [ASan] Completely remove sanitizer blacklist file from instrumentation pass.
All blacklisting logic is now moved to the frontend (Clang).
If a function (or source file it is in) is blacklisted, it doesn't
get sanitize_address attribute and is therefore not instrumented.
If a global variable (or source file it is in) is blacklisted, it is
reported to be blacklisted by the entry in llvm.asan.globals metadata,
and is not modified by the instrumentation.

The latter may lead to certain false positives - not all the globals
created by Clang are described in llvm.asan.globals metadata (e.g,
RTTI descriptors are not), so we may start reporting errors on them
even if "module" they appear in is blacklisted. We assume it's fine
to take such risk:
  1) errors on these globals are rare and usually indicate wild memory access
  2) we can lazily add descriptors for these globals into llvm.asan.globals
     lazily.

llvm-svn: 212505
2014-07-08 00:50:49 +00:00
Adam Nemet 79580db918 [X86] AVX512: Only allow k1-k7 as predicates to vpcmp*
As destination k0 is allowed but not as predicate/writemask.

I also modified the test to allow checking of error messages by the assembler.
I applied a similar approach to the test ret.s in the same directory.

llvm-svn: 212504
2014-07-08 00:22:32 +00:00
Alexey Samsonov 07435c4775 Kill unnecessary include
llvm-svn: 212503
2014-07-08 00:03:11 +00:00
Alp Toker d920b7fc85 Rename static function to better describe its purpose
llvm-svn: 212502
2014-07-08 00:02:05 +00:00
Alexey Samsonov ac4afe49e7 [Sanitizer] Remove brittle cache variable and slightly simplify blacklisting code.
Now CodeGenFunction is responsible for looking at sanitizer blacklist
(in CodeGenFunction::StartFunction) and turning off instrumentation,
if necessary.

No functionality change.

llvm-svn: 212501
2014-07-07 23:59:57 +00:00
Zachary Turner 28638911cd Invalidate process UID/GID-related command options on Windows.
Windows uses a different process security model and does not have
a concept of process UID or GID.  This patch makes these options
invalid on Windows.  Attempting to specify these options when the
current platform is Windows will generate an error.

Reviewed by: Jim Ingham
Differential Revision: http://reviews.llvm.org/D4373

llvm-svn: 212500
2014-07-07 23:54:51 +00:00