Commit Graph

137060 Commits

Author SHA1 Message Date
Nick Lewycky a21719d688 When filtering the list of associated namespaces so that we don't suggest people
add functions to namespace 'std', also filter out namespaces with '__' anywhere
in the name.

llvm-svn: 167786
2012-11-13 00:08:34 +00:00
Andrew Trick c25d3fe71e Cleanup -join-splitedges. Make the loop more obvious.
llvm-svn: 167785
2012-11-12 23:59:48 +00:00
Hal Finkel 3b79f55c5f BBVectorize: Only some insert element operand pairs are free.
This fixes another infinite recursion case when using target costs.
We can only replace insert element input chains that are pure (end
with inserting into an undef).

llvm-svn: 167784
2012-11-12 23:55:36 +00:00
Kaelyn Uhrain 8681f9d46d Enable C++11 attribute syntax for warn_unused_result and allow it to be
applied to CXXRecordDecls, where functions with that return type will
inherit the warn_unused_result attribute.

Also includes a tiny fix (with no discernable behavior change for
existing code) to re-sync AttributeDeclKind enum and
err_attribute_wrong_decl_type with warn_attribute_wrong_decl_type since
the enum is used with both diagnostic messages to chose the correct
description.

llvm-svn: 167783
2012-11-12 23:48:05 +00:00
Jean-Daniel Dupas 84705096b2 Update link to external document
llvm-svn: 167781
2012-11-12 23:43:34 +00:00
Anna Zaks 6ec9c3cbc1 [analyzer] Follow up to r167762 - precisely determine the adjustment
conditions.

The adjustment is needed only in case of dynamic dispatch performed by
the analyzer - when the runtime declaration is different from the static
one.

Document this explicitly in the code (by adding a helper). Also, use
canonical Decls to avoid matching against the case where the definition
is different from found declaration.

This fix suppresses the testcase I added in r167762, so add another
testcase to make sure we do test commit r167762.

llvm-svn: 167780
2012-11-12 23:40:29 +00:00
Richard Smith 11d1959ff2 Factor duplicated implicit memcpy call generation code out of copy/move
assignment generation. This incidentally avoids reusing the same Expr* across
multiple statements in the same object; that was generating slightly broken
ASTs, but I couldn't trigger any observable bad behavior, so no test.

llvm-svn: 167779
2012-11-12 23:33:00 +00:00
Greg Clayton 8defc464d5 Patch from Andrew Kaylor that fixes a race condition in the Listener.cpp.
llvm-svn: 167778
2012-11-12 23:15:22 +00:00
Eric Christopher d41010af44 Finish reverting r167761, it's causing test failures.
llvm-svn: 167777
2012-11-12 23:13:34 +00:00
Greg Clayton 45f6973967 New compiler warnings caught issues with the m_encoding_uid field that should have been a lldb::user_id_t type, but was a uint32_t a long time ago and never got updated.
llvm-svn: 167774
2012-11-12 22:54:26 +00:00
Greg Clayton d091afe620 Fixed an error in the ELF parser that was comparing a bool to 4 causing 32 bit ELF relocations to get parsed incorrectly.
llvm-svn: 167773
2012-11-12 22:53:16 +00:00
Daniel Malea d4214f0c86 Fix typo (dwarf/dsym mismatch) in testcase causing early failure on Linux
llvm-svn: 167771
2012-11-12 22:43:13 +00:00
Daniel Malea f1759fa915 Fix minor typo on build page.
llvm-svn: 167770
2012-11-12 22:34:24 +00:00
Michael Liao b193ed44ee Fix test case added in patch fixing PR14314
llvm-svn: 167769
2012-11-12 22:33:18 +00:00
Daniel Malea cfe417ed3e Update platform section to mention Linux/FreeBSD local debugging support, and also mention that LLDB builds on Linux with clang and libstdc++/libc++.
llvm-svn: 167768
2012-11-12 22:32:00 +00:00
Rafael Espindola 09e985b451 Remove duplicated line.
llvm-svn: 167767
2012-11-12 22:29:43 +00:00
David Blaikie 1d6178065c Fix more try scoping bugs introduced by r167650.
Introduces more clear scoping flags & flag combinations which should hopefully
be more understandable.

llvm-svn: 167766
2012-11-12 22:25:41 +00:00
Eric Christopher 2942431175 Add an option to enable prototype "fission" capabilities and debug changes.
llvm-svn: 167765
2012-11-12 22:22:20 +00:00
Daniel Malea 33c20f45f1 Replace const_iterator with iterator to build against libstdc++
- libstdc++ defines vector::erase(iterator) but not vector::erase(const_iterator)

llvm-svn: 167764
2012-11-12 22:16:27 +00:00
Bill Wendling 0cc8bc4d63 That's causing an error.
llvm-svn: 167763
2012-11-12 22:14:27 +00:00
Anna Zaks 4e255b62f1 [analyzer] Fix a regression (from r 165079): compare canonical types.
Suppresses a leak false positive (radar://12663777).

In addition, we'll need to rewrite the adjustReturnValue() method not to
return UnknownVal by default, but rather assert in cases we cannot
handle. To make it possible, we need to correctly handle some of the
edge cases we already know about.

llvm-svn: 167762
2012-11-12 22:06:24 +00:00
Bill Wendling b1da2cb3fd Don't test for incomplete types.
llvm-svn: 167761
2012-11-12 22:01:56 +00:00
Chad Rosier a458d88b21 Update test case for r167754/r167755.
llvm-svn: 167760
2012-11-12 21:51:08 +00:00
Evan Cheng 4b54c8ff1b Cache size of PassVector to speed up getNumContainedPasses().
getNumContainedPasses() used to compute the size of the vector on demand. It is
called repeated in loops (such as runOnFunction()) and it can be updated while
inside the loop.

llvm-svn: 167759
2012-11-12 21:42:53 +00:00
Andrew Trick 22d688a29c Added a temporary option to avoid critical edges splitting.
This teaches the register coalescer to be less prone to split critical
edges. I am currently benchmarking this with the new (post-coalescer)
scheduler. I plan to enable this by default and remove the option as
soon as misched is enabled.

llvm-svn: 167758
2012-11-12 21:42:40 +00:00
Eric Christopher 7370b55262 Rewrite DIContext interface to take an object. Update all callers.
llvm-svn: 167757
2012-11-12 21:40:38 +00:00
Richard Smith a0e5e54e8d Remove abuse of hasTrivial*, and fix miscompile wherein global arrays with
internal linkage, no uses, trivial construction, and nontrivial destruction
were not emitted.

llvm-svn: 167756
2012-11-12 21:38:00 +00:00
Chad Rosier 2b2b38d336 Revert r167620; this can be implemented using an existing CL option.
llvm-svn: 167755
2012-11-12 21:32:44 +00:00
Chad Rosier ad6e96d59c If we encounter a fatal error, exit with status 70. For BSD systems this is
defined as an internal software error.  This notifies the driver to report
diagnostics information.
rdar://11951540

llvm-svn: 167754
2012-11-12 21:32:24 +00:00
Andrew Trick ec369d5316 misched: rename interfaceto avoid gcc warnings
llvm-svn: 167753
2012-11-12 21:28:10 +00:00
Greg Clayton 65ec1032df <rdar://problem/12153915>
When uniquing classes against one another we can't depend on any or all of the artificial functions (default ctor, dtor, copy ctor, move ctor, etc) being in each definition. Now we treat those separately and handle those to the best of our ability.

llvm-svn: 167752
2012-11-12 21:27:20 +00:00
Filipe Cabecinhas e818ca2fcb s/BCPLComment/LineComment/ (llvm r167690)
llvm-svn: 167751
2012-11-12 21:26:32 +00:00
Hal Finkel 9cf3372931 BBVectorize: Use a more sophisticated check for input cost
The old checking code, which assumed that input shuffles and insert-elements
could always be folded (and thus were free) is too simple.
This can only happen in special circumstances.
Using the simple check caused infinite recursion.

llvm-svn: 167750
2012-11-12 21:21:02 +00:00
Ted Kremenek da5919ffa1 Per discussion on cfe-dev, re-enable suppression of -Wimplicit-fallthrough on C, but also include dialects of C++ earlier than C++11.
There was enough consensus that we *can* get a good language solution
to have an annotation outside of C++11, and without this annotation
this warning doesn't quite mean's completeness criteria for this
kind of warning.  For now, restrict this warning to C++11 (where an
annotation exists), and make this the behavior for the LLVM 3.2 release.
Afterwards, we will hammer out a language solution that we are all
happy with.

llvm-svn: 167749
2012-11-12 21:20:48 +00:00
Bill Wendling 039136664d Update testcase to show that we don't emit an error for sizes <= 32-bits.
llvm-svn: 167748
2012-11-12 21:13:35 +00:00
Daniel Malea d4c5be61f2 Fix libstdc++ build
- Add missing operator= definition for DelayedAddObjCClassProperty
- needed to be compatible with libstdc++ vector implementation

llvm-svn: 167747
2012-11-12 21:02:14 +00:00
Andrew Trick 263280248a misched: Target-independent support for MacroFusion.
Uses the infrastructure from r167742 to support clustering instructure
that the target processor can "fuse". e.g. cmp+jmp.

Next step: target hook implementations with test cases, and enable.

llvm-svn: 167744
2012-11-12 19:52:20 +00:00
Hal Finkel f8326b6052 BBVectorize: Check the types of compare instructions
The pass would previously assert when trying to compute the cost of
compare instructions with illegal vector types (like struct pointers).

llvm-svn: 167743
2012-11-12 19:41:38 +00:00
Andrew Trick a7714a0ff9 misched: Target-independent support for load/store clustering.
This infrastructure is generally useful for any target that wants to
strongly prefer two instructions to be adjacent after scheduling.

A following checkin will add target-specific hooks with unit
tests. Then this feature will be enabled by default with misched.

llvm-svn: 167742
2012-11-12 19:40:10 +00:00
Chad Rosier 7ea7397ebc If we encounter a fatal error, call the interrupt handler to ensure any
temporary files are removed.
rdar://12282296

llvm-svn: 167741
2012-11-12 19:39:37 +00:00
Shuxin Yang 1c442f5ec6 This change is to fix rdar://12571717 which is about assertion in Reassociate pass.
The assertion is trigged when the Reassociater tries to transform expression
     ... + 2 * n * 3 + 2 * m + ...
  into:
     ... + 2 * (n*3 + m).

In the process of the transformation, a helper routine folds the constant 2*3 into 6,
confusing optimizer which is trying the to eliminate the common factor 2, and cannot
find 2 any more. 

Review is pending. But I'd like commit first in order to help those who are waiting 
for this fix. 

llvm-svn: 167740
2012-11-12 19:34:11 +00:00
David Blaikie 6bffd6fe81 80 cols & unnecessary braces from r167736.
Post-commit review feedback by Eli Friedman.

llvm-svn: 167739
2012-11-12 19:32:32 +00:00
Andrew Trick f1ff84c64e misched: Infrastructure for weak DAG edges.
This adds support for weak DAG edges to the general scheduling
infrastructure in preparation for MachineScheduler support for
heuristics based on weak edges.

llvm-svn: 167738
2012-11-12 19:28:57 +00:00
Ulrich Weigand 2c93acdfbf Make TOC order deterministic by using MapVector instead of DenseMap.
llvm-svn: 167737
2012-11-12 19:13:24 +00:00
David Blaikie 8fab8e53fb Correct printing of nested anonymous type member accesses.
Patch by Florent Bruneau!

llvm-svn: 167736
2012-11-12 19:12:12 +00:00
Bill Wendling 3c7fed87d2 The register constraint could mean a 16- or 8-bit register.
llvm-svn: 167735
2012-11-12 18:52:32 +00:00
Nadav Rotem 0767d177ec fix a spelling mistake
llvm-svn: 167734
2012-11-12 18:45:12 +00:00
Howard Hinnant 70abebed37 Wen-Han Gu: Fix for http://llvm.org/bugs/show_bug.cgi?id=14312 Exception Table out-of-range but still keep walking.
llvm-svn: 167733
2012-11-12 18:19:15 +00:00
Sean Callanan 467ab7b8d0 Fixed a potential crash in the Darwin platform.
llvm-svn: 167732
2012-11-12 18:00:29 +00:00
Hal Finkel ef53df0f9f BBVectorize: Check the input types of shuffles for legality
This fixes a bug where shuffles were being fused such that the
resulting input types were not legal on the target. This would
occur only when both inputs and dependencies were also foldable
operations (such as other shuffles) and there were other connected
pairs in the same block.

llvm-svn: 167731
2012-11-12 14:50:59 +00:00