platform/upstream/llvm.git
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

11 years agoClarify intent.
Jakob Stoklund Olesen [Thu, 31 Jan 2013 17:56:23 +0000 (17:56 +0000)]
Clarify intent.

llvm-svn: 174068

11 years ago[MC] bundle alignment: prevent padding instructions from crossing bundle boundaries
Derek Schuff [Thu, 31 Jan 2013 17:00:03 +0000 (17:00 +0000)]
[MC] bundle alignment: prevent padding instructions from crossing bundle boundaries

llvm-svn: 174067

11 years agoadd support for assigning virtual addresses to TDATA/TBSS sections
Shankar Easwaran [Thu, 31 Jan 2013 16:04:47 +0000 (16:04 +0000)]
add support for assigning virtual addresses to TDATA/TBSS sections

llvm-svn: 174065

11 years agoclang/test/Index/skip-parsed-bodies/compile_commands.json: Mark it as XFAIL:mingw32...
NAKAMURA Takumi [Thu, 31 Jan 2013 16:01:13 +0000 (16:01 +0000)]
clang/test/Index/skip-parsed-bodies/compile_commands.json: Mark it as XFAIL:mingw32, for now.

llvm-svn: 174064

11 years agoNever break inside something that was a preprocessor directive.
Manuel Klimek [Thu, 31 Jan 2013 15:58:48 +0000 (15:58 +0000)]
Never break inside something that was a preprocessor directive.

Just put it in one unwrapped line and let the formatter handle it.

llvm-svn: 174063

11 years agoSeveral improvements to the formatting of static initializers.
Daniel Jasper [Thu, 31 Jan 2013 14:59:26 +0000 (14:59 +0000)]
Several improvements to the formatting of static initializers.

1. Never avoid bin packing in static initializers as this can
   lead to terrible results.
2. If an element has to be broken over multiple lines, break after
   the following comma.

This should be a step forward, but there are still many cases
especially with nested static initializers that we handle badly.
More patches will follow.

llvm-svn: 174061

11 years agoAttempt to fix Windows build breakage.
Evgeniy Stepanov [Thu, 31 Jan 2013 14:27:38 +0000 (14:27 +0000)]
Attempt to fix Windows build breakage.

llvm-svn: 174060

11 years ago[sanitizer] make the error messages from sanitizer_common contain the actual tool...
Kostya Serebryany [Thu, 31 Jan 2013 14:11:21 +0000 (14:11 +0000)]
[sanitizer] make the error messages from sanitizer_common contain the actual tool name

llvm-svn: 174059

11 years ago[ASan] Split ASan interface header into private and public parts. Add a test that...
Alexey Samsonov [Thu, 31 Jan 2013 13:46:14 +0000 (13:46 +0000)]
[ASan] Split ASan interface header into private and public parts. Add a test that makes sure users can include interface header

llvm-svn: 174058

11 years agoMove commonly useful code for AST testing into MatchVerfier.h.
Manuel Klimek [Thu, 31 Jan 2013 13:10:40 +0000 (13:10 +0000)]
Move commonly useful code for AST testing into MatchVerfier.h.

llvm-svn: 174057

11 years agoAdd myself as code owner of AArch64 backend.
Tim Northover [Thu, 31 Jan 2013 12:51:16 +0000 (12:51 +0000)]
Add myself as code owner of AArch64 backend.

llvm-svn: 174056

11 years agoAdd support for AArch64 target.
Tim Northover [Thu, 31 Jan 2013 12:13:10 +0000 (12:13 +0000)]
Add support for AArch64 target.

In cooperation with the LLVM patch, this should implement all scalar front-end
parts of the C and C++ ABIs for AArch64.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

llvm-svn: 174055

11 years agoAdd AArch64 as an experimental target.
Tim Northover [Thu, 31 Jan 2013 12:12:40 +0000 (12:12 +0000)]
Add AArch64 as an experimental target.

This patch adds support for AArch64 (ARM's 64-bit architecture) to
LLVM in the "experimental" category. Currently, it won't be built
unless requested explicitly.

This initial commit should have support for:
    + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions
      (except the late addition CRC instructions).
    + CodeGen features required for C++03 and C99.
    + Compilation for the "small" memory model: code+static data <
      4GB.
    + Absolute and position-independent code.
    + GNU-style (i.e. "__thread") TLS.
    + Debugging information.

The principal omission, currently, is performance tuning.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

llvm-svn: 174054

11 years agoRevert r174043 and tweak the comment wording so I'm (hopefully) not confused by it...
Richard Smith [Thu, 31 Jan 2013 11:30:17 +0000 (11:30 +0000)]
Revert r174043 and tweak the comment wording so I'm (hopefully) not confused by it again!

llvm-svn: 174053

11 years agoMade the min-trip-count-switch test X86-specific to avoid
Pekka Jaaskelainen [Thu, 31 Jan 2013 10:33:22 +0000 (10:33 +0000)]
Made the min-trip-count-switch test X86-specific to avoid
breakage with builds without X86-support.

llvm-svn: 174052

11 years agoAnnotate BumpPtrAllocator for MemorySanitizer.
Evgeniy Stepanov [Thu, 31 Jan 2013 09:58:59 +0000 (09:58 +0000)]
Annotate BumpPtrAllocator for MemorySanitizer.

This change adds MemorySanitizer annotations to BumpPtrAllocator to
improve report quality.

llvm-svn: 174051

11 years agoAdded outer template parameter lists to friend type AST nodes.
Enea Zaffanella [Thu, 31 Jan 2013 09:54:08 +0000 (09:54 +0000)]
Added outer template parameter lists to friend type AST nodes.

llvm-svn: 174050

11 years ago[msan] Run more optimizations after MemorySanitizer pass.
Evgeniy Stepanov [Thu, 31 Jan 2013 09:53:29 +0000 (09:53 +0000)]
[msan] Run more optimizations after MemorySanitizer pass.

MSan instrumentation is driven by the original code. We take every
incoming instruction and emit another instruction (or ten) next to
it, operating on the shadow values (but sometimes on the real values,
too). Two programs in one, essentially. There can be any kinds of
redundancies in the second one, so we just run whatever is normally
run at -O2, and then exclude some passes that do not help much with
benchmarks.

llvm-svn: 174049

11 years agoRevert r173946. This breaks compilation of googletest with Clang
Alexey Samsonov [Thu, 31 Jan 2013 08:02:11 +0000 (08:02 +0000)]
Revert r173946. This breaks compilation of googletest with Clang

llvm-svn: 174048

11 years agotsan: switch to explicit thread contexts in Go (instead of monotonic goroutine ids)
Dmitry Vyukov [Thu, 31 Jan 2013 07:48:43 +0000 (07:48 +0000)]
tsan: switch to explicit thread contexts in Go (instead of monotonic goroutine ids)

llvm-svn: 174047

11 years agotsan: do not check for intersecting memory accesses in Go (all accesses are 1 byte)
Dmitry Vyukov [Thu, 31 Jan 2013 07:47:58 +0000 (07:47 +0000)]
tsan: do not check for intersecting memory accesses in Go (all accesses are 1 byte)

llvm-svn: 174046

11 years agoAdded the ability to search segments for data. Currently __TEXT, __LINKEDIT and __PAG...
Greg Clayton [Thu, 31 Jan 2013 06:38:09 +0000 (06:38 +0000)]
Added the ability to search segments for data. Currently __TEXT, __LINKEDIT and __PAGEZERO are excluded.

Added many more cleanups to the output.

llvm-svn: 174045

11 years agoRemove the Attribute::hasAttributes() function.
Bill Wendling [Thu, 31 Jan 2013 06:22:35 +0000 (06:22 +0000)]
Remove the Attribute::hasAttributes() function.

That function doesn't make sense anymore because there's only one attribute per
Attribute object now.

llvm-svn: 174044

11 years agoRemove incorrect warning signs from QualType::getUnqualifiedType(). These
Richard Smith [Thu, 31 Jan 2013 06:13:11 +0000 (06:13 +0000)]
Remove incorrect warning signs from QualType::getUnqualifiedType(). These
statements were only true for 65 CLs after they were introduced two years ago.

llvm-svn: 174043

11 years agoWhen we're emitting a constructor or destructor call from a delegating
Douglas Gregor [Thu, 31 Jan 2013 05:50:40 +0000 (05:50 +0000)]
When we're emitting a constructor or destructor call from a delegating
constructor, retrieve our VTT parameter directly. Fixes PR14588 /
<rdar://problem/12867962>.

llvm-svn: 174042

11 years agoFixed a mistake in my previous commit where I changed the wording slightly and forgot...
Michael Gottesman [Thu, 31 Jan 2013 05:48:48 +0000 (05:48 +0000)]
Fixed a mistake in my previous commit where I changed the wording slightly and forgot to undo the change after changing my mind and deciding to only commit the style changes.

llvm-svn: 174041

11 years agoFormatting Fix. Changed " to `` around the word 'constant' in the Lang Ref
Michael Gottesman [Thu, 31 Jan 2013 05:44:04 +0000 (05:44 +0000)]
Formatting Fix. Changed " to `` around the word 'constant' in the Lang Ref
section Global Variable so that the style matches the other keywords in
said section.

llvm-svn: 174040

11 years agoImprove 'failed template argument deduction' diagnostic for the case where we
Richard Smith [Thu, 31 Jan 2013 05:19:49 +0000 (05:19 +0000)]
Improve 'failed template argument deduction' diagnostic for the case where we
have a direct mismatch between some component of the template and some
component of the argument. The diagnostic now says what the mismatch was, but
doesn't yet say which part of the template doesn't match.

llvm-svn: 174039

11 years agoWhen code completing in a statement, parenthesized expression, or
Douglas Gregor [Thu, 31 Jan 2013 05:03:46 +0000 (05:03 +0000)]
When code completing in a statement, parenthesized expression, or
Objective-C message receiver, the user is as likely to want to write a
type name as any other declaration, so give types the same priority as
other declarations. Fixes <rdar://problem/12480600>.

llvm-svn: 174038

11 years agoAllow the computation of the base priority for a declaration code completion result...
Douglas Gregor [Thu, 31 Jan 2013 04:52:16 +0000 (04:52 +0000)]
Allow the computation of the base priority for a declaration code completion result to consider the completion context

llvm-svn: 174037

11 years agoReplace "failed template argument deduction" diagnostic with something useful
Richard Smith [Thu, 31 Jan 2013 04:03:12 +0000 (04:03 +0000)]
Replace "failed template argument deduction" diagnostic with something useful
in the one case where we've already factored out a reason code.

llvm-svn: 174036

11 years agoRevert r174026, "Remove Attribute::hasAttributes() and make Attribute::hasAttribute...
NAKAMURA Takumi [Thu, 31 Jan 2013 03:47:28 +0000 (03:47 +0000)]
Revert r174026, "Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private."

It broke many hosts to crash.

llvm-svn: 174035

11 years agoRemove elements from Sema.UndefinedInternals as functions are defined. Also
Nick Lewycky [Thu, 31 Jan 2013 03:23:57 +0000 (03:23 +0000)]
Remove elements from Sema.UndefinedInternals as functions are defined. Also
filter the elements before emitting them into a PCH. No user-visible
functionality change, except that PCH files may be smaller?

llvm-svn: 174034

11 years agoFix grammar in comment.
Nick Lewycky [Thu, 31 Jan 2013 03:15:20 +0000 (03:15 +0000)]
Fix grammar in comment.

llvm-svn: 174033

11 years agoClarify the diagnostic for -Wnested-anon-types.
Richard Smith [Thu, 31 Jan 2013 03:11:12 +0000 (03:11 +0000)]
Clarify the diagnostic for -Wnested-anon-types.

llvm-svn: 174032

11 years ago[analyzer] If a lazy binding is undefined, pretend that it's unknown instead.
Jordan Rose [Thu, 31 Jan 2013 02:57:06 +0000 (02:57 +0000)]
[analyzer] If a lazy binding is undefined, pretend that it's unknown instead.

This is a hack to work around the fact that we don't track extents for our
default bindings:

  CGPoint p;
  p.x = 0.0;
  p.y = 0.0;
  rectParam.origin = p;
  use(rectParam.size); // warning: uninitialized value in rectParam.size.width

In this case, the default binding for 'p' gets copied into 'rectParam',
because the 'origin' field is at offset 0 within CGRect. From then on,
rectParam's old default binding (in this case a symbol) is lost.

This patch silences the warning by pretending that lazy bindings are never
made from uninitialized memory, but not only is that not true, the original
default binding is still getting overwritten (see FIXME test cases).
The long-term solution is tracked in <rdar://problem/12701038>

PR14765 and <rdar://problem/12875012>

llvm-svn: 174031

11 years agoChange stripAndComputeConstantOffsets to accept a NULL DataLayout pointer
Dan Gohman [Thu, 31 Jan 2013 02:50:36 +0000 (02:50 +0000)]
Change stripAndComputeConstantOffsets to accept a NULL DataLayout pointer
as well.

llvm-svn: 174030

11 years agoWhen comparing two template template arguments in the template differ, consider
Richard Trieu [Thu, 31 Jan 2013 02:47:46 +0000 (02:47 +0000)]
When comparing two template template arguments in the template differ, consider
them the same if they are actually the same; having the same name isn't enough.

Similar to r174013, template template arguments were also mistakenly considered
the same when they had the same name but were in different namespaces.
In addition, when printing template template arguments, use the qualified name
if the regular name is the same.

llvm-svn: 174029

11 years agoAdd a comment.
Dan Gohman [Thu, 31 Jan 2013 02:45:26 +0000 (02:45 +0000)]
Add a comment.

llvm-svn: 174028

11 years agoMove isKnownNonNull out of AliasAnalysis.h and into ValueTracking.cpp since
Dan Gohman [Thu, 31 Jan 2013 02:40:59 +0000 (02:40 +0000)]
Move isKnownNonNull out of AliasAnalysis.h and into ValueTracking.cpp since
it isn't really an AliasAnalysis concept, and ValueTracking has similar things
that it could plausibly share code with some day.

llvm-svn: 174027

11 years agoRemove Attribute::hasAttributes() and make Attribute::hasAttribute() private.
Bill Wendling [Thu, 31 Jan 2013 02:18:19 +0000 (02:18 +0000)]
Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private.

The Attribute::hasAttributes() is kind of meaningless since an Attribute can
have only one attribute. And we would rather people use the 'operator=='
instead of Attribute::hasAttribute().

llvm-svn: 174026

11 years agoFix -Wcovered-switch-default and -Wunused-private-field warnings.
Richard Smith [Thu, 31 Jan 2013 02:04:38 +0000 (02:04 +0000)]
Fix -Wcovered-switch-default and -Wunused-private-field warnings.

llvm-svn: 174025

11 years agoChange GetPointerBaseWithConstantOffset's DataLayout argument from a
Dan Gohman [Thu, 31 Jan 2013 02:00:45 +0000 (02:00 +0000)]
Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.

llvm-svn: 174024

11 years agoMake the AttrBuilder creation method of Attribute private so that people won't use it.
Bill Wendling [Thu, 31 Jan 2013 01:51:27 +0000 (01:51 +0000)]
Make the AttrBuilder creation method of Attribute private so that people won't use it.

llvm-svn: 174023

11 years agoAdd indents to AST dumping and removed parenthesis from AST nodes.
Richard Trieu [Thu, 31 Jan 2013 01:44:26 +0000 (01:44 +0000)]
Add indents to AST dumping and removed parenthesis from AST nodes.
Indents were given the color blue when outputting with color.
AST dumping now looks like this:

Node
|-Node
| `-Node
`-Node
  `-Node

Compared to the previous:

(Node
  (Node
    (Node))
  (Node
    (Node)))

llvm-svn: 174022

11 years agobuild: @ENABLE_THREADS@ => @LLVM_ENABLE_THREADS@
Saleem Abdulrasool [Thu, 31 Jan 2013 01:34:59 +0000 (01:34 +0000)]
build: @ENABLE_THREADS@ => @LLVM_ENABLE_THREADS@

Makefile.config does not have the value for ENABLE_THREADS substituted as the
variable is called LLVM_ENABLE_THREADS within configure.ac.  This was pointed
out by zygoloid over IRC.

llvm-svn: 174021

11 years agoFix ODR-use of a MemberExpr to check before marking a pure function used. Remove
Nick Lewycky [Thu, 31 Jan 2013 01:34:31 +0000 (01:34 +0000)]
Fix ODR-use of a MemberExpr to check before marking a pure function used. Remove
a workaround for this bug from the -Wundefined-internals warning.

llvm-svn: 174020

11 years ago[lit] Move unittest adaptor code into discovery module.
Daniel Dunbar [Thu, 31 Jan 2013 01:23:39 +0000 (01:23 +0000)]
[lit] Move unittest adaptor code into discovery module.
 - Also, add a test for it.

llvm-svn: 174019

11 years ago[lit] Run the ShUtil tests as part of the test suite.
Daniel Dunbar [Thu, 31 Jan 2013 01:23:26 +0000 (01:23 +0000)]
[lit] Run the ShUtil tests as part of the test suite.

llvm-svn: 174018

11 years ago[lit] Set parallel mode for coverage tests.
Daniel Dunbar [Thu, 31 Jan 2013 01:23:18 +0000 (01:23 +0000)]
[lit] Set parallel mode for coverage tests.

llvm-svn: 174017

11 years ago[analyzer] Fix a bug in region store that lead to undefined value false
Anna Zaks [Thu, 31 Jan 2013 01:19:52 +0000 (01:19 +0000)]
[analyzer] Fix a bug in region store that lead to undefined value false
positives.

The includeSuffix was only set on the first iteration through the
function, resulting in invalid regions being produced by getLazyBinding
(ex: zoomRegion.y).

llvm-svn: 174016

11 years agoSometimes ld is just ld.
Matt Beaumont-Gay [Thu, 31 Jan 2013 01:15:55 +0000 (01:15 +0000)]
Sometimes ld is just ld.

Don't expect a character between the double-quotes and 'ld'.

llvm-svn: 174015

11 years ago[lit] Move discovery code into its own module.
Daniel Dunbar [Thu, 31 Jan 2013 01:14:01 +0000 (01:14 +0000)]
[lit] Move discovery code into its own module.

llvm-svn: 174014

11 years agoWhen comparing two templates in the template differ, consider them the
Douglas Gregor [Thu, 31 Jan 2013 01:08:35 +0000 (01:08 +0000)]
When comparing two templates in the template differ, consider them the
same if they are actually the same; having the same name isn't
enough. Fixes <rdar://problem/12931988>.

llvm-svn: 174013

11 years agoRevert for now:
Bill Wendling [Thu, 31 Jan 2013 01:04:51 +0000 (01:04 +0000)]
Revert for now:

--- Reverse-merging r174010 into '.':
U    include/llvm/IR/Attributes.h
U    lib/IR/Verifier.cpp
U    lib/IR/Attributes.cpp

llvm-svn: 174012

11 years agoFilecheckized 2x tests in SimplifyCFG and removed their date prefix to fit with curre...
Michael Gottesman [Thu, 31 Jan 2013 01:04:23 +0000 (01:04 +0000)]
Filecheckized 2x tests in SimplifyCFG and removed their date prefix to fit with current llvm style for test names.

llvm-svn: 174011

11 years agoRemove the AttrBuilder version of the Attribute::get function.
Bill Wendling [Thu, 31 Jan 2013 00:53:21 +0000 (00:53 +0000)]
Remove the AttrBuilder version of the Attribute::get function.

The AttrBuilder is there to build up multiple attributes. The Attribute class
represents only one attribute at a time. So remove this unnecessary builder
creator method.

llvm-svn: 174010

11 years agoWhitespace.
Eric Christopher [Thu, 31 Jan 2013 00:50:48 +0000 (00:50 +0000)]
Whitespace.

llvm-svn: 174009

11 years agoCheck and allow floating point registers to select the size of the
Eric Christopher [Thu, 31 Jan 2013 00:50:46 +0000 (00:50 +0000)]
Check and allow floating point registers to select the size of the
register for inline asm. This conforms to how gcc allows for effective
casting of inputs into gprs (fprs is already handled).

llvm-svn: 174008

11 years agoLangRef: Add a Rationale for volatile rules.
Andrew Trick [Thu, 31 Jan 2013 00:49:39 +0000 (00:49 +0000)]
LangRef: Add a Rationale for volatile rules.

llvm-svn: 174007

11 years agoReplace some more greps with FileChecks in tests
Eli Bendersky [Thu, 31 Jan 2013 00:44:12 +0000 (00:44 +0000)]
Replace some more greps with FileChecks in tests

llvm-svn: 174006

11 years agoMinor code simplification.
Dan Gohman [Thu, 31 Jan 2013 00:32:11 +0000 (00:32 +0000)]
Minor code simplification.

llvm-svn: 174005

11 years agoMake sure that the Attribute object represents one attribute only.
Bill Wendling [Thu, 31 Jan 2013 00:30:05 +0000 (00:30 +0000)]
Make sure that the Attribute object represents one attribute only.

Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

llvm-svn: 174004

11 years agoMake sure that the Attribute object represents one attribute only.
Bill Wendling [Thu, 31 Jan 2013 00:29:54 +0000 (00:29 +0000)]
Make sure that the Attribute object represents one attribute only.

Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

llvm-svn: 174003

11 years ago[lit] Add a MANIFEST file and a script for sanity checking the source dist.
Daniel Dunbar [Thu, 31 Jan 2013 00:21:59 +0000 (00:21 +0000)]
[lit] Add a MANIFEST file and a script for sanity checking the source dist.

llvm-svn: 174002

11 years ago[lit] Add a basic discovery test.
Daniel Dunbar [Thu, 31 Jan 2013 00:21:51 +0000 (00:21 +0000)]
[lit] Add a basic discovery test.

llvm-svn: 174001

11 years ago[lit] Add a script for checking test coverage.
Daniel Dunbar [Thu, 31 Jan 2013 00:21:44 +0000 (00:21 +0000)]
[lit] Add a script for checking test coverage.

llvm-svn: 174000

11 years ago[lit] Add a test suite for lit itself.
Daniel Dunbar [Thu, 31 Jan 2013 00:21:39 +0000 (00:21 +0000)]
[lit] Add a test suite for lit itself.

llvm-svn: 173999

11 years agostripAndComputeConstantOffsets is only called on pointers; check this
Dan Gohman [Thu, 31 Jan 2013 00:12:20 +0000 (00:12 +0000)]
stripAndComputeConstantOffsets is only called on pointers; check this
with an assert instead of failing and requiring callers to check for failure.

llvm-svn: 173998

11 years agoRewrite this test properly with a FileCheck instead of greps
Eli Bendersky [Thu, 31 Jan 2013 00:11:52 +0000 (00:11 +0000)]
Rewrite this test properly with a FileCheck instead of greps

llvm-svn: 173997

11 years agoFix unused variable warnings in -asserts build
Matt Beaumont-Gay [Thu, 31 Jan 2013 00:08:03 +0000 (00:08 +0000)]
Fix unused variable warnings in -asserts build

llvm-svn: 173996

11 years agoFix ConstantFold's folding of icmp instructions to recognize that,
Dan Gohman [Thu, 31 Jan 2013 00:01:45 +0000 (00:01 +0000)]
Fix ConstantFold's folding of icmp instructions to recognize that,
for example, a one-past-the-end pointer from one global variable may
be equal to the base pointer of another global variable.

llvm-svn: 173995

11 years agoAdded a unit test for r173983 that verifies that Target.isiOS() works correctly.
Michael Gottesman [Wed, 30 Jan 2013 23:48:13 +0000 (23:48 +0000)]
Added a unit test for r173983 that verifies that Target.isiOS() works correctly.

As a bonus I put in some extra checks to make sure that we are identifying the
machine word of various Mac OS X/iOS targets appropriately.

llvm-svn: 173994

11 years agoPPC QPX requires a 32-byte aligned stack
Hal Finkel [Wed, 30 Jan 2013 23:43:27 +0000 (23:43 +0000)]
PPC QPX requires a 32-byte aligned stack

On systems which support the QPX vector instructions, the stack must be
32-byte aligned.

llvm-svn: 173993

11 years agoRemove addRetAttributes and addFnAttributes, which aren't useful abstractions.
Bill Wendling [Wed, 30 Jan 2013 23:40:31 +0000 (23:40 +0000)]
Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.

llvm-svn: 173992

11 years agoReinstate r173952, this time limiting it to exactly the form
Douglas Gregor [Wed, 30 Jan 2013 23:10:17 +0000 (23:10 +0000)]
Reinstate r173952, this time limiting it to exactly the form

  #define X X

for which there is no point warning, ever.

llvm-svn: 173991

11 years agoConvert typeIncompatible to return an AttributeSet.
Bill Wendling [Wed, 30 Jan 2013 23:07:40 +0000 (23:07 +0000)]
Convert typeIncompatible to return an AttributeSet.

There are still places which treat the Attribute object as a collection of
attributes. I'm systematically removing them.

llvm-svn: 173990

11 years agoexpressions + C++11 lambdas == cooooool!!!
Greg Clayton [Wed, 30 Jan 2013 22:57:34 +0000 (22:57 +0000)]
expressions + C++11 lambdas == cooooool!!!

C++11 lambdas that don't capture anything can be used as static callback functions!

Heavily modified this python module to be able to not require a dylib in order to traverse the heap allocations.

Re-implemented the ptr_refs, objc_refs, malloc_info and cstr_refs to use complex expressions that use lambdas to do all static callback function work.

llvm-svn: 173989

11 years agoForgot the test case before.
Evan Cheng [Wed, 30 Jan 2013 22:57:00 +0000 (22:57 +0000)]
Forgot the test case before.

llvm-svn: 173988

11 years agoRestrict sin/cos optimization to 64-bit only for now. 32-bit is a bit messy and less...
Evan Cheng [Wed, 30 Jan 2013 22:56:35 +0000 (22:56 +0000)]
Restrict sin/cos optimization to 64-bit only for now. 32-bit is a bit messy and less critical.

llvm-svn: 173987

11 years agoDoxygenified some comments in IRBuilder.h.
Michael Gottesman [Wed, 30 Jan 2013 22:56:31 +0000 (22:56 +0000)]
Doxygenified some comments in IRBuilder.h.

llvm-svn: 173986

11 years agoRemoved CreateFPExtOrFPTrunc for now until I have the time to get in my vector conver...
Michael Gottesman [Wed, 30 Jan 2013 22:53:21 +0000 (22:53 +0000)]
Removed CreateFPExtOrFPTrunc for now until I have the time to get in my vector convert patch.

What I thought was going to be a quick thing has extended out a little bit in
time *sigh*. So after some thought in order to not cruft up the tree I am
removing this for now since it is the right thing to do.

llvm-svn: 173985