Commit Graph

129896 Commits

Author SHA1 Message Date
Nuno Lopes d0bcfe4d9d fix the regression I introduced in r159385 (it's necessary to update PHI nodes in unwind BB
llvm-svn: 159534
2012-07-02 16:14:47 +00:00
Alexey Samsonov 6f510f8eb5 [TSan] use threadsafe death tests in TSan unit tests
llvm-svn: 159533
2012-07-02 14:35:25 +00:00
Stepan Dyatkovskiy 0373bbc8d6 IntRange, fixed warning in isSingleNumber method
llvm-svn: 159532
2012-07-02 14:10:46 +00:00
Chandler Carruth 665c76bc52 The built-in shell test runner for some reason doesn't like the quoting
and multi-line nature of this test. I don't really feel like bugging
this kind of edge-case, so just put it on one line and use single
quotes. With this, every test *really* passes with the built-in shell
test runner.

llvm-svn: 159530
2012-07-02 13:35:01 +00:00
Chandler Carruth 872ac7cfad Fix the TCL-style quoting in one random test that somehow slipped
through my perl nets.

With this, the test suite passes even if I force it to run with the
built-in shell test logic, except for a test which REQUIREs shell.

llvm-svn: 159529
2012-07-02 13:29:47 +00:00
Chandler Carruth a25971326f Teach the built-in shell test runner in lit to handle '|&'-style pipes.
This is directly cloned from the logic in the TCL test bits of lit.
Hopefully will fix most of the windows build bot fallout.

llvm-svn: 159528
2012-07-02 13:10:15 +00:00
Stepan Dyatkovskiy 8b9ecca42d IntRange:
- Changed isSingleNumber method behaviour. Now this flag is calculated on demand.
IntegersSubsetMapping
  - Optimized diff operation.
  - Replaced type of Items field from std::list with std::map.
  - Added new methods:
    bool isOverlapped(self &RHS)
    void add(self& RHS, SuccessorClass *S)
    void detachCase(self& NewMapping, SuccessorClass *Succ)
    void removeCase(SuccessorClass *Succ)
    SuccessorClass *findSuccessor(const IntTy& Val)
    const IntTy* getCaseSingleNumber(SuccessorClass *Succ)
IntegersSubsetTest
  - DiffTest: Added checks for successors.
SimplifyCFG
  Updated SwitchInst usage (now it is case-ragnes compatible) for
    - SimplifyEqualityComparisonWithOnlyPredecessor
    - FoldValueComparisonIntoPredecessors

llvm-svn: 159527
2012-07-02 13:02:18 +00:00
Chandler Carruth a5a29f970e Convert all tests using TCL-style quoting to use shell-style quoting.
This was done through the aid of a terrible Perl creation. I will not
paste any of the horrors here. Suffice to say, it require multiple
staged rounds of replacements, state carried between, and a few
nested-construct-parsing hacks that I'm not proud of. It happens, by
luck, to be able to deal with all the TCL-quoting patterns in evidence
in the LLVM test suite.

If anyone is maintaining large out-of-tree test trees, feel free to poke
me and I'll send you the steps I used to convert things, as well as
answer any painful questions etc. IRC works best for this type of thing
I find.

Once converted, switch the LLVM lit config to use ShTests the same as
Clang. In addition to being able to delete large amounts of Python code
from 'lit', this will also simplify the entire test suite and some of
lit's architecture.

Finally, the test suite runs 33% faster on Linux now. ;]
For my 16-hardware-thread (2x 4-core xeon e5520): 36s -> 24s

llvm-svn: 159525
2012-07-02 12:47:22 +00:00
Chandler Carruth 0a4a261365 Make tests which first provide a negative assertion via 'not', then
a pipeline, and then a positive assertion via grep, use two RUN lines
instead.

Supporting these complex ideas of 'success' and 'failure' across
multiple stages of a pipeline is brittle in the shell world, and would
block switching to ShTest format; it only worked due to contrivances
introduced by the TclTest format.

Writing this as two separate RUN lines seems clearer in any event.

This is another step toward completely removing TclTests from lit.

llvm-svn: 159524
2012-07-02 12:23:19 +00:00
Chandler Carruth ae00a80869 Rewrite three tests that had truly egregious abuses of 'grep' in them to
use FileCheck.

Aside from removing a dependence on TCL-style quoting, this also makes
the tests ... significantly more robust. =] It would be really, *really*
great of the maintainer(s) of the CellSPU backend went through and
systematically rewrite these tests to use FileCheck. There are a lot
more that have nearly this bad of abuses.

Another step along the path to a TclTest-free testsuite.

llvm-svn: 159523
2012-07-02 12:20:14 +00:00
Kostya Serebryany eeaf688c0f [asan] small code simplification
llvm-svn: 159522
2012-07-02 11:42:29 +00:00
Kostya Serebryany 41a83c84f6 [asan] update docs: mention MacOS 10.7 and correct the ifdef sample for __has_feature
llvm-svn: 159521
2012-07-02 11:00:33 +00:00
Chandler Carruth 8bdfe1ec92 Switch a bunch of Linker tests from using elaborate echo productions to
just provide and reference separate input files from an Inputs
subdirectory. This pattern works very well in the Clang tree and is
easier to understand in my opinion. It also has fewer limitations and
will remove one particularly annoying use of TCL-style {} quoting from
the testsuite.

Also teach the LLVM lit configuration to avoid recursing into 'Inputs'
subdirectories. This wasn't required for the previous 'Inputs'
subdirectories used due to fortuitous suffix patterns.

This is the first step to completely removing support for TCL-style tests.

llvm-svn: 159520
2012-07-02 10:18:06 +00:00
Dmitry Vyukov b13099c26e asan/tsan: improve SpinMutex
llvm-svn: 159518
2012-07-02 07:09:21 +00:00
James Dennett 9784d093e1 Documentation cleanup: reformatting/fixing up file comments so that they have
\file and \brief markup and appear in Doxygen's summaries (and eventually at
http://clang.llvm.org/doxygen/files.html).  Fixed up another couple of minor
glitches in the docs at the same time.

llvm-svn: 159517
2012-07-02 07:01:42 +00:00
Dmitry Vyukov b462dfcaeb tsan/asan: add mutex to 64-bit allocator
llvm-svn: 159516
2012-07-02 06:54:24 +00:00
Craig Topper 6490bdcf72 Rename tzcnt intrinsics to match gcc.
llvm-svn: 159515
2012-07-02 06:52:51 +00:00
Alexey Samsonov 4618508ea4 [ASan] cmake cleanup: make tab/space padding in CMakeLists consistent, silence/fix some pedantic warnings
llvm-svn: 159514
2012-07-02 06:48:10 +00:00
Richard Smith 1355465227 Additional testing for fixes in r158289 and r158290 to allow implicitly-declared
constructors for non-literal types to be constexpr in some circumstances.

llvm-svn: 159513
2012-07-02 06:15:40 +00:00
Alexey Samsonov f4462fa3ca This patch extends the libLLVMDebugInfo which contains a minimalistic DWARF parser:
1) DIContext is now able to return function name for a given instruction address (besides file/line info).
2) llvm-dwarfdump accepts flag --functions that prints the function name (if address is specified by --address flag).
3) test case that checks the basic functionality of llvm-dwarfdump added

llvm-svn: 159512
2012-07-02 05:54:45 +00:00
Jim Ingham 03afad8f1e Add an "extra-startup-commands" process setting so we can send some command strings to the actual process plugin to interpret as it wishes.
llvm-svn: 159511
2012-07-02 05:40:07 +00:00
Rafael Espindola a77d31d7fd Now that RegistersDefinedFromSameValue handles one instruction being an
implicit_def, the other instruction can be anything, including instructions
that define multiple values. Be careful about that and don't assume what operand
0 is.
Fixes pr13249.

llvm-svn: 159509
2012-07-01 17:08:01 +00:00
Meador Inge cfb6090912 PR13189: va_list broken with precompiled headers
For some targets a structure named __va_list_tag is built to help define
the __builtin_va_list type.  However, __va_list_tag was not being treated as a
predefined type thus causing problems when serializing the AST.  This commit
fixes that oversight by adding the necessary support to treat __va_list_tag
as a predefined type.

llvm-svn: 159508
2012-07-01 15:57:25 +00:00
Tobias Grosser 1b593a114e Update to Polly for LLVM r159383 which changes SelectionDAGBuilder.cpp.
Contributed by: Yabin Hu <yabin.hwu@gmail.com>

llvm-svn: 159507
2012-07-01 13:47:50 +00:00
Elena Demikhovsky 9af899fa88 Optimization of shuffle node that can fit to the register form of VBROADCAST instruction on AVX2.
llvm-svn: 159504
2012-07-01 06:12:26 +00:00
Craig Topper 3af251dbf1 Reduce code size by using a second switch statement to avoid extra calls to SelectAtomic64. Also catch cases where SelectAtomic64 fails.
llvm-svn: 159503
2012-07-01 02:55:34 +00:00
Craig Topper e15e5f7c5c Add a break to the end of case statement missed in r159501.
llvm-svn: 159502
2012-07-01 02:18:18 +00:00
Craig Topper fbb954f727 Fix a crash on release builds if gather intrinsics are passed a non-constant value for the last argument.
llvm-svn: 159501
2012-07-01 02:17:08 +00:00
Craig Topper def044b974 Use a second switch statement to reduce number of calls to SelectGather in code. Reduces code size a bit.
llvm-svn: 159500
2012-07-01 02:05:52 +00:00
NAKAMURA Takumi 98346f92f2 c-index-test/Makefile: Tweak USEDLIBS for cygwin. cygclang.dll is not linked to c-index-test yet.
llvm-svn: 159499
2012-07-01 00:40:17 +00:00
Benjamin Kramer e2ef47c145 Reduce use list thrashing by using DenseMap's find_as for maps with ValueHandle keys.
No functionality change.

llvm-svn: 159497
2012-06-30 22:37:15 +00:00
Jordan Rose 58d547200e Add support for the C11 _Alignof keyword.
This behaves like the existing GNU __alignof and C++11 alignof keywords;
most of the patch is simply adding the third token spelling to various places.

llvm-svn: 159494
2012-06-30 21:33:57 +00:00
Arnaud A. de Grandmaison 2b3c860397 [libclang] Make implementation filename match the header's name for CXCompilationDatabase
llvm-svn: 159493
2012-06-30 20:43:43 +00:00
Arnaud A. de Grandmaison 8599ccc6b8 [cindex.py] Fix comments
llvm-svn: 159492
2012-06-30 20:43:37 +00:00
Bill Wendling a164735baa Don't reinsert the 'atexit' function if it already exists.
llvm-svn: 159491
2012-06-30 20:21:19 +00:00
Arnaud A. de Grandmaison de7176ea55 [libclang] Fix autoconf library dependencies for tooling support
llvm-svn: 159490
2012-06-30 12:49:09 +00:00
NAKAMURA Takumi 1e43baa602 c-index-test.c: Fix missing semicolon(s).
llvm-svn: 159486
2012-06-30 11:47:18 +00:00
Arnaud A. de Grandmaison c0560064dd [cindex.py] add CompilationDatabase support
llvm-svn: 159485
2012-06-30 11:28:04 +00:00
Arnaud A. de Grandmaison 0fe28a1a84 [libclang] add CompilationDatabase support
llvm-svn: 159484
2012-06-30 11:27:57 +00:00
Chandler Carruth 8a6290721e Switch Clang to use the new common LLVM CMake infrastructure for adding
lit testsuites. This sinks all management of the aggregate lit runs into
the LLVM CMake files, making Clang only responsible for declaring its
own testsuite. In the process we fix numerous "bugs" where the proper
method of invoking lit has changed over time, and the old system
encoded several broken artifacts of this in ABIs and compatibility
tests.

It also switches to 'check-clang' for the canonical name of the test
suite, although 'clang-test' remains as an alias.

The situation when Clang is being built in standalone mode is little
changed. It replicates just enough of the lit setup to cope with the
oddities of being run outside of an LLVM build.

llvm-svn: 159483
2012-06-30 10:14:27 +00:00
Chandler Carruth 69ce6652b8 Hoist LLVM's lit testsuite infrastructure into module so that it can be
re-used. Also, build in direct support for accumulating a set of lit
parameters, arguments, and testsuites to run as part of a 'check-all'
rule. This sinks 'check-all' from a Clang-specific construct to
a generic construct of the project.

llvm-svn: 159482
2012-06-30 10:14:14 +00:00
Benjamin Kramer 6846d47abb Avoid sign compare warning.
llvm-svn: 159481
2012-06-30 10:02:08 +00:00
Rafael Espindola efab16d43b Handle implicit_defs in the register coalescer. I am still trying to produce
a reduced testcase, but this fixes pr13209.

llvm-svn: 159479
2012-06-30 01:45:55 +00:00
Matt Beaumont-Gay b5b71fe628 Add a missing argument index, wordsmith a little, and 80(ish) columns
llvm-svn: 159478
2012-06-30 01:37:38 +00:00
Fariborz Jahanian d4879414f4 blocks: fixes a crash when encoding block type
with argument type of size 0. // rdar://11777609
PR13229.

llvm-svn: 159477
2012-06-30 00:48:59 +00:00
NAKAMURA Takumi 9d0a11d9a1 test/Driver/crash-report.c: Mark it as XFAIL on win32 hosts, for now. Investigating.
llvm-svn: 159476
2012-06-30 00:29:03 +00:00
Fariborz Jahanian e55c61bc51 Remove dependency on string.h
llvm-svn: 159475
2012-06-29 23:48:43 +00:00
David Blaikie 9c9fd7a77b Unbreak the test from r159469.
llvm-svn: 159474
2012-06-29 23:16:06 +00:00
Richard Trieu db96a42eba Fix typos from r159463 and update tests. Added Matt Beaumont-Gay's suggestion
to improve wording of a diagnostic message.

llvm-svn: 159473
2012-06-29 23:11:10 +00:00
Fariborz Jahanian 271b8d43ce objective-c IRGen: fixes a crash when method type is being mangled
when an argument type size is 0. // rdar://11777609, PR13229

llvm-svn: 159472
2012-06-29 22:54:56 +00:00