Commit Graph

146854 Commits

Author SHA1 Message Date
Akira Hatanaka 2ffc5734e7 [mips] Expand pseudo multiply/divide instructions in MipsCodeEmitter.cpp.
This patch fixes the following two tests which have been failing on
llvm-mips-linux builder since r178403:

LLVM :: Analysis/Profiling/load-branch-weights-ifs.ll
LLVM :: Analysis/Profiling/load-branch-weights-loops.ll

llvm-svn: 178584
2013-04-02 22:53:58 +00:00
NAKAMURA Takumi fc613f4d61 llvm/test/CodeGen/X86: Unmark them out of XFAIL:cygming, in atomic{32|64}.ll and handle-move.ll, corresponding to r178549.
This reverts r176808, r176798, and r177914.

llvm-svn: 178583
2013-04-02 22:35:08 +00:00
Jakob Stoklund Olesen aeb69a5481 Allow MachineTraceMetrics to be used when the model has no resources.
It it still possible to extract information from itineraries, for
example.

llvm-svn: 178582
2013-04-02 22:27:45 +00:00
Howard Hinnant 459448241a Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html
llvm-svn: 178581
2013-04-02 22:14:51 +00:00
Enrico Granata 1ed58f7baf Enabling metrics to calculate (and dump) their standard deviation
llvm-svn: 178580
2013-04-02 21:59:39 +00:00
Howard Hinnant 516487765a The cmake script is failing to copy cxxabi.h to the right place because it was generating to destination path like so /include// and dstdir can legally be blank from my interpretation of the script, and this would then generate a path like libcxx/include// which is illegal.
llvm-svn: 178579
2013-04-02 21:33:01 +00:00
Enrico Granata 4e969282fd Misc fixes:
- make an overload of Launch() that takes an init list of const char* if all you need to tweak in the launch info are the command-line arguments
- make Run() return an int that you can use as an exit-code
- make dynamic values work properly when recursing in FetchVariables()
- make the po output more obvious in verbose mode

llvm-svn: 178578
2013-04-02 21:31:18 +00:00
Enrico Granata d83bfce6d4 <rdar://problem/13415737>
Fixing a bug where LLDB was not handling correctly CFStrings that have an explicit length but no NULL terminator
The data formatter was showing garbled data as part of the summary
The fix is to explicitly figure out the explicit length if we need to (bitfields tell us when that is the case) and use that as a size delimiter

llvm-svn: 178577
2013-04-02 21:25:34 +00:00
Howard Hinnant 575e4e3650 Richard Smith: It was pointed out to me off-list that libc++'s non-compiler-builtin
implementation of std::is_polymorphic does this:

template <class _Tp> struct __is_polymorphic1 : public _Tp {};

... and that g++ rejects this if _Tp has an inaccessible virtual destructor
(because __is_polymorphic1<_Tp> would have a deleted virtual destructor
overriding _Tp's non-deleted destructor). Clang was failing to reject this;
I've fixed that in r178563, but that causes libc++'s corresponding test
case to fail with both clang and gcc when using the fallback
implementation. The fallback code also incorrectly rejects final types.

The attached patch fixes the fallback implementation of is_polymorphic; we
now use dynamic_cast's detection of polymorphic class types rather than
trying to determine if adding a virtual function makes the type larger:

  enable_if<sizeof((_Tp*)dynamic_cast<const volatile
void*>(declval<_Tp*>())) != 0, ...>

Two things of note here:
* the (_Tp*) cast is necessary to work around bugs in Clang and g++ where
we otherwise don't instantiate the dynamic_cast (filed as PR15656)
* the 'const volatile' is here to treat is_polymorphic<cv T> as true for a
polymorphic class type T -- my reading of the standard suggests this is
incorrect, but it matches our builtin __is_polymorphic and gcc

llvm-svn: 178576
2013-04-02 21:25:06 +00:00
Edwin Vane eeed39a583 Use 'auto' with 'new' expressions
For variable declarations initialized with new expressions, use 'auto' for the
type specifier.

The 'auto' replacement happens only when the type of the VarDecl exactly
matches the type of the initializer and the VarDecl is *not* CV-qualified. The
only case that is currently handled is if the pointer type of the VarDecl is
itself CV qualified.

Some improvements need to be made to Clang's TypeLoc information in order for
other CV qualifier cases to be successfully handled. See the new test suite
new_cv_failing.cpp for examples of usages that could be handled with such an
improvement.

Function pointers are, for now, not transformed until the identifier info can
be extracted.

Reviewer: klimek
llvm-svn: 178575
2013-04-02 20:43:57 +00:00
Greg Clayton 1afa68ed14 <rdar://problem/13516463>
Don't crash when there is no register context for a thread with kernel debugging. The kernel debugging uses the OperatingSystemPlugin that may behave badly when trying to get thread state, so be prepared to have invalid register contexts in threads.

llvm-svn: 178574
2013-04-02 20:32:37 +00:00
Sean Callanan cbf87cc8d6 Added "rb" and "rbr" aliases to fix regressions
when we changed "rb" to "rbreak".

<rdar://problem/13552724>

llvm-svn: 178573
2013-04-02 20:21:34 +00:00
Stefanus Du Toit af4549d64c Update assertion string to new name of ArithAssignBinaryOperator
llvm-svn: 178572
2013-04-02 20:18:18 +00:00
Daniel Malea 3905296d4f Minor update to build instructions: workaround a bug in cmake+make build files
llvm-svn: 178569
2013-04-02 20:08:19 +00:00
Chad Rosier 3b7b0cd837 [ms-inline asm] Test case for r178566.
llvm-svn: 178568
2013-04-02 20:03:29 +00:00
Jakub Staszak 09da37d10d Fix a typo.
llvm-svn: 178567
2013-04-02 20:02:36 +00:00
Chad Rosier 8a24466f69 [ms-inline asm] Add support for parsing variables with namespace alias
qualifiers.

This patch only adds support for parsing these identifiers in the
X86AsmParser.  The front-end interface isn't capable of looking up
these identifiers at this point in time.  The end result is the
compiler now errors during object file emission, rather than at
parse time.  Test case coming shortly.
Part of rdar://13499009 and PR13340

llvm-svn: 178566
2013-04-02 20:02:33 +00:00
Howard Hinnant 70e19bd31e Some debug test cases for list.
llvm-svn: 178565
2013-04-02 19:53:32 +00:00
Manman Ren c018eea684 Add MDBuilder utilities for path-aware TBAA.
Add utilities to create struct nodes in TBAA type DAG and to create path-aware
tags. The format of struct nodes in TBAA type DAG: a unique name, a list of
fields with field offsets and field types. The format of path-aware tags:
a base type in TBAA type DAG, an access type and an offset relative to the base
type.

llvm-svn: 178564
2013-04-02 19:50:49 +00:00
Richard Smith b4d2a15d17 If a defaulted special member is implicitly deleted, check whether it's
overriding a non-deleted virtual function. The existing check for this doesn't
catch this case, because it fires before we mark the method as deleted.

llvm-svn: 178563
2013-04-02 19:38:47 +00:00
Fariborz Jahanian f12ff4df48 Objective-C: Provide fixit hints when warning
about 'isa' ivar being explicitely accessed
when base is a user class object reference.
// rdar://13503456

llvm-svn: 178562
2013-04-02 18:57:54 +00:00
Richard Smith 55a634996f Remove dead store.
llvm-svn: 178561
2013-04-02 18:57:50 +00:00
Bill Schmidt 3581cd4b4c Fix PR15630: Replace faulty stdcx. with stwcx.
When doing a partword atomic operation, a lwarx was being paired with
a stdcx. instead of a stwcx. when compiling for a 64-bit target.  The
target has nothing to do with it in this case; we always need a stwcx.

Thanks to Kai Nacke for reporting the problem.

llvm-svn: 178559
2013-04-02 18:37:08 +00:00
Jakob Stoklund Olesen 8fbfc59164 Don't attempt MTM heuristics without a scheduling model present.
This should fix the PPC buildbots.

llvm-svn: 178558
2013-04-02 18:26:45 +00:00
Edwin Vane 119d3dfcba Adding a hasLocalQualifiers() AST Matcher.
Updated tests and docs.

llvm-svn: 178556
2013-04-02 18:15:55 +00:00
Alexander Kornienko 1e05e86de5 Moved fallthrough regression test to switch-implicit-fallthrough.cpp.
llvm-svn: 178554
2013-04-02 17:55:01 +00:00
Jakob Stoklund Olesen 3ca14772d0 Count processor resources individually in MachineTraceMetrics.
The new instruction scheduling models provide information about the
number of cycles consumed on each processor resource. This makes it
possible to estimate ILP more accurately than simply counting
instructions / issue width.

The functions getResourceDepth() and getResourceLength() now identify
the limiting processor resource, and return a cycle count based on that.

This gives more precise resource information, particularly in traces
that use one resource a lot more than others.

llvm-svn: 178553
2013-04-02 17:49:51 +00:00
Greg Clayton 2040f98008 Fix test case to not run to main and "next" 5 times. Use a breakpoint.
llvm-svn: 178552
2013-04-02 17:48:53 +00:00
Reid Kleckner 08a39a686e [ms-cxxabi] Rename enum and remove dead case per Jordan's suggestion
The IHM_ prefix was a fairly gross abbreviation to try to hit three
characters for uniqueness.

llvm-svn: 178551
2013-04-02 17:40:19 +00:00
Reid Kleckner daa0f3176e [ms-cxxabi] Remove unused variable
llvm-svn: 178550
2013-04-02 17:24:20 +00:00
Chad Rosier 7925d280ff [fast-isel] Use the correct API to disable FastLowerArguments for Win64.
llvm-svn: 178549
2013-04-02 16:31:41 +00:00
Reid Kleckner be377cd518 [ms-cxxabi] Move MS inheritance model calculation into MemberPointerType
Summary:
This makes it possible to share code between lib/AST/MicrosoftCXXABI.cpp
and lib/CodeGen/MicrosoftCXXABI.cpp.  No functionality change.

Also adds comments about the layout of the member pointer structs as I
currently understand them.

Reviewers: rjmccall

CC: timurrrr, cfe-commits

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

llvm-svn: 178548
2013-04-02 16:23:57 +00:00
Arnold Schwaighofer d6c6e868b2 DAGCombiner: Merge store/loads when we have extload/truncstores
This is helps on architectures where i8,i16 are not legal but we have byte, and
short loads/stores. Allowing us to merge copies like the one below on ARM.

copy(char *a, char *b, int n) {
 do {
   int t0 = a[0];
   int t1 = a[1];
   b[0] = t0;
   b[1] = t1;

radar://13536387

llvm-svn: 178546
2013-04-02 15:58:51 +00:00
Howard Hinnant ad36fe5c19 Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.html
llvm-svn: 178545
2013-04-02 15:48:56 +00:00
Howard Hinnant 39e9506a1e Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077131.html
llvm-svn: 178544
2013-04-02 15:46:31 +00:00
Alexander Kornienko a9c809f75d Fixed "fallthrough annotation does not directly precede switch label" warning in
case when [[clang::fallthrough]]; is used in a method of a local class.

llvm-svn: 178543
2013-04-02 15:20:32 +00:00
Daniel Jasper c238c87e12 Fix some inconsistent use of indentation.
Basically we have always special-cased the top-level statement of an
unwrapped line (the one with ParenLevel == 0) and that lead to several
inconsistencies. All added tests were formatted in a strange way, for
example:

Before:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();
if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
            .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()) {
}

After:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa();
if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
        .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()) {
}

llvm-svn: 178542
2013-04-02 14:33:13 +00:00
Preston Gurd 95cbee6ce4 Simplify test cases for Atom preferring call register indirect over
call memory indirect (32 and 64 bit).

llvm-svn: 178541
2013-04-02 14:25:06 +00:00
Benjamin Kramer ae61151254 Escape # and $ in dependency files.
Fixes PR15642.

llvm-svn: 178540
2013-04-02 13:38:48 +00:00
Benjamin Kramer 5d7447f4ed Remove target-specific alignment from test.
llvm-svn: 178539
2013-04-02 13:38:42 +00:00
Alexey Samsonov 262f05bab0 [ASan] Emit lifetime markers for local variables in -fsanitize=use-after-scope mode
llvm-svn: 178538
2013-04-02 13:19:46 +00:00
Alexander Kornienko b5dad75e38 Alternative handling of comments adjacent to preprocessor directives.
Summary: Store comments in ScopedLineState

Reviewers: klimek, djasper

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 178537
2013-04-02 13:04:06 +00:00
Justin Holewinski a922c7e90e [NVPTX] Fix a few style issues in NVVMReflect
llvm-svn: 178536
2013-04-02 12:37:11 +00:00
Alexander Potapenko bbfc722e46 [TSan] Add the WTFAnnotateBenignRaceSized implementation and a test for
WTFAnnotateBenignRaceSized and AnnotateBenignRaceSized.

llvm-svn: 178534
2013-04-02 11:21:53 +00:00
Bill Wendling 88d06c3b2d Use a worklist to avoid a sneaky iterator invalidation.
The iterator could be invalidated when it's recursively deleting a whole bunch
of constant expressions in a constant initializer.

Note: This was only reproducible if `opt' was run on a `.bc' file. If `opt' was
run on a `.ll' file, it wouldn't crash. This is why the test first pushes the
`.ll' file through `llvm-as' before feeding it to `opt'.

PR15440

llvm-svn: 178531
2013-04-02 08:16:45 +00:00
Tobias Grosser aeabcf24df ScopDetection: Use isTopLevelRegion
Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 178530
2013-04-02 06:41:48 +00:00
Anton Yartsev 01acbcebbb [analyzer] Moving cplusplus.NewDelete to alpha.* for now.
llvm-svn: 178529
2013-04-02 05:59:24 +00:00
Jakob Stoklund Olesen 8eabc3ffde Add 64-bit load and store instructions.
There is only a few new instructions, the rest is handled with patterns.

llvm-svn: 178528
2013-04-02 04:09:28 +00:00
Jakob Stoklund Olesen 917e07f095 Basic 64-bit ALU operations.
SPARC v9 extends all ALU instructions to 64 bits, so we simply need to
add patterns to use them for both i32 and i64 values.

llvm-svn: 178527
2013-04-02 04:09:23 +00:00
Jakob Stoklund Olesen bddb20eeef Materialize 64-bit immediates.
The last resort pattern produces 6 instructions, and there are still
opportunities for materializing some immediates in fewer instructions.

llvm-svn: 178526
2013-04-02 04:09:17 +00:00