Commit Graph

142636 Commits

Author SHA1 Message Date
Greg Clayton 3dcaa2c8c8 Get rid for switch statement warning for unhandled cases.
llvm-svn: 174128
2013-02-01 00:46:49 +00:00
Greg Clayton 4959b7b8f5 Fixed register dumping for contained-regs.
llvm-svn: 174127
2013-02-01 00:45:52 +00:00
Richard Smith 4e483edaf9 Consistently format sample diagnostics on this page.
llvm-svn: 174126
2013-02-01 00:45:12 +00:00
NAKAMURA Takumi 524bed1467 clang/test/Index/headerfile-comment-to-html.m: Try to unbreak libxml2-less hosts to eliminate "CommentXMLValid".
llvm-svn: 174124
2013-02-01 00:17:45 +00:00
Bill Wendling f1c94e3241 Use iterators instead of relying upon a bitmask of attributes to remove attributes from an AttrBuilder.
llvm-svn: 174123
2013-02-01 00:13:50 +00:00
Dan Gohman b3e2d3a638 Rewrite instsimplify's handling if icmp on pointer values to remove the
remaining use of AliasAnalysis concepts such as isIdentifiedObject to
prove pointer inequality.

@external_compare in test/Transforms/InstSimplify/compare.ll shows a simple
case where a noalias argument can be equal to a global variable address, and
while AliasAnalysis can get away with saying that these pointers don't alias,
instsimplify cannot say that they are not equal.

llvm-svn: 174122
2013-02-01 00:11:13 +00:00
Chandler Carruth 339468ece6 Fix another typo in the classof definitions that doesn't (currently)
have any effect. Spotted by Eli in review, thanks!!!

llvm-svn: 174121
2013-02-01 00:04:33 +00:00
Bill Wendling a91748602a Add iterators to the AttributeSet class so that we can access the Attributes in a nice way.
llvm-svn: 174120
2013-01-31 23:53:05 +00:00
Dan Gohman 995d40e1e2 An alloca can be equal to an argument. It can't *alias* an alloca, but it could
be equal, since there's nothing preventing a caller from correctly predicting
the stack location of an alloca.

llvm-svn: 174119
2013-01-31 23:49:33 +00:00
Chandler Carruth e5d8d0d64b Switch the code added in r173885 to use the new, shiny RTTI
infrastructure on MCStreamer to test for whether there is an
MCELFStreamer object available.

This is just a cleanup on the AsmPrinter side of things, moving ad-hoc
tests of random APIs to a direct type query. But the AsmParser
completely broken. There were no tests, it just blindly cast its
streamer to an MCELFStreamer and started manipulating it.

I don't have a test case -- this actually failed on LLVM's own
regression test suite. Unfortunately the failure only appears when the
stars, compilers, and runtime align to misbehave when we read a pointer
to a formatted_raw_ostream as-if it were an MCAssembler. =/

UBSan would catch this immediately.

Many thanks to Matt for doing about 80% of the debugging work here in
GDB, Jim for helping to explain how exactly to fix this, and others for
putting up with the hair pulling that ensued during debugging it.

llvm-svn: 174118
2013-01-31 23:43:14 +00:00
Chandler Carruth a983b4de7a Fix a think-o in the condition here. =[ I would commit the test that
caught this, but I want that in a separate commit in case there is
a need to revert the actual functional bit as part of reverting other
patches. This way, the commits relating to just getting the RTTI bits in
place are separate from the functional changes that start using them.

llvm-svn: 174117
2013-01-31 23:43:12 +00:00
Bill Wendling 23804daad9 s/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descriptive of what it actually is.
llvm-svn: 174116
2013-01-31 23:38:01 +00:00
Chandler Carruth 30cfaa2578 Fix a copy/paste-o that got missed because 'check' doesn't build lto.
llvm-svn: 174115
2013-01-31 23:34:47 +00:00
Dmitri Gribenko e40292ae62 Comment parsing: add more comments to CommentCommands.td
I hope the ASCII art delimiters are OK, since they group *groups* of commands --
that is really helpful.

llvm-svn: 174114
2013-01-31 23:31:14 +00:00
Chandler Carruth de093ef8d6 Give the MCStreamer class hierarchy LLVM RTTI facilities for use with
isa<> and dyn_cast<>. In several places, code is already hacking around
the absence of this, and there seem to be several interfaces that might
be lifted and/or devirtualized using this.

This change was based on a discussion with Jim Grosbach about how best
to handle testing for specific MCStreamer subclasses. He said that this
was the correct end state, and everything else was too hacky so
I decided to just make it so.

No functionality should be changed here, this is just threading the kind
through all the constructors and setting up the classof overloads.

llvm-svn: 174113
2013-01-31 23:29:57 +00:00
Dmitri Gribenko b7d4392bee Escape backslash in the comment.
llvm-svn: 174112
2013-01-31 23:20:06 +00:00
Bill Wendling 85ab57ac5d Update the tests.
This update coincides with r174110. That change ordered the attributes
alphabetically.

llvm-svn: 174111
2013-01-31 23:17:12 +00:00
Bill Wendling 1c7cc8ae90 Remove the AttrBuilder form of the Attribute::get creators.
The AttrBuilder is for building a collection of attributes. The Attribute object
holds only one attribute. So it's not really useful for the Attribute object to
have a creator which takes an AttrBuilder.

This has two fallouts:

1. The AttrBuilder no longer holds its internal attributes in a bit-mask form.
2. The attributes are now ordered alphabetically (hence why the tests have changed).

llvm-svn: 174110
2013-01-31 23:16:25 +00:00
Fariborz Jahanian 1a0cf80533 [Comment parsing] Add support for recognizing
\headerfile command and representing it in an xml
document. Patch reviewed by Dmitri Gribenko.
// rdar://12397511

llvm-svn: 174109
2013-01-31 23:12:39 +00:00
Richard Smith f47dc0ba93 Regenerate configure to hopefully fix buildbot breakage. Oh how I love autoconf.
llvm-svn: 174108
2013-01-31 23:02:23 +00:00
Michael J. Spencer 280dadbbaf [Core] Only complain about undefined symbols if they are marked as canBeNullNever.
llvm-svn: 174107
2013-01-31 22:56:13 +00:00
NAKAMURA Takumi e1137a2058 Update AMDGPURegisterInfo::eliminateFrameIndex() corresponding to r174083.
llvm-svn: 174106
2013-01-31 22:55:51 +00:00
Anna Zaks a8bcc65819 [analyzer]RetainCount: Fix an autorelease related false positive.
The Cnt variable is adjusted (incremented) for simplification of
checking logic. The increment should not be stored in the state.

llvm-svn: 174104
2013-01-31 22:36:17 +00:00
Richard Smith 6c26e74781 Add -Wno-nested-anon-types to -pedantic builds of LLVM. This Clang warning
catches uses of an extremely minor and widely-available C++ extension (which
every C++ compiler I could find supports, but EDG and Clang reject in strict
mode).

The diagnosed code pattern looks like this:

struct X {
  union {
    struct {
      int a;
      int b;
    } S;
  };
};

llvm-svn: 174103
2013-01-31 22:19:12 +00:00
Daniel Dunbar 38d3798b94 [lit] Add a test for internal shell execution behaviors.
llvm-svn: 174102
2013-01-31 22:15:20 +00:00
Daniel Dunbar f36e032c41 [lit] Change to raise InternalShellError for all command execution issues.
llvm-svn: 174101
2013-01-31 22:15:15 +00:00
Dan Gohman 8aa3dafb7b Document another instsimplify assumption.
llvm-svn: 174100
2013-01-31 22:13:00 +00:00
Tom Stellard 4926921bd4 R600: Fold clamp, neg, abs
Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174099
2013-01-31 22:11:54 +00:00
Tom Stellard dd04c83a4d R600: Consider bitcast when folding const_address node.
Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174098
2013-01-31 22:11:53 +00:00
Tom Stellard af1bce7d1d R600: Make store_dummy intrinsic more general by passing export type
Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174097
2013-01-31 22:11:46 +00:00
Jordan Rose 95bf3b0a6c [analyzer] Don't track autorelease pools created by +new.
This matches our behavior for autorelease pools created by +alloc. Some
people like to create autorelease pools in one method and release them
somewhere else.

If you want safe autorelease pool semantics, use the new ARC-compatible
syntax: @autoreleasepool { ... }

<rdar://problem/13121353>

llvm-svn: 174096
2013-01-31 22:06:02 +00:00
Jim Ingham 93208b8680 Add "thread return -x" to unwind the innermost user called expression (if you happen to have stopped in it due to a crash.)
Make the message when you hit an crash while evaluating an expression a little clearer, and mention "thread return -x".

rdar://problem/13110464

llvm-svn: 174095
2013-01-31 21:46:01 +00:00
Chad Rosier 3145deac19 Remove unused variable, which should have been removed with r174083.
llvm-svn: 174094
2013-01-31 21:23:44 +00:00
Manman Ren aec2ce7db4 Linker: correctly link in dbg.declare
This is a re-worked version of r174048.
Given source IR:
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15
we used to generate 
call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29
!27 = metadata !{null}

With this patch, we will correctly generate
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28

Looking up %argc.addr in ValueMap will return null, since %argc.addr is already
correctly set up, we can use identity mapping.

rdar://problem/13089880

llvm-svn: 174093
2013-01-31 21:19:18 +00:00
Michael J. Spencer 461d33648b [ELF][x86-64] Improve unknown relocation message.
llvm-svn: 174092
2013-01-31 21:00:57 +00:00
Michael J. Spencer 3830d2c49f [ELF] Create atoms for progbits sections with no symbols but still have content.
llvm-svn: 174091
2013-01-31 21:00:42 +00:00
Bill Wendling 9c2eba95d2 Add support for emitting a string attribute.
Attributes that are strings are typically target-dependent attributes. They are
of this form in the IR:

   "attr"
   "attr" = "val"

llvm-svn: 174090
2013-01-31 20:59:05 +00:00
Daniel Dunbar a17da6294d [lit] Fix bug where InternalShellError messages were discarded.
- Also, change the exit code to match 'sh'.

llvm-svn: 174089
2013-01-31 20:58:16 +00:00
Chad Rosier 44e65a512d Add braces, so my head doesn't explode.
llvm-svn: 174088
2013-01-31 20:57:50 +00:00
Daniel Dunbar 281e4b1f92 [lit] Fix a shell parsing bug with ';' not separated by whitespace.
- Testing finds bugs, who knew.

llvm-svn: 174087
2013-01-31 20:51:17 +00:00
Tim Northover c6d39314b2 Update AArch64 backend to changed eliminateFrameIndex interface.
llvm-svn: 174086
2013-01-31 20:46:53 +00:00
Lang Hames dd47804394 When lowering memcpys to loads and stores, make sure we don't promote alignments
past the natural stack alignment.

llvm-svn: 174085
2013-01-31 20:23:43 +00:00
Manman Ren 53f3f9f0cb [Dwarf] early exit to avoid creating dangling DIEs
We used to create children DIEs for a scope, then check whether ScopeDIE is
null. If ScopeDIE is null, the children DIEs will be dangling. Other DIEs can
link to those dangling DIEs, which are not emitted at all, causing dwarf error.

The current testing case is 4k lines, from MultiSource/BenchMark/McCat/09-vor.

rdar://problem/13071959

llvm-svn: 174084
2013-01-31 20:05:14 +00:00
Chad Rosier df782d2225 [PEI] Pass the frame index operand number to the eliminateFrameIndex function.
Each target implementation was needlessly recomputing the index.
Part of rdar://13076458

llvm-svn: 174083
2013-01-31 20:02:54 +00:00
Jim Ingham afc1b12f01 Change the default behavior for unwinding and breakpoints when running expressions.
<rdar://problem/13121442>

llvm-svn: 174082
2013-01-31 19:48:57 +00:00
Jordan Rose cc538345be Lexer: Don't warn about Unicode in preprocessor directives.
This allows people to use Unicode in their #pragma mark and in macros
that exist only to be string-ized.

<rdar://problem/13107323&13121362>

llvm-svn: 174081
2013-01-31 19:48:48 +00:00
Jim Grosbach b9baa448b9 interpreter: Fix errant fallthrough.
llvm-svn: 174080
2013-01-31 19:46:59 +00:00
Jim Grosbach 048d2f9684 Object: Fix errant fallthrough.
llvm-svn: 174079
2013-01-31 19:46:57 +00:00
Jim Grosbach 261dccac1a RuntimeDyld: Fix errant fallthrough.
llvm-svn: 174078
2013-01-31 19:46:28 +00:00
Jordan Rose 324ec4221a Preprocessor: initialize member introduced in r173881.
Compilation always sets this explicitly, but creating a preprocessor
manually should still put the 'IsPreprocessedOutput' flag in a valid state.

llvm-svn: 174077
2013-01-31 19:26:01 +00:00