Commit Graph

169429 Commits

Author SHA1 Message Date
Bob Wilson 3ca7904fea Remove trailing whitespace introduced in r203028.
llvm-svn: 203588
2014-03-11 17:17:16 +00:00
Marshall Clow ef3d680093 Implement LWG 2360: 'reverse_iterator::operator*() is unimplementable'. Note that this is a (small) behavior change in the library. Reverse iterators whose base iterators' operator* return references to 'within themselves' have been sacrificed to the greater goal of avoiding data races.
llvm-svn: 203587
2014-03-11 17:16:17 +00:00
Fariborz Jahanian bf678e82e1 Objective-C. Diagose use of undefined protocols
when a class adopts a protocol that inherits from 
undefined protocols. // rdar://16111182

llvm-svn: 203586
2014-03-11 17:10:51 +00:00
Jordan Rose a6839aaa9b [analyzer] Check all conditions in a chained if against each other.
Like the binary operator check of r201702, this actually checks the
condition of every if in a chain against every other condition, an
O(N^2) operation. In most cases N should be small enough to make this
practical, and checking all cases like this makes it much more likely
to catch a copy-paste error within the same series of branches.

Part of IdenticalExprChecker; patch by Daniel Fahlgren!

llvm-svn: 203585
2014-03-11 16:52:29 +00:00
Marshall Clow b708306128 Patch from Steve MacKenzie to make the libc++ tests play nicely with MSVC's STL. Add '#include <functional>' to four of the priority queue tests.
llvm-svn: 203584
2014-03-11 16:22:53 +00:00
Hans Wennborg 6c37f8b985 X86: Don't generate 64-bit movd after cmpneqsd in 32-bit mode (PR19059)
This fixes the bug where we would bitcast the 64-bit floating point result
of cmpneqsd to a 64-bit integer even on 32-bit targets.

Differential Revision: http://llvm-reviews.chandlerc.com/D3009

llvm-svn: 203581
2014-03-11 15:49:24 +00:00
Ulrich Weigand fa84ac9d8a [ppc64] Patch in TOC restore code after all external function calls
When resolving a function call to an external routine, the dynamic
loader must patch the "nop" after the branch instruction to a load
that restores the TOC register.

Current code does that, but only with the *first* instance of a call
to any particular external routine, i.e. at the point where it also
allocates the call stub.  With subsequent calls to the same routine,
current code neglects to patch in the TOC restore code.  This is a
bug, and leads to corrupt TOC pointers in those cases.

Fixed by patching in restore code every time.

llvm-svn: 203580
2014-03-11 15:26:27 +00:00
Marshall Clow ed94639ea1 Mark LWG #2314. 'apply() should return decltype(auto) and use decay_t before tuple_size' as complete. This is a correction to some example code in the standard, no change needed for libc++.
llvm-svn: 203579
2014-03-11 15:17:34 +00:00
Saleem Abdulrasool 0d96f3dd6e ARM: honour -f{no-,}optimize-sibling-calls
Use the options in the ARMISelLowering to control whether tail calls are
optimised or not.  Previously, this option was entirely ignored on the ARM
target and only honoured on x86.

This option is mostly useful in profiling scenarios.  The default remains that
tail call optimisations will be applied.

llvm-svn: 203577
2014-03-11 15:09:54 +00:00
Saleem Abdulrasool b720a6bab7 ARM: remove ancient -arm-tail-calls option
This option is from 2010, designed to work around a linker issue on Darwin for
ARM.  According to grosbach this is no longer an issue and this option can
safely be removed.

llvm-svn: 203576
2014-03-11 15:09:49 +00:00
Saleem Abdulrasool ec1ec1b416 ARM: enable tail call optimisation on Thumb 2
Tail call optimisation was previously disabled on all targets other than
iOS5.0+.  This enables the tail call optimisation on all Thumb 2 capable
platforms.

The test adjustments are to remove the IR hint "tail" to function invocation.
The tests were designed assuming that tail call optimisations would not kick in
which no longer holds true.

llvm-svn: 203575
2014-03-11 15:09:44 +00:00
Erik Verbruggen 3f5dcc97e0 Fix crash in PRE.
After r203553 overflow intrinsics and their non-intrinsic (normal)
instruction get hashed to the same value. This patch prevents PRE from
moving an instruction into a predecessor block, and trying to add a phi
node that gets two different types (the intrinsic result and the
non-intrinsic result), resulting in a failing assert.

llvm-svn: 203574
2014-03-11 15:07:32 +00:00
Daniel Dunbar 3db2acb71a [lit] Fix non-function style print statement.
llvm-svn: 203573
2014-03-11 14:05:49 +00:00
Alexander Potapenko a0c5a6763a [ASan] Don't build the ASan runtime with -undefined dynamic_lookup, which isn't necessary anymore.
Fixes https://code.google.com/p/address-sanitizer/issues/detail?id=266.

llvm-svn: 203572
2014-03-11 14:04:09 +00:00
Evgeniy Stepanov 14cd8e900f [sanitizer] Fix a typo.
llvm-svn: 203568
2014-03-11 13:35:41 +00:00
Tim Northover 445dd58aae ARM: simplify EmitAtomicBinary64
ATOMIC_STORE operations always get here as a lowered ATOMIC_SWAP, so there's no
need for any code to handle them specially.

There should be no functionality change so no tests.

llvm-svn: 203567
2014-03-11 13:19:55 +00:00
Aaron Ballman c6607cd2a1 Changing this test case to use an unknown attribute, since there are not currently any type attributes which would apply to a lambda, except in MSVC compatibility mode.
llvm-svn: 203566
2014-03-11 13:19:42 +00:00
Aaron Ballman b5c59f5862 Gracefully handle an attribute specifier following a lambda introducer when the parameter list wasn't present.
llvm-svn: 203565
2014-03-11 13:03:15 +00:00
Tim Northover c83472e0ff Sema: demote invalid atomic ordering message to warning.
Someone could write:
  if (0) {
    __c11_atomic_load(ptr, memory_order_release);
  }

or the equivalent, which is perfectly valid, so we shouldn't outright reject
invalid orderings on purely static grounds.

rdar://problem/16242991

llvm-svn: 203564
2014-03-11 11:35:10 +00:00
Benjamin Kramer f8502272ef Remove copy ctors that did the same thing as the default one.
The code added nothing but potentially disabled move semantics and made
types non-trivially copyable.

llvm-svn: 203563
2014-03-11 11:32:49 +00:00
Daniel Jasper 8f59ae537c clang-format: Avoid unnecessary break before lambda return type.
Before:
  auto aaaaaaaa = [](int i,  // break
                     int j)
                      -> int {
    return fffffffffffffffffffffffffffffffffffffff(i * j);
  };

After:
  auto aaaaaaaa = [](int i,  // break
                     int j) -> int {
    return fffffffffffffffffffffffffffffffffffffff(i * j);
  };

llvm-svn: 203562
2014-03-11 11:03:26 +00:00
Tim Northover e94a34cae2 Sema: produce error when invalid ordering is passed to atomic builtin
This is a conservative check, because it's valid for the expression to be
non-constant, and in cases like that we just don't know whether it's valid.

rdar://problem/16242991

llvm-svn: 203561
2014-03-11 10:49:14 +00:00
Tim Northover 0622b3a67a Update for IR: add a second AtomicOrdering to cmpxchg insts.
rdar://problem/15996804

llvm-svn: 203560
2014-03-11 10:49:03 +00:00
Tim Northover e94a518a22 IR: add a second ordering operand to cmpxhg for failure
The syntax for "cmpxchg" should now look something like:

	cmpxchg i32* %addr, i32 42, i32 3 acquire monotonic

where the second ordering argument gives the required semantics in the case
that no exchange takes place. It should be no stronger than the first ordering
constraint and cannot be either "release" or "acq_rel" (since no store will
have taken place).

rdar://problem/15996804

llvm-svn: 203559
2014-03-11 10:48:52 +00:00
Erik Verbruggen aab3cfe023 GVN: fix hashing of extractvalue.
My last commit did not add the indexes to the hashed value for
extractvalue. Adding that back in.

llvm-svn: 203558
2014-03-11 10:21:30 +00:00
Daniel Jasper a58dd5db29 clang-format: Fix another false positive in the lambda detection.
Before:
  int i = (*b)[a] -> f();

After:
  int i = (*b)[a]->f();

llvm-svn: 203557
2014-03-11 10:03:33 +00:00
Daniel Jasper d3c7ab975f clang-format: Fix incorrect lambda recognition exposed by r203452.
Before:
  int i = a[a][a] -> f();

After:
  int i = a[a][a]->f();

llvm-svn: 203556
2014-03-11 09:59:36 +00:00
Hafiz Abid Qadeer cd7bdbbba2 Removed code that conditionally included pthread.h for mingw.
This header is generally not available on mingw and can cause build errors.
The windows host code does provide timespec definition that can be used for
mingw case.

llvm-svn: 203555
2014-03-11 09:50:36 +00:00
NAKAMURA Takumi 6c336fa5a7 clang::HeaderSearch: Use default constructor even for POD.
Unfortunately, msvc 2012 didn't accept non-static member initializer.

llvm-svn: 203554
2014-03-11 09:37:27 +00:00
Erik Verbruggen e2d437148a GVN: merge overflow intrinsics with non-overflow instructions.
When an overflow intrinsic is followed by a non-overflow instruction,
replace the latter with an extract. For example:

  %sadd = tail call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %a, i32 %b)
  %sadd3 = add i32 %a, %b

Here the add statement will be replaced by an extract.

When an overflow intrinsic follows a non-overflow instruction, a clone
of the intrinsic is inserted before the normal instruction, which makes
it the same as the previous case. Subsequent runs of GVN can then clean
up the duplicate instructions and insert the extract.

This fixes PR8817.

llvm-svn: 203553
2014-03-11 09:36:48 +00:00
Erik Verbruggen 1d95d18edd Fix fixme: remove unused method.
llvm-svn: 203552
2014-03-11 09:32:50 +00:00
Daniel Jasper c580af96fa clang-format: Detect weird macro lambda usage.
Before:
  void f() {
    MACRO((const AA & a) { return 1; });
  }

After:
  void f() {
    MACRO((const AA &a) { return 1; });
  }

llvm-svn: 203551
2014-03-11 09:29:46 +00:00
NAKAMURA Takumi 020b32de0d clang/test/Modules/include-relative.c REQUIRES shell due to chdir.
llvm-svn: 203550
2014-03-11 09:00:49 +00:00
Richard Smith b81b196a58 Tests for DR381-388.
llvm-svn: 203549
2014-03-11 07:49:32 +00:00
Richard Smith 52e3fbaee8 Revert C++11ification in r203534 and r203536. Apparently our toolchains aren't
ready for this yet.

llvm-svn: 203548
2014-03-11 07:17:35 +00:00
Craig Topper 9140dd2fe7 [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203547
2014-03-11 06:50:42 +00:00
Justin Bogner ffaa2330b9 test: Regenerate profile data for PGO tests
Some of this data had gotten out of date, so we weren't quite testing
what we thought we were. This also moves the outdated data test to its
own file to simplify regenerating the test data.

llvm-svn: 203546
2014-03-11 06:49:34 +00:00
David Blaikie 0e18ed2eba Fix use of uninitialized variable in ExternalASTSourceTest.cpp (introduced in 203525)
llvm-svn: 203545
2014-03-11 06:49:26 +00:00
Tobias Grosser 4ba60fe9eb ScheduleOptimizer: Fix prevectorization.
In case we are at the innermost band, we try to prepare for vectorization. This
means, we look for the innermost parallel loop and strip mine this loop to the
innermost level using a strip-mine factor corresponding to the number of vector
iterations.

For whatever reason, the code that implemented this feature was broken. We now
added a comment, a test case and obviously also the right code.

llvm-svn: 203544
2014-03-11 06:27:36 +00:00
Craig Topper cbce6e9e63 [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203543
2014-03-11 06:22:39 +00:00
Argyrios Kyrtzidis 34fad42003 [HeaderSearch] Fix issue where if a headermap entry maps the filename to a framework import (non-absolute path)
then we fail to find it if it is re-included later on.

rdar://16285490

llvm-svn: 203542
2014-03-11 06:21:28 +00:00
Justin Bogner 52a6a97d70 test: Give instrumentation based profiling tests their own directory
These tests are logically related, but they're spread about several
different CodeGen directories. Consolidate them in one place to make
them easier to manage.

llvm-svn: 203541
2014-03-11 04:37:49 +00:00
Justin Bogner a4fb799d00 test: Fix feature test for "native" in lit.cfg
Checking if the host arch is in the triple isn't quite correct. Change
the feature test to match llvm's, which made the same change in r193459.

llvm-svn: 203540
2014-03-11 04:34:17 +00:00
Marshall Clow b33d838bcf Final bit for LWG #2263; test different allocator pointer types. Note that libc++ already does the right thing here; I've just added tests to ensure that it stays this way.
llvm-svn: 203539
2014-03-11 04:32:12 +00:00
Craig Topper e6f17d0cac De-virtualize a method since it doesn't override anything and isn't overridden itself.
llvm-svn: 203538
2014-03-11 04:07:52 +00:00
Craig Topper 3164f33f8f [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203537
2014-03-11 03:39:26 +00:00
Richard Smith cf91493176 Speculative workaround for apparent libstdc++ bug exposed by r203534.
llvm-svn: 203536
2014-03-11 03:30:30 +00:00
Richard Trieu 99e1c9515a Move the warning about unused relational comparison from -Wunused-value to
-Wunused-comparison.  Also, newly warn on unused result from overloaded
relational comparisons, now also in -Wunused-comparison.

llvm-svn: 203535
2014-03-11 03:11:08 +00:00
Richard Smith d91747980a If a visibility update record is found for a DeclContext after that Decl has
already been loaded, apply that update record to the Decl immediately, rather
than adding it to a pending list and never applying it.

llvm-svn: 203534
2014-03-11 03:10:46 +00:00
Saleem Abdulrasool 1108cb3682 update for renaming in LLVM
llvm-svn: 203533
2014-03-11 03:09:08 +00:00