platform/upstream/llvm.git
11 years agoadd proper copyright header
Shankar Easwaran [Fri, 1 Feb 2013 15:05:11 +0000 (15:05 +0000)]
add proper copyright header

llvm-svn: 174178

11 years agoRemove currently unused register decoder from AArch64.
Tim Northover [Fri, 1 Feb 2013 14:55:05 +0000 (14:55 +0000)]
Remove currently unused register decoder from AArch64.

This should fix a warning when building this backend.

llvm-svn: 174177

11 years agoRevise unit testing for -fno-altivec, -mno-altivec.
Bill Schmidt [Fri, 1 Feb 2013 14:45:29 +0000 (14:45 +0000)]
Revise unit testing for -fno-altivec, -mno-altivec.

As suggested, reverted the end-to-end test and added variations to an
existing Driver test.

llvm-svn: 174176

11 years agotsan: even if races between atomic and plain memory accesses are turned off (report_a...
Dmitry Vyukov [Fri, 1 Feb 2013 14:41:58 +0000 (14:41 +0000)]
tsan: even if races between atomic and plain memory accesses are turned off (report_atomic_races=0),
still report races between atomic accesses and free().

llvm-svn: 174175

11 years agolibclang: itroduce cxstring::createEmpty()
Dmitri Gribenko [Fri, 1 Feb 2013 14:21:22 +0000 (14:21 +0000)]
libclang: itroduce cxstring::createEmpty()

llvm-svn: 174174

11 years agolibclang: introduce cxstring::createNull()
Dmitri Gribenko [Fri, 1 Feb 2013 14:13:32 +0000 (14:13 +0000)]
libclang: introduce cxstring::createNull()

llvm-svn: 174173

11 years agoRe-design the convenience interfaces on MatchFinder.
Manuel Klimek [Fri, 1 Feb 2013 13:41:35 +0000 (13:41 +0000)]
Re-design the convenience interfaces on MatchFinder.

First, this implements a match() method on MatchFinder; this allows us
to get rid of the findAll implementation, as findAll is really a special
case of recursive matchers on match.

Instead of findAll, provide a convenience function match() that lets
users iterate easily over the results instead of needing to implement
callbacks.

llvm-svn: 174172

11 years agoUse const visitors in ASTDumper.
Alexander Kornienko [Fri, 1 Feb 2013 12:35:51 +0000 (12:35 +0000)]
Use const visitors in ASTDumper.
http://llvm-reviews.chandlerc.com/D355
Patch by Philip Craig!

llvm-svn: 174171

11 years agoAdd explicit triples to AArch64 tests
Tim Northover [Fri, 1 Feb 2013 11:40:47 +0000 (11:40 +0000)]
Add explicit triples to AArch64 tests

Only Linux is supported at the moment, and other platforms quickly fault. As a
result these tests would fail on non-Linux hosts. It may be worth making the
tests more generic again as more platforms are supported.

llvm-svn: 174170

11 years agoHopefully fix windows build due to non-standard pair implementation.
Daniel Jasper [Fri, 1 Feb 2013 11:28:16 +0000 (11:28 +0000)]
Hopefully fix windows build due to non-standard pair implementation.

llvm-svn: 174169

11 years agotsan: say that the memory access is atomic in reports
Dmitry Vyukov [Fri, 1 Feb 2013 11:10:53 +0000 (11:10 +0000)]
tsan: say that the memory access is atomic in reports

llvm-svn: 174168

11 years agotsan: remember 2 stack frames for atomics (caller and atomic itself)
Dmitry Vyukov [Fri, 1 Feb 2013 11:01:17 +0000 (11:01 +0000)]
tsan: remember 2 stack frames for atomics (caller and atomic itself)

llvm-svn: 174167

11 years agoRevamp of the basic layouting algorithm in clang-format.
Daniel Jasper [Fri, 1 Feb 2013 11:00:45 +0000 (11:00 +0000)]
Revamp of the basic layouting algorithm in clang-format.

In order to end up with good solutions, clang-format needs to try
"all" combinations of line breaks, evaluate them and select the
best one. Before, we have done this using a DFS with memoization
and cut-off conditions. However, this approach is very limited
as shown by the huge static initializer in the attachment of
llvm.org/PR14959.

Instead, this new implementation uses a variant of Dijkstra's
algorithm to do a prioritized BFS over the solution space.

Some numbers:
lib/Format/TokenAnnotator.cpp: 1.5s -> 0.15s
Attachment of PR14959: 10min+ (didn't finish) -> 10s

No functional changes intended.

llvm-svn: 174166

11 years agotsan: add flag to not report races between atomic and plain memory accesses
Dmitry Vyukov [Fri, 1 Feb 2013 10:06:56 +0000 (10:06 +0000)]
tsan: add flag to not report races between atomic and plain memory accesses

llvm-svn: 174165

11 years agotsan: flip is_write bit in shadow to is_read
Dmitry Vyukov [Fri, 1 Feb 2013 10:02:55 +0000 (10:02 +0000)]
tsan: flip is_write bit in shadow to is_read
this makes calculation of interesting predicates faster

llvm-svn: 174164

11 years agotsan: detect races between plain and atomic memory accesses
Dmitry Vyukov [Fri, 1 Feb 2013 09:42:06 +0000 (09:42 +0000)]
tsan: detect races between plain and atomic memory accesses

llvm-svn: 174163

11 years ago[Docs] Update status :)
Michael J. Spencer [Fri, 1 Feb 2013 09:20:24 +0000 (09:20 +0000)]
[Docs] Update status :)

llvm-svn: 174162

11 years ago[ELF][x86-64] Fix ifunc and add test.
Michael J. Spencer [Fri, 1 Feb 2013 09:14:21 +0000 (09:14 +0000)]
[ELF][x86-64] Fix ifunc and add test.

In an previous commit I managed to completely disable the IRELATIVE relocation
writing code. I also used the wrong addend for the static relocation. Fix both
these issues and add a test. This test is quite brittle because there's no way
to do arithmetic on variables in FileCheck.

llvm-svn: 174161

11 years agoFix diagnostic for bad alignas use: it can't be applied to functions.
Richard Smith [Fri, 1 Feb 2013 08:25:07 +0000 (08:25 +0000)]
Fix diagnostic for bad alignas use: it can't be applied to functions.

llvm-svn: 174160

11 years agoAdd a new -Wundefined-inline warning for inline functions which are used but not
Nick Lewycky [Fri, 1 Feb 2013 08:13:20 +0000 (08:13 +0000)]
Add a new -Wundefined-inline warning for inline functions which are used but not
defined. Fixes PR14993!

llvm-svn: 174158

11 years agoImplement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign.
Richard Smith [Fri, 1 Feb 2013 08:12:08 +0000 (08:12 +0000)]
Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign.
Also support alignas(0), which C++11 and C11 require us to ignore.

llvm-svn: 174157

11 years agoRevert r174152. The shift amount may overflow and in that case this transformation...
Nadav Rotem [Fri, 1 Feb 2013 07:59:33 +0000 (07:59 +0000)]
Revert r174152. The shift amount may overflow and in that case this transformation is illegal.

llvm-svn: 174156

11 years ago[ELF][x86-64] Implement static relocation model for TLS.
Michael J. Spencer [Fri, 1 Feb 2013 07:14:14 +0000 (07:14 +0000)]
[ELF][x86-64] Implement static relocation model for TLS.

This implements the static relocation model for GOT accesses to TLS.

llvm-svn: 174155

11 years ago[ELF][x86-84] Add static TLS support.
Michael J. Spencer [Fri, 1 Feb 2013 07:13:49 +0000 (07:13 +0000)]
[ELF][x86-84] Add static TLS support.

llvm-svn: 174154

11 years agoModified the expression parser's class wrapper to
Sean Callanan [Fri, 1 Feb 2013 06:55:48 +0000 (06:55 +0000)]
Modified the expression parser's class wrapper to
support reporting "this" as a templated class.  The
expression parser wraps expressions in C++ methods
as methods with the signature

$__lldb_class::$__lldb_expr(...)

and previously responded to clang's queries about
$__lldb_class with the type of *this.  This didn't
work if *this was a ClassTemplateSpecializationDecl
because ClassTemplateSpecializationDecls can't be
the result of simple name queries.

Instead what we do now is respond that $__lldb_class
is a typedef and that the target of the typedef is
the (potentially templated) type of *this.  That is
much more robust.

Thanks to John McCall for key insights.

<rdar://problem/10987183>

llvm-svn: 174153

11 years agoOptimize shift lefts of a constant by a value plus constant into a single shift.
Nadav Rotem [Fri, 1 Feb 2013 06:45:40 +0000 (06:45 +0000)]
Optimize shift lefts of a constant by a value plus constant into a single shift.

llvm-svn: 174152

11 years agoAdd PPC A2Q core and BG/Q preprocessor definitions
Hal Finkel [Fri, 1 Feb 2013 05:53:33 +0000 (05:53 +0000)]
Add PPC A2Q core and BG/Q preprocessor definitions

The a2q core is the variant of the a2 core used on the BG/Q supercomputers.

llvm-svn: 174151

11 years ago[ELF][x86-64] Add the _GLOBAL_OFFSET_TABLE_ Atom in the correct location.
Michael J. Spencer [Fri, 1 Feb 2013 05:36:14 +0000 (05:36 +0000)]
[ELF][x86-64] Add the _GLOBAL_OFFSET_TABLE_ Atom in the correct location.

Now we link against glibc without --noinhibit-exec.

llvm-svn: 174150

11 years ago[ELF] Add more absolute atoms. Simplify how they are resolved.
Michael J. Spencer [Fri, 1 Feb 2013 05:36:00 +0000 (05:36 +0000)]
[ELF] Add more absolute atoms. Simplify how they are resolved.

llvm-svn: 174149

11 years agoadd hexagon scatter bits and split hexgontargethandler to hexagonrelocationhander
Shankar Easwaran [Fri, 1 Feb 2013 05:26:02 +0000 (05:26 +0000)]
add hexagon scatter bits and split hexgontargethandler to hexagonrelocationhander

llvm-svn: 174148

11 years agoDestroy arrays and ARC fields when throwing out of ctors.
John McCall [Fri, 1 Feb 2013 05:11:40 +0000 (05:11 +0000)]
Destroy arrays and ARC fields when throwing out of ctors.

Previously we were only handling non-array fields of class type.

Testcases derived from a patch by WenHan Gu.

llvm-svn: 174146

11 years agoDon't do delayed exception-specification checking on an invalid
Douglas Gregor [Fri, 1 Feb 2013 04:49:10 +0000 (04:49 +0000)]
Don't do delayed exception-specification checking on an invalid
class. Fixes <rdar://problem/13017229>.

llvm-svn: 174145

11 years ago[docs] Fixup fallout from other grammar fixup.
Sean Silva [Fri, 1 Feb 2013 03:50:20 +0000 (03:50 +0000)]
[docs] Fixup fallout from other grammar fixup.

My "excuse" for not refactoring the grammar here is to not diverge too
far from the grammar in the comments of TGParser.cpp, since I'm not
taking on the quest of majorly refactoring TGParser.cpp at the moment.

One benefit of doing this is that Ideas for refactoring and clarifying
the grammar in this document should translate almost immediately to
beneficial refactorings that can be made to TGParser.cpp.

llvm-svn: 174144

11 years ago[docs] Add missing colon to TableGen grammar.
Sean Silva [Fri, 1 Feb 2013 03:32:38 +0000 (03:32 +0000)]
[docs] Add missing colon to TableGen grammar.

Spotted by Eli Bendersky.

llvm-svn: 174143

11 years agoMachineModel: Inconsequential TableGen SubtargetEmitter fix.
Andrew Trick [Fri, 1 Feb 2013 03:19:54 +0000 (03:19 +0000)]
MachineModel: Inconsequential TableGen SubtargetEmitter fix.

Drive by fix. I noticed some missing logic that might bite future
users. This shouldn't affect the final output on currently modeled
targets.

llvm-svn: 174142

11 years agoMake sure a value is returned for Thread::ReturnFromFrame().
Greg Clayton [Fri, 1 Feb 2013 02:52:31 +0000 (02:52 +0000)]
Make sure a value is returned for Thread::ReturnFromFrame().

llvm-svn: 174141

11 years agoEnable -fno-altivec, -mno-altivec for PowerPC.
Bill Schmidt [Fri, 1 Feb 2013 02:14:03 +0000 (02:14 +0000)]
Enable -fno-altivec, -mno-altivec for PowerPC.

Introduces these negation forms explicitly and uses them to control a new
"altivec" target feature for PowerPC.  This allows avoiding generating
Altivec instructions on processors that support Altivec.

The new test case verifies that the Altivec "lvx" instruction is not
used when -fno-altivec is present on the command line.

llvm-svn: 174140

11 years ago[Sema][Attr]Fix alignment attribute printing.
Michael Han [Fri, 1 Feb 2013 01:19:17 +0000 (01:19 +0000)]
[Sema][Attr]Fix alignment attribute printing.

Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should
only model those appear in source code. Introduce attribute Accessor, and teach TableGen
to generate syntax kind accessors for Align attribute, and use those accessors to decide
if an alignment attribute is a declspec attribute.

llvm-svn: 174133

11 years agoRemove some dead code, improve some asserts, and other assorted changes. No functiona...
Bill Wendling [Fri, 1 Feb 2013 01:04:27 +0000 (01:04 +0000)]
Remove some dead code, improve some asserts, and other assorted changes. No functionality change.

llvm-svn: 174132

11 years agoAdd a comment explaining an unavailable optimization.
Dan Gohman [Fri, 1 Feb 2013 00:49:06 +0000 (00:49 +0000)]
Add a comment explaining an unavailable optimization.

llvm-svn: 174131

11 years agoRemove one of the odious 'Raw' methods.
Bill Wendling [Fri, 1 Feb 2013 00:48:14 +0000 (00:48 +0000)]
Remove one of the odious 'Raw' methods.

llvm-svn: 174130

11 years agoAllow the target to give out the size of the red zone for given ABIs.
Greg Clayton [Fri, 1 Feb 2013 00:47:49 +0000 (00:47 +0000)]
Allow the target to give out the size of the red zone for given ABIs.

A bit of cleanup in the heap module.

llvm-svn: 174129

11 years agoGet rid for switch statement warning for unhandled cases.
Greg Clayton [Fri, 1 Feb 2013 00:46:49 +0000 (00:46 +0000)]
Get rid for switch statement warning for unhandled cases.

llvm-svn: 174128

11 years agoFixed register dumping for contained-regs.
Greg Clayton [Fri, 1 Feb 2013 00:45:52 +0000 (00:45 +0000)]
Fixed register dumping for contained-regs.

llvm-svn: 174127

11 years agoConsistently format sample diagnostics on this page.
Richard Smith [Fri, 1 Feb 2013 00:45:12 +0000 (00:45 +0000)]
Consistently format sample diagnostics on this page.

llvm-svn: 174126

11 years agoclang/test/Index/headerfile-comment-to-html.m: Try to unbreak libxml2-less hosts...
NAKAMURA Takumi [Fri, 1 Feb 2013 00:17:45 +0000 (00:17 +0000)]
clang/test/Index/headerfile-comment-to-html.m: Try to unbreak libxml2-less hosts to eliminate "CommentXMLValid".

llvm-svn: 174124

11 years agoUse iterators instead of relying upon a bitmask of attributes to remove attributes...
Bill Wendling [Fri, 1 Feb 2013 00:13:50 +0000 (00:13 +0000)]
Use iterators instead of relying upon a bitmask of attributes to remove attributes from an AttrBuilder.

llvm-svn: 174123

11 years agoRewrite instsimplify's handling if icmp on pointer values to remove the
Dan Gohman [Fri, 1 Feb 2013 00:11:13 +0000 (00:11 +0000)]
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

11 years agoFix another typo in the classof definitions that doesn't (currently)
Chandler Carruth [Fri, 1 Feb 2013 00:04:33 +0000 (00:04 +0000)]
Fix another typo in the classof definitions that doesn't (currently)
have any effect. Spotted by Eli in review, thanks!!!

llvm-svn: 174121

11 years agoAdd iterators to the AttributeSet class so that we can access the Attributes in a...
Bill Wendling [Thu, 31 Jan 2013 23:53:05 +0000 (23:53 +0000)]
Add iterators to the AttributeSet class so that we can access the Attributes in a nice way.

llvm-svn: 174120

11 years agoAn alloca can be equal to an argument. It can't *alias* an alloca, but it could
Dan Gohman [Thu, 31 Jan 2013 23:49:33 +0000 (23:49 +0000)]
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

11 years agoSwitch the code added in r173885 to use the new, shiny RTTI
Chandler Carruth [Thu, 31 Jan 2013 23:43:14 +0000 (23:43 +0000)]
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

11 years agoFix a think-o in the condition here. =[ I would commit the test that
Chandler Carruth [Thu, 31 Jan 2013 23:43:12 +0000 (23:43 +0000)]
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

11 years agos/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descript...
Bill Wendling [Thu, 31 Jan 2013 23:38:01 +0000 (23:38 +0000)]
s/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descriptive of what it actually is.

llvm-svn: 174116

11 years agoFix a copy/paste-o that got missed because 'check' doesn't build lto.
Chandler Carruth [Thu, 31 Jan 2013 23:34:47 +0000 (23:34 +0000)]
Fix a copy/paste-o that got missed because 'check' doesn't build lto.

llvm-svn: 174115

11 years agoComment parsing: add more comments to CommentCommands.td
Dmitri Gribenko [Thu, 31 Jan 2013 23:31:14 +0000 (23:31 +0000)]
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

11 years agoGive the MCStreamer class hierarchy LLVM RTTI facilities for use with
Chandler Carruth [Thu, 31 Jan 2013 23:29:57 +0000 (23:29 +0000)]
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

11 years agoEscape backslash in the comment.
Dmitri Gribenko [Thu, 31 Jan 2013 23:20:06 +0000 (23:20 +0000)]
Escape backslash in the comment.

llvm-svn: 174112

11 years agoUpdate the tests.
Bill Wendling [Thu, 31 Jan 2013 23:17:12 +0000 (23:17 +0000)]
Update the tests.

This update coincides with r174110. That change ordered the attributes
alphabetically.

llvm-svn: 174111

11 years agoRemove the AttrBuilder form of the Attribute::get creators.
Bill Wendling [Thu, 31 Jan 2013 23:16:25 +0000 (23:16 +0000)]
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

11 years ago[Comment parsing] Add support for recognizing
Fariborz Jahanian [Thu, 31 Jan 2013 23:12:39 +0000 (23:12 +0000)]
[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

11 years agoRegenerate configure to hopefully fix buildbot breakage. Oh how I love autoconf.
Richard Smith [Thu, 31 Jan 2013 23:02:23 +0000 (23:02 +0000)]
Regenerate configure to hopefully fix buildbot breakage. Oh how I love autoconf.

llvm-svn: 174108

11 years ago[Core] Only complain about undefined symbols if they are marked as canBeNullNever.
Michael J. Spencer [Thu, 31 Jan 2013 22:56:13 +0000 (22:56 +0000)]
[Core] Only complain about undefined symbols if they are marked as canBeNullNever.

llvm-svn: 174107

11 years agoUpdate AMDGPURegisterInfo::eliminateFrameIndex() corresponding to r174083.
NAKAMURA Takumi [Thu, 31 Jan 2013 22:55:51 +0000 (22:55 +0000)]
Update AMDGPURegisterInfo::eliminateFrameIndex() corresponding to r174083.

llvm-svn: 174106

11 years ago[analyzer]RetainCount: Fix an autorelease related false positive.
Anna Zaks [Thu, 31 Jan 2013 22:36:17 +0000 (22:36 +0000)]
[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

11 years agoAdd -Wno-nested-anon-types to -pedantic builds of LLVM. This Clang warning
Richard Smith [Thu, 31 Jan 2013 22:19:12 +0000 (22:19 +0000)]
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

11 years ago[lit] Add a test for internal shell execution behaviors.
Daniel Dunbar [Thu, 31 Jan 2013 22:15:20 +0000 (22:15 +0000)]
[lit] Add a test for internal shell execution behaviors.

llvm-svn: 174102

11 years ago[lit] Change to raise InternalShellError for all command execution issues.
Daniel Dunbar [Thu, 31 Jan 2013 22:15:15 +0000 (22:15 +0000)]
[lit] Change to raise InternalShellError for all command execution issues.

llvm-svn: 174101

11 years agoDocument another instsimplify assumption.
Dan Gohman [Thu, 31 Jan 2013 22:13:00 +0000 (22:13 +0000)]
Document another instsimplify assumption.

llvm-svn: 174100

11 years agoR600: Fold clamp, neg, abs
Tom Stellard [Thu, 31 Jan 2013 22:11:54 +0000 (22:11 +0000)]
R600: Fold clamp, neg, abs

Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174099

11 years agoR600: Consider bitcast when folding const_address node.
Tom Stellard [Thu, 31 Jan 2013 22:11:53 +0000 (22:11 +0000)]
R600: Consider bitcast when folding const_address node.

Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174098

11 years agoR600: Make store_dummy intrinsic more general by passing export type
Tom Stellard [Thu, 31 Jan 2013 22:11:46 +0000 (22:11 +0000)]
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

11 years ago[analyzer] Don't track autorelease pools created by +new.
Jordan Rose [Thu, 31 Jan 2013 22:06:02 +0000 (22:06 +0000)]
[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

11 years agoAdd "thread return -x" to unwind the innermost user called expression (if you happen...
Jim Ingham [Thu, 31 Jan 2013 21:46:01 +0000 (21:46 +0000)]
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

11 years agoRemove unused variable, which should have been removed with r174083.
Chad Rosier [Thu, 31 Jan 2013 21:23:44 +0000 (21:23 +0000)]
Remove unused variable, which should have been removed with r174083.

llvm-svn: 174094

11 years agoLinker: correctly link in dbg.declare
Manman Ren [Thu, 31 Jan 2013 21:19:18 +0000 (21:19 +0000)]
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

11 years ago[ELF][x86-64] Improve unknown relocation message.
Michael J. Spencer [Thu, 31 Jan 2013 21:00:57 +0000 (21:00 +0000)]
[ELF][x86-64] Improve unknown relocation message.

llvm-svn: 174092

11 years ago[ELF] Create atoms for progbits sections with no symbols but still have content.
Michael J. Spencer [Thu, 31 Jan 2013 21:00:42 +0000 (21:00 +0000)]
[ELF] Create atoms for progbits sections with no symbols but still have content.

llvm-svn: 174091

11 years agoAdd support for emitting a string attribute.
Bill Wendling [Thu, 31 Jan 2013 20:59:05 +0000 (20:59 +0000)]
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

11 years ago[lit] Fix bug where InternalShellError messages were discarded.
Daniel Dunbar [Thu, 31 Jan 2013 20:58:16 +0000 (20:58 +0000)]
[lit] Fix bug where InternalShellError messages were discarded.
 - Also, change the exit code to match 'sh'.

llvm-svn: 174089

11 years agoAdd braces, so my head doesn't explode.
Chad Rosier [Thu, 31 Jan 2013 20:57:50 +0000 (20:57 +0000)]
Add braces, so my head doesn't explode.

llvm-svn: 174088

11 years ago[lit] Fix a shell parsing bug with ';' not separated by whitespace.
Daniel Dunbar [Thu, 31 Jan 2013 20:51:17 +0000 (20:51 +0000)]
[lit] Fix a shell parsing bug with ';' not separated by whitespace.
 - Testing finds bugs, who knew.

llvm-svn: 174087

11 years agoUpdate AArch64 backend to changed eliminateFrameIndex interface.
Tim Northover [Thu, 31 Jan 2013 20:46:53 +0000 (20:46 +0000)]
Update AArch64 backend to changed eliminateFrameIndex interface.

llvm-svn: 174086

11 years agoWhen lowering memcpys to loads and stores, make sure we don't promote alignments
Lang Hames [Thu, 31 Jan 2013 20:23:43 +0000 (20:23 +0000)]
When lowering memcpys to loads and stores, make sure we don't promote alignments
past the natural stack alignment.

llvm-svn: 174085

11 years ago[Dwarf] early exit to avoid creating dangling DIEs
Manman Ren [Thu, 31 Jan 2013 20:05:14 +0000 (20:05 +0000)]
[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

11 years ago[PEI] Pass the frame index operand number to the eliminateFrameIndex function.
Chad Rosier [Thu, 31 Jan 2013 20:02:54 +0000 (20:02 +0000)]
[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

11 years agoChange the default behavior for unwinding and breakpoints when running expressions.
Jim Ingham [Thu, 31 Jan 2013 19:48:57 +0000 (19:48 +0000)]
Change the default behavior for unwinding and breakpoints when running expressions.

<rdar://problem/13121442>

llvm-svn: 174082

11 years agoLexer: Don't warn about Unicode in preprocessor directives.
Jordan Rose [Thu, 31 Jan 2013 19:48:48 +0000 (19:48 +0000)]
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

11 years agointerpreter: Fix errant fallthrough.
Jim Grosbach [Thu, 31 Jan 2013 19:46:59 +0000 (19:46 +0000)]
interpreter: Fix errant fallthrough.

llvm-svn: 174080

11 years agoObject: Fix errant fallthrough.
Jim Grosbach [Thu, 31 Jan 2013 19:46:57 +0000 (19:46 +0000)]
Object: Fix errant fallthrough.

llvm-svn: 174079

11 years agoRuntimeDyld: Fix errant fallthrough.
Jim Grosbach [Thu, 31 Jan 2013 19:46:28 +0000 (19:46 +0000)]
RuntimeDyld: Fix errant fallthrough.

llvm-svn: 174078

11 years agoPreprocessor: initialize member introduced in r173881.
Jordan Rose [Thu, 31 Jan 2013 19:26:01 +0000 (19:26 +0000)]
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

11 years agoReverted unintendedly-committed file.
Alexander Kornienko [Thu, 31 Jan 2013 19:05:31 +0000 (19:05 +0000)]
Reverted unintendedly-committed file.

llvm-svn: 174076

11 years agoMicro-change: moved a brace for better readability
Alexander Kornienko [Thu, 31 Jan 2013 19:03:16 +0000 (19:03 +0000)]
Micro-change: moved a brace for better readability

llvm-svn: 174075

11 years agoMaking sure a Pythonless build of LLDB works by #ifdef-ing out formatters code.
Enrico Granata [Thu, 31 Jan 2013 18:24:22 +0000 (18:24 +0000)]
Making sure a Pythonless build of LLDB works by #ifdef-ing out formatters code.

llvm-svn: 174074

11 years agoTurn off missing field initializer warnings for gcc
Edwin Vane [Thu, 31 Jan 2013 18:05:54 +0000 (18:05 +0000)]
Turn off missing field initializer warnings for gcc

gcc produces false positives for empty braces so turning the warning off.
Instead, turning the warning on for clang so proper warnings aren't missed.

Reviewers: dblaikie, chandlerc

llvm-svn: 174073

11 years ago[lit] Add a test for the various ShTest format features.
Daniel Dunbar [Thu, 31 Jan 2013 18:05:01 +0000 (18:05 +0000)]
[lit] Add a test for the various ShTest format features.

llvm-svn: 174072

11 years ago[lit] TestRunner: Eliminate failDueToStderr argument, which is now unused.
Daniel Dunbar [Thu, 31 Jan 2013 18:04:45 +0000 (18:04 +0000)]
[lit] TestRunner: Eliminate failDueToStderr argument, which is now unused.

llvm-svn: 174071

11 years ago[lit] Delete the now-unused SyntaxCheckTest format.
Daniel Dunbar [Thu, 31 Jan 2013 18:04:38 +0000 (18:04 +0000)]
[lit] Delete the now-unused SyntaxCheckTest format.
 - Also, kill the pointless LitFormats module.

llvm-svn: 174070

11 years agoRevert "[analyzer] Model trivial copy/move ctors with an aggregate bind."
Jordan Rose [Thu, 31 Jan 2013 18:04:03 +0000 (18:04 +0000)]
Revert "[analyzer] Model trivial copy/move ctors with an aggregate bind."

It's causing hangs on our internal analyzer buildbot. Will restore after
investigating.

This reverts r173951 / baa7ca1142990e1ad6d4e9d2c73adb749ff50789.

llvm-svn: 174069