Commit Graph

130596 Commits

Author SHA1 Message Date
Preston Gurd f0a48ec8f1 This patch fixes 8 out of 20 unexpected failures in "make check"
when run on an Intel Atom processor. The failures have arisen due
to changes elsewhere in the trunk over the past 8 weeks or so.

These failures were not detected by the Atom buildbot because the
CPU on the Atom buildbot was not being detected as an Atom CPU.
The fix for this problem is in Host.cpp and X86Subtarget.cpp, but
shall remain commented out until the current set of Atom test failures
are fixed.

Patch by Andy Zhang and Tyler Nowicki!

llvm-svn: 160451
2012-07-18 20:49:17 +00:00
Greg Clayton 5e0c5e8108 <rdar://problem/10998370>
Improved the error message when we can find a function in the current program by printing the demangled name.

Also added the ability to create lldb_private::Mangled instances with a ConstString when we already have a ConstString for a mangled or demangled name. Also added the ability to call SetValue with a ConstString and also without a boolean to indicate if the string is mangled where we will now auto-detect if the string is mangled.

llvm-svn: 160450
2012-07-18 20:47:40 +00:00
Sean Callanan 6b76bc76fa Removed a hack that gives zero-length arrays a
single element.  Also modified our struct test
case to test this.

llvm-svn: 160449
2012-07-18 20:39:26 +00:00
Greg Clayton 358a789744 Cleaned up incorrect STL std::map comparison code and use the operator == on std::map objects instead of manually implementing the comparisons. Also modified the UnwindPlan::AppendRow() function to take a "const RowSP &" object so we don't have to copy shared pointers when calling this function.
llvm-svn: 160448
2012-07-18 20:37:53 +00:00
Victor Oliveira aa9ccee921 Adding some debug information to PassManager
llvm-svn: 160446
2012-07-18 19:59:29 +00:00
Chad Rosier 848094e3ce Whitespace.
llvm-svn: 160445
2012-07-18 19:35:16 +00:00
Benjamin Kramer e6f7008534 Remove trivial destructor from SVal.
This enables the faster SmallVector in clang and also allows clang's unused
variable warnings to be more effective. Fix the two instances that popped up.

The RetainCountChecker change actually changes functionality, it would be nice
if someone from the StaticAnalyzer folks could look at it.

llvm-svn: 160444
2012-07-18 19:08:44 +00:00
Chandler Carruth 985454e0ac Fix a somewhat nasty crasher in PR13378. This crashes inside of
LiveIntervals due to the two-addr pass generating bogus MI code.

The crux of the issue was a loop nesting problem. The intent of the code
which attempts to transform instructions before converting them to
two-addr form is to defer and reprocess any transformed instructions as
the second processing is likely to have more opportunities to coalesce
copies, etc. Unfortunately, there was one section of processing that was
not deferred -- the INSERT_SUBREG rewriting. Due to quirks of how this
rewriting proceeded, not only did it occur early, it removed the bits of
information needed for the deferred processing to correctly generate the
necessary two address form (specifically inserting a copy), but didn't
trigger any immediate assertions and produced what appeared to be
already valid two-address from code. Thus, the assertion only fired much
later in the pipeline.

The fix is to hoist the transformation logic up layer to where it can
more firmly defer all further processing, and to teach the normal
processing to handle an edge case previously handled as part of the
transformation logic. This edge case (already matched tied register
operands) needs to *not* defer any steps.

As has been brought up repeatedly in the process: wow does this code
need refactoring. I *may* squeeze in some time to at least bring sanity
to this loop... but wow... =]

Thanks to Jakob for helpful hints on the way here, and the review.

llvm-svn: 160443
2012-07-18 18:58:22 +00:00
Jim Ingham b83e72097f Add useful documentation to the "target.source-map" setting.
<rdar://problem/11893881>

llvm-svn: 160442
2012-07-18 18:42:57 +00:00
Andrew Trick a22cdb713b Fix ARMTargetLowering::isLegalAddImmediate to consider thumb encodings.
Based on Evan's suggestion without a commitable test.

llvm-svn: 160441
2012-07-18 18:34:27 +00:00
Andrew Trick bc325168c3 whitespace
llvm-svn: 160440
2012-07-18 18:34:24 +00:00
Andrew Trick e002fb5da3 Added unit test for PR13361: LSR + SCEV "hangs" on reasonably sized test.
llvm-svn: 160439
2012-07-18 18:07:52 +00:00
Victor Oliveira a1de408aa7 test commit
llvm-svn: 160438
2012-07-18 17:53:05 +00:00
Dmitri Gribenko 761447cd98 On Darwin, the linker removes functions in CommentDumper.o (Comment::dump())
despite __attribute__(__used__).  As explained by Argyrios,
> .a archive files do some stripping of their own and they remove .o files that
> contain functions that are not referenced by any other .o file.

The fix is to use these functions from another .o file.

Thanks, Argyrios!

llvm-svn: 160437
2012-07-18 16:30:42 +00:00
Kostya Serebryany ab34919413 [tsan] minor enhancements in the new tsan allocator and a test malloc replacement library that can be linked to any program to replace malloc (tested on spec2006)
llvm-svn: 160436
2012-07-18 16:04:55 +00:00
Alexey Samsonov c6d97c0ad1 [TSan] fix confusing error message in CheckFailed
llvm-svn: 160435
2012-07-18 14:37:22 +00:00
Simon Atanasyan 8856ef886a Add some missed ELF constants definitions:
- section types
- dynamic table entries tags
- state flags for DT_FLAGS_1 entry

The patch reviewed by Rafael Espindola.

llvm-svn: 160433
2012-07-18 14:12:32 +00:00
Alexander Kornienko df36746d52 Reverted custom init hook from r160369.
llvm-svn: 160432
2012-07-18 12:24:51 +00:00
NAKAMURA Takumi 5f8d8eb692 Update config.h.cmake corresponding to config.h.in.
llvm-svn: 160431
2012-07-18 09:17:02 +00:00
Nadav Rotem 4c12245b3a The vbroadcast family of instructions has 'fallback patterns' in case where the
load source operand is used by multiple nodes. The v2i64 broadcast was emulated
by shuffling the two lower i32 elements to the upper two.
We had a bug in the immediate used for the broadcast.
Replacing 0 to 0x44.
0x44 means [01|00|01|00] which corresponds to the correct lane.

Patch by Michael Kuperstein.

llvm-svn: 160430
2012-07-18 08:14:48 +00:00
Jack Carter a62ba82825 Mips specific inline asm operand modifier 'M':
Print the high order register of a double word register operand.

In 32 bit mode, a 64 bit double word integer will be represented
by 2 32 bit registers. This modifier causes the high order register
to be used in the asm expression. It is useful if you are using 
doubles in assembler and continue to control register to variable
relationships.

This patch also fixes a related bug in a previous patch:

    case 'D': // Second part of a double word register operand
    case 'L': // Low order register of a double word register operand
    case 'M': // High order register of a double word register operand

I got 'D' and 'M' confused. The second part of a double word operand
will only match 'M' for one of the endianesses. I had 'L' and 'D'
be the opposite twins when 'L' and 'M' are.

llvm-svn: 160429
2012-07-18 06:41:36 +00:00
Alexey Samsonov 4dbfad627e [Sanitizer] add missing unit test for flag parsing (forgot to run svn add before)
llvm-svn: 160428
2012-07-18 06:29:18 +00:00
Ted Kremenek 46dcfc9431 Fix crash in RegionStoreManager::evalDerivedToBase() due to not handling references
(in uses of dynamic_cast<>).

Fixes <rdar://problem/11817693>.

llvm-svn: 160427
2012-07-18 05:57:33 +00:00
Andrew Trick 0d10225fa2 SCEVTraversal: Add a visited set.
Expression trees may be DAGs. Make sure traversal has linear complexity.

llvm-svn: 160426
2012-07-18 05:14:03 +00:00
Craig Topper 6bf3ed454a Remove tab characters.
llvm-svn: 160425
2012-07-18 04:59:16 +00:00
Ted Kremenek 3d6177306b Teach CFG construction about destructors resulting from references to array types. Fixes crash in <rdar://problem/11671507>.
llvm-svn: 160424
2012-07-18 04:57:57 +00:00
Craig Topper 8532423268 Fix typo in error message and remove some tab characters.
llvm-svn: 160423
2012-07-18 04:36:35 +00:00
Andrew Trick 0d07dfcd6f indvars: drive by heuristics fix.
Minor oversight noticed by inspection. Sorry no unit test.

llvm-svn: 160422
2012-07-18 04:35:13 +00:00
Andrew Trick c08726627c indvars: Linear function test replace should avoid reusing undef.
Fixes PR13371: indvars pass incorrectly substitutes 'undef' values.

I do not like this fix. It's needed until/unless the meaning of undef
changes. It attempts to be complete according to the IR spec, but I
don't have much confidence in the implementation given the difficulty
testing undefined behavior. Worse, this invalidates some of my
hard-fought work on indvars and LSR to optimize pointer induction
variables. It results benchmark regressions, which I'll track
internally. On x86_64 no LTO I see:

-3% huffbench
-3% 400.perlbench
-8% fhourstones

My only suggestion for recovering is to change the meaning of
undef. If we could trust an arbitrary instruction to produce a some
real value that can be manipulated (e.g. incremented) according to
non-undef rules, then this case could be easily handled with SCEV.

llvm-svn: 160421
2012-07-18 04:35:10 +00:00
Craig Topper 01deb5f2df Make x86 asm parser to check for xmm vs ymm for index register in gather instructions. Also fix Intel syntax for gather instructions to use 'DWORD PTR' or 'QWORD PTR' to match gas.
llvm-svn: 160420
2012-07-18 04:11:12 +00:00
Galina Kistanova 5ac251b81a Fixed few warnings.
llvm-svn: 160419
2012-07-18 04:06:49 +00:00
Richard Smith af136f8191 PR13381, part 2: when determining if a defaulted special member function should
be defined as deleted, take cv-qualifiers on class members into account when
looking up the copy or move constructor or assignment operator which will be
used for them.

llvm-svn: 160418
2012-07-18 03:51:16 +00:00
Richard Smith 1c6461ef63 PR13381: consider cv-qualifiers on a class member's type when determining which
constructor will be used for moving that object, in the computation of its
exception specification.

llvm-svn: 160417
2012-07-18 03:36:00 +00:00
Richard Smith 198223b7e6 PR13386: When matching up parameters between a function template declaration
and a function template instantiation, if there's a parameter pack in the
declaration and one at the same place in the instantiation, don't assume that
the pack wasn't expanded -- it may have expanded to nothing. Instead, go ahead
and check whether the parameter pack was expandable. We can do this as a
side-effect of the work we'd need to do anyway, to find how many parameters
were produced.

llvm-svn: 160416
2012-07-18 01:29:05 +00:00
Eli Friedman ea90a40339 Fix test so it works the same way on 32-bit and 64-bit.
llvm-svn: 160415
2012-07-18 01:03:11 +00:00
Dmitri Gribenko 3100519b33 CommentSema: \short is the same as \brief.
llvm-svn: 160414
2012-07-18 00:44:55 +00:00
Douglas Gregor a906ad2f9e When performing the deduced/actual argument type check for C++
[temp.deduct.call]p4 under Objective-C++ ARC, make sure to adjust the
qualifiers to introduce the implicit strong lifetime when
needed. Fixes <rdar://problem/11825671>.

llvm-svn: 160412
2012-07-18 00:14:59 +00:00
Nuno Lopes 2151497dca ignore 'invoke @llvm.donothing', but still keep the edge to the continuation BB
llvm-svn: 160411
2012-07-18 00:07:17 +00:00
Joel Jones b84f7bea09 More replacing of target-dependent intrinsics with target-indepdent
intrinsics.  The second instruction(s) to be handled are the vector versions 
of count set bits (ctpop).

The changes here are to clang so that it generates a target independent 
vector ctpop when it sees an ARM dependent vector bits set count.  The changes 
in llvm are to match the target independent vector ctpop and in 
VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM 
dependent vector pop counts with target-independent ctpops.  There are also 
changes to an existing test case in llvm for ARM vector count instructions and 
to a test for the bitcode upgrade.

<rdar://problem/11892519>

There is deliberately no test for the change to clang, as so far as I know, no
consensus has been reached regarding how to test neon instructions in clang;
q.v. <rdar://problem/8762292>

llvm-svn: 160410
2012-07-18 00:02:16 +00:00
Joel Jones 682150364a More replacing of target-dependent intrinsics with target-indepdent
intrinsics.  The second instruction(s) to be handled are the vector versions 
of count set bits (ctpop).

The changes here are to clang so that it generates a target independent 
vector ctpop when it sees an ARM dependent vector bits set count.  The changes 
in llvm are to match the target independent vector ctpop and in 
VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM 
dependent vector pop counts with target-independent ctpops.  There are also 
changes to an existing test case in llvm for ARM vector count instructions and 
to a test for the bitcode upgrade.

<rdar://problem/11892519>

There is deliberately no test for the change to clang, as so far as I know, no
consensus has been reached regarding how to test neon instructions in clang;
q.v. <rdar://problem/8762292>

llvm-svn: 160409
2012-07-18 00:01:03 +00:00
Nuno Lopes acd8535de0 Apparently it's possible to do an 'invoke asm'.
Update the language reference to reflect that.

llvm-svn: 160408
2012-07-17 23:51:33 +00:00
Douglas Gregor 951de307e4 Remove unnecessary spacing around Objective-C object literal code
completions. Fixes <rdar://problem/11889572>.

llvm-svn: 160407
2012-07-17 23:24:47 +00:00
Aaron Ballman 8f94ac6922 Adding a fixit for includes that cannot be found with angle brackets, but can be found with quoted strings instead. Implements PR13201.
llvm-svn: 160406
2012-07-17 23:19:16 +00:00
Douglas Gregor 4b12ba0ce6 Improve comment for TypeDecl::getTypeForDecl(), from Sean Silva!
llvm-svn: 160405
2012-07-17 23:09:36 +00:00
Douglas Gregor 6bdb8daa76 Eliminating the GCC_CAST hack, take two.
llvm-svn: 160404
2012-07-17 23:07:44 +00:00
Akira Hatanaka f640f040d1 Clean up Mips16InstrFormats.td and Mips16InstrInfo.td.
Patch by Reed Kotler.

llvm-svn: 160403
2012-07-17 22:55:34 +00:00
Dmitri Gribenko 9fa677c5ce Comment AST nodes: rename Num*Bitfields to Num*Bits to be consistent with Stmt AST nodes.
llvm-svn: 160402
2012-07-17 22:43:26 +00:00
Douglas Gregor 9db5e14349 Reinstate the GCC_CAST hack; I apparently did not appease GCC with r160397.
llvm-svn: 160401
2012-07-17 22:32:15 +00:00
Dmitri Gribenko 82ea947018 Implement an optimization for finding the comment that occurs just after a
given declaration.

It is based on the observation that during parsing the comment that should be
attached to the decl is usually among the last two documentation comments
parsed.

llvm-svn: 160400
2012-07-17 22:01:09 +00:00
Eric Christopher 8b808c0c3d Robustify test in the face of no assertions.
llvm-svn: 160399
2012-07-17 21:52:07 +00:00