Commit Graph

164608 Commits

Author SHA1 Message Date
Joey Gouly 96b94e610b [OpenCL] Variables in the constant address space must be initialized.
llvm-svn: 198417
2014-01-03 14:16:55 +00:00
Aaron Ballman 5dff61d322 Removing some more unnecessary manual quotes from diagnostics.
llvm-svn: 198416
2014-01-03 14:06:37 +00:00
Aaron Ballman 4a97967b5f It turns out the problem was a bit more wide-spread. Removing a lot of unneeded typecasts. getScopeRep() already returns a NestedNameSpecifier.
No functional changes intended.

llvm-svn: 198414
2014-01-03 13:56:08 +00:00
Aaron Ballman 5fe6c805dc Removing an unneeded typecast. getScopeRep() already returns a NestedNameSpecifier.
llvm-svn: 198413
2014-01-03 13:45:46 +00:00
Aaron Ballman fee0cd45fe Removing some more unnecessary manual quotes from diagnostics. Updated the related test case to ensure correctness.
llvm-svn: 198412
2014-01-03 13:34:55 +00:00
Daniel Jasper 352dae199a clang-format: Recognize single-line macro usages inside macros.
Before:
  #define LIST(L)                                                     \
    L(FirstElement) L(SecondElement) L(ThirdElement) L(FourthElement) \
        L(FifthElement)

After:
  #define LIST(L)    \
    L(FirstElement)  \
    L(SecondElement) \
    L(ThirdElement)  \
    L(FourthElement) \
    L(FifthElement)

llvm-svn: 198407
2014-01-03 11:50:46 +00:00
Alexander Kornienko b045d8bc07 Rework of r198404 to avoid changes in the build configuration.
llvm-svn: 198405
2014-01-03 10:50:17 +00:00
NAKAMURA Takumi 321b7d35e5 clang-tody: Rework r198403, to fix build.
llvm-svn: 198404
2014-01-03 10:24:51 +00:00
NAKAMURA Takumi 4fd9913803 clang-tidy: Fix build since r198402 in the case that the source tree of clang-tools-extra is not located on clang/tools/extra.
FIXME: Get rid of private headers in other modules.
llvm-svn: 198403
2014-01-03 09:49:13 +00:00
Alexander Kornienko 175fefbda3 Refactored Clang-tidy for better reusability.
Summary:
Made ClangTidyAction more slim and moved its declaration to header to
allow easy creation of Clang-tidy ASTConsumer. Don't derive from
clang::ento::AnalysisAction, use clang::ento::CreateAnalysisConsumer instead
(I'll propose making this function a part of a public API in a separate patch).

Use MultiplexConsumer instead of a custom class.

Don't re-filter checkers list for each TU.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 198402
2014-01-03 09:31:57 +00:00
Alp Toker 64f3a6f504 MSVC 2010 build fix
Back out the part of r198399 that enabled LLVM_FINAL/LLVM_OVERRIDE on VS 2010.

DwarfUnit.h legitimately uses them on destructors which unfortunately triggers
Compiler Error C3665 (override specifier not allowed on a destructor/finalizer)
prior to MSVC 2012:

  virtual ~DwarfCompileUnit() LLVM_OVERRIDE;

llvm-svn: 198401
2014-01-03 07:58:20 +00:00
Arnold Schwaighofer 833a82ecde BasicAA: Use reachabilty instead of dominance for checking value equality in phi
cycles

This allows the value equality check to work even if we don't have a dominator
tree. Also add some more comments.

I was worried about compile time impacts and did not implement reachability but
used the dominance check in the initial patch. The trade-off was that the
dominator tree was required.
The llvm utility function isPotentiallyReachable cuts off the recursive search
after 32 visits. Testing did not show any compile time regressions showing my
worries unjustfied.

No compile time or performance regressions at O3 -flto -mavx on test-suite +
externals.

Addresses review comments from r198290.

llvm-svn: 198400
2014-01-03 05:47:03 +00:00
Alp Toker 90e5fff1d2 Enable LLVM_FINAL, LLVM_OVERRIDE and LLVM_HAS_VARIADIC_TEMPLATES with more gcc and MSVC versions
The 'sealed' definition of LLVM_FINAL can be dropped once VS 2010 is
decommissioned.

Some of this is speculative so will keep an eye on the waterfall -- ping me if
you see failures.

Incremental work towards C++11 migration.

llvm-svn: 198399
2014-01-03 05:00:46 +00:00
David Blaikie ab0ba24983 Revert "Debug Info: Type Units: Simplify type hashing using IR-provided unique names."
Reverting due to bot failure I won't have time to investigate until
tomorrow.

This reverts commit r198397.

llvm-svn: 198398
2014-01-03 04:49:04 +00:00
David Blaikie ddb66281cd Debug Info: Type Units: Simplify type hashing using IR-provided unique names.
What's good for LTO metadata size problems ought to be good for non-LTO
debug info size too, so let's rely on the same uniqueness in both cases.
If it's insufficient for non-LTO for whatever reason (since we now won't
be uniquing CU-local types or any C types - but these are likely to not
be the most significant contributors to type bloat) we should consider a
frontend solution that'll help both LTO and non-LTO alike, rather than
using DWARF-level DIE-hashing that only helps non-LTO debug info size.

It's also much simpler this way and benefits C++ even more since we can
deduplicate lexically separate definitions of the same C++ type since
they have the same mangled name.

llvm-svn: 198397
2014-01-03 04:20:26 +00:00
Rui Ueyama 76bc5157c2 Use scoped enum.
llvm-svn: 198396
2014-01-03 03:29:15 +00:00
Aaron Ballman 6d086d7dc1 Removing some more unnecessary manual quotes from diagnostics.
llvm-svn: 198395
2014-01-03 02:20:27 +00:00
Eric Christopher 4d214b9e9c 80-column.
llvm-svn: 198394
2014-01-03 02:17:35 +00:00
Eric Christopher 50effa0437 Remove TextSectionSym as it is unused.
llvm-svn: 198393
2014-01-03 02:16:44 +00:00
Aaron Ballman 25dc1e1d19 Removing some more unnecessary manual quotes from attribute diagnostics.
llvm-svn: 198392
2014-01-03 02:14:08 +00:00
Aaron Ballman c0550740f0 Removing some more unnecessary manual quotes from attribute diagnostics.
llvm-svn: 198391
2014-01-03 02:07:43 +00:00
David Blaikie 22b29a5f1a Revert "Reverting r193835 due to weirdness with Go..."
The cgo problem was that it wants dwarf2 which doesn't support direct
constant encoding of the location. So let's add support for dwarf2
encoding (using a location expression) of data member locations.

This reverts commit r198385.

llvm-svn: 198389
2014-01-03 01:30:05 +00:00
Ted Kremenek 9b12e72376 [analyzer] Don't track return value of NSNull +null for retain/release tracking.
Fixes <rdar://problem/12858915>.

llvm-svn: 198388
2014-01-03 01:19:28 +00:00
Aaron Ballman 1bda4596b6 Removing some more unnecessary manual quotes from attribute diagnostics.
llvm-svn: 198387
2014-01-03 01:09:27 +00:00
Tobias Grosser ca7887d729 Another formatting fix
llvm-svn: 198386
2014-01-03 00:56:20 +00:00
David Blaikie 2ada116a34 Reverting r193835 due to weirdness with Go...
Apologies for the noise - we're seeing some Go failures with cgo
interacting with Clang's debug info due to this change.

llvm-svn: 198385
2014-01-03 00:48:38 +00:00
Tobias Grosser 765a70abab Fix formatting issues
llvm-svn: 198384
2014-01-03 00:44:43 +00:00
Reid Kleckner b0c246e25e Remove unused variable to fix clang warning
llvm-svn: 198382
2014-01-03 00:36:32 +00:00
Reid Kleckner b40a27dad8 [ms-cxxabi] Move VBTableBuilder from CodeGen over to AST/VTableBuilder.cpp
Summary:
No functionality change.

This code should live here long-term because we should be able to use it
to compute correct vftable names.

It turns out that the most natural way to implement the naming algorithm
is to use a caching layer similar to what we already have for virtual
table info in VTableContext.  Subsequent changes will take advantage of
this to fix PR17748, where we have a vbtable name collision.

Reviewers: majnemer

CC: cfe-commits

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

llvm-svn: 198380
2014-01-03 00:14:35 +00:00
David Blaikie f6921f84eb Fix break introduced in r198377 due to using a local type as a template parameter.
llvm-svn: 198379
2014-01-03 00:00:41 +00:00
David Blaikie e9c66ed80a Test coverage for non-default-constructible elements in a StringMap
This functionality was enabled by r198374. Here's a test to ensure it
works and we don't regress it.

Based on a patch by Maciej Piechotka.

llvm-svn: 198377
2014-01-02 23:57:28 +00:00
Tobias Grosser a9376ff571 Introduce -polly-canonicalize pass
This ModulePass schedules the set of Polly canonicalization passes. It is a
debugging tool that can be used to preoptimize .ll files for Polly processing.

llvm-svn: 198376
2014-01-02 23:39:18 +00:00
Aaron Ballman 3d216a579c Removed an unnecessary %select from the alignas diagnostics. The attribute already knows how it was spelled.
llvm-svn: 198375
2014-01-02 23:39:11 +00:00
David Blaikie eba457c2f8 Remove StringMapEntryInitializer support.
It was never specialized so let's just remove that unused
configurability and always do the default.

llvm-svn: 198374
2014-01-02 23:28:39 +00:00
Aaron Ballman e2bb78a740 This diagnostic should not have had the manual quotation marks. Its only usage passed in an Attr object, which was already quoted when printing the diagnostic. However, there was no test case that caught this bug -- one has been added.
llvm-svn: 198373
2014-01-02 23:22:40 +00:00
Aaron Ballman 1da282ae2d Removing some more unnecessary manual quotes from attribute diagnostics. Updated the associated testcase because QualType pretty printing was an improvement.
llvm-svn: 198372
2014-01-02 23:15:58 +00:00
Aaron Ballman 9f6fec4419 Removing some more unnecessary manual quotes from attribute diagnostics.
llvm-svn: 198371
2014-01-02 23:02:01 +00:00
Tobias Grosser e61b86c9cd RegisterPasses: Do not claim we schedule canonicalization passes at -O0
Also the code makes the impression this was happening, shouldEnablePolly()
always returns false for optlevel equal to zero. This was previously different,
but was accidentally changed by a commit a couple of months ago. As this
behavior was mainly a debugging tool and adding this to clang never really made
sense, we just remove the last traces.

llvm-svn: 198370
2014-01-02 22:48:50 +00:00
Quentin Colombet 1fb3362a6e [RegAlloc] Make tryInstructionSplit less aggressive.
The greedy register allocator tries to split a live-range around each
instruction where it is used or defined to relax the constraints on the entire
live-range (this is a last chance split before falling back to spill).
The goal is to have a big live-range that is unconstrained (i.e., that can use
the largest legal register class) and several small local live-range that carry
the constraints implied by each instruction.
E.g.,
Let csti be the constraints on operation i.

V1=
op1 V1(cst1)
op2 V1(cst2)

V1 live-range is constrained on the intersection of cst1 and cst2.

tryInstructionSplit relaxes those constraints by aggressively splitting each
def/use point:
V1=
V2 = V1
V3 = V2
op1 V3(cst1)
V4 = V2
op2 V4(cst2)

Because of how the coalescer infrastructure works, each new variable (V3, V4)
that is alive at the same time as V1 (or its copy, here V2) interfere with V1.
Thus, we end up with an uncoalescable copy for each split point.

To make tryInstructionSplit less aggressive, we check if the split point
actually relaxes the constraints on the whole live-range. If it does not, we do
not insert it.
Indeed, it will not help the global allocation problem:
- V1 will have the same constraints.
- V1 will have the same interference + possibly the newly added split variable
  VS.
- VS will produce an uncoalesceable copy if alive at the same time as V1.

<rdar://problem/15570057>

llvm-svn: 198369
2014-01-02 22:47:22 +00:00
Aaron Ballman 34b3475cd3 Reworded the NSObject attribute diagnostics to be more consistent with other attribute diagnostics. Also updated the associated test case.
llvm-svn: 198368
2014-01-02 22:45:33 +00:00
Fariborz Jahanian 5b3105d2cb ObjectiveC. Remove false positive warning for missing property
backing ivar by not issuing this warning if ivar is referenced
somewhere and accessor makes method calls. // rdar://15727325

llvm-svn: 198367
2014-01-02 22:42:09 +00:00
Aaron Ballman 44ebc079b9 Removing some manual quotes from this diagnostic, since the AST diagnostics engine knows how to handle NamedDecl objects.
llvm-svn: 198365
2014-01-02 22:29:41 +00:00
Tobias Grosser 9a26f2986c ScopInfo: Ensure the RegionInfo analysis is always available
This fixes a crash that appeared when generating dotty graphs for functions
without loops (for which we do not calculate polyhedral information).

llvm-svn: 198364
2014-01-02 22:28:53 +00:00
Hal Finkel 860fa9052e [PPC] Fix comment to match function name
llvm-svn: 198362
2014-01-02 22:09:39 +00:00
Eric Christopher 94932438d4 Remove comments on CU skeleton construction, they're probably
obvious.

llvm-svn: 198361
2014-01-02 22:04:47 +00:00
Hal Finkel 1d429f2ee0 [PPC] Fix the scheduling of CR logicals on the P7
CR logicals (crand, crxor, etc.) on the P7 need to be in the first slot of each
dispatch group. The old itinerary entry was just wrong (but has not mattered
because we don't generate these instructions).

This will matter when, in an upcoming commit, we start generating these
instructions.

llvm-svn: 198359
2014-01-02 21:38:26 +00:00
Eric Christopher d8beca3b78 Elaborate on comment for skeleton CU construction.
llvm-svn: 198358
2014-01-02 21:38:18 +00:00
Eric Christopher 40734c4c0c Revert seemingly unnecessary section sym for the data section.
llvm-svn: 198357
2014-01-02 21:38:13 +00:00
Hal Finkel 77c8dc1da3 [PPC] Use the correct immediate operands on 64-bit instructions
Several of the 64-bit fixed-point instructions with immediate operands were
using the 32-bit (i32) operand nodes instead of the corresponding 64-bit (i64)
operand definitions (u16imm instead of u16imm64, for example).

This error has had no effect so far, but would have caused type-checking
violations with an upcoming change.

llvm-svn: 198356
2014-01-02 21:26:59 +00:00
Aaron Ballman 05e420abad Updated the wording of two attribute-related diagnostics so that they print the offending attribute name. Also updates the associated test cases.
llvm-svn: 198355
2014-01-02 21:26:14 +00:00