platform/upstream/llvm.git
11 years agoFix exception demo: Add mcjit to link component.
Logan Chien [Sun, 21 Jul 2013 03:46:55 +0000 (03:46 +0000)]
Fix exception demo: Add mcjit to link component.

Fix exception demo when we are building the examples with configure/make.
This commit updates the link components in the Makefile.

llvm-svn: 186785

11 years agoHoist the rest of the logic for promoting single-store allocas into the
Chandler Carruth [Sun, 21 Jul 2013 01:52:33 +0000 (01:52 +0000)]
Hoist the rest of the logic for promoting single-store allocas into the
helper function. This leaves both trivial cases handled entirely in
helper functions and merely manages the list of allocas to process in
the run method.

The next step will be to handle all of the trivial promotion work prior
to even creating the core class and the subsequent simplifications that
enables.

llvm-svn: 186784

11 years agoHoist the rest of the logic for fully promoting allocas with all uses in
Chandler Carruth [Sun, 21 Jul 2013 01:44:07 +0000 (01:44 +0000)]
Hoist the rest of the logic for fully promoting allocas with all uses in
a single block into the helper routine. This takes advantage of the fact
that we can directly replace uses prior to any store with undef to
simplify matters and unconditionally promote allocas only used within
one block.

I've removed the special handling for the case of no stores existing.
This has no semantic effect but might slow things down. I'll fix that in
a later patch when I refactor this entire thing to be easier to manage
the different cases.

llvm-svn: 186783

11 years agoRemove a method made dead by the prior refactoring.
Chandler Carruth [Sun, 21 Jul 2013 00:01:34 +0000 (00:01 +0000)]
Remove a method made dead by the prior refactoring.

llvm-svn: 186782

11 years agoHoist the two trivial promotion routines out of the big class that
Chandler Carruth [Sat, 20 Jul 2013 23:59:51 +0000 (23:59 +0000)]
Hoist the two trivial promotion routines out of the big class that
handles the general cases.

The hope is to refactor this so that we don't end up building the entire
class for the trivial cases. I also want to lift a lot of the early
pre-processing in the initial segment of run() into a separate routine,
and really none of it needs to happen inside the primary promotion
class.

These routines in particular used none of the actual state in the
promotion class, so they don't really make sense as members.

llvm-svn: 186781

11 years agoHoist the AllocaInfo struct to the top of the file.
Chandler Carruth [Sat, 20 Jul 2013 23:39:26 +0000 (23:39 +0000)]
Hoist the AllocaInfo struct to the top of the file.

This struct is nicely independent of everything else, and we already
needed a foward declaration here. It's simpler to just define it
immediately.

llvm-svn: 186780

11 years agoSink a typedef and comparator down to the function that actually uses them.
Chandler Carruth [Sat, 20 Jul 2013 23:36:19 +0000 (23:36 +0000)]
Sink a typedef and comparator down to the function that actually uses them.

llvm-svn: 186779

11 years agoDon't crash when llvm.compiler.used becomes empty.
Rafael Espindola [Sat, 20 Jul 2013 23:33:15 +0000 (23:33 +0000)]
Don't crash when llvm.compiler.used becomes empty.

GlobalOpt simplifies llvm.compiler.used by removing any members that are also
in the more strict llvm.used. Handle the special case where llvm.compiler.used
becomes empty.

llvm-svn: 186778

11 years agoDon't allocate the DIBuilder on the heap and remove all the complexity
Chandler Carruth [Sat, 20 Jul 2013 23:33:06 +0000 (23:33 +0000)]
Don't allocate the DIBuilder on the heap and remove all the complexity
that ensued from that.

llvm-svn: 186777

11 years agoRename constructor parameters to follow the common member-shadowing
Chandler Carruth [Sat, 20 Jul 2013 23:23:47 +0000 (23:23 +0000)]
Rename constructor parameters to follow the common member-shadowing
pattern and conform to the naming conventions.

llvm-svn: 186776

11 years agoReformat the implementation of mem2reg with clang-format so that my
Chandler Carruth [Sat, 20 Jul 2013 23:20:08 +0000 (23:20 +0000)]
Reformat the implementation of mem2reg with clang-format so that my
subsequent changes don't introduce inconsistencies.

llvm-svn: 186775

11 years agoComment: try to clarify loop iteration order.
Andrew Trick [Sat, 20 Jul 2013 23:10:31 +0000 (23:10 +0000)]
Comment: try to clarify loop iteration order.

llvm-svn: 186774

11 years agoRemove a DenseMapInfo specialization for std::pair -- we have one of
Chandler Carruth [Sat, 20 Jul 2013 23:09:05 +0000 (23:09 +0000)]
Remove a DenseMapInfo specialization for std::pair -- we have one of
those baked into DenseMap now.

llvm-svn: 186773

11 years agoUpdate mem2reg's comments to conform to the new doxygen standards. No
Chandler Carruth [Sat, 20 Jul 2013 22:20:05 +0000 (22:20 +0000)]
Update mem2reg's comments to conform to the new doxygen standards. No
functionality changed.

llvm-svn: 186772

11 years ago[PECOFF] Fix use-after-free.
Rui Ueyama [Sat, 20 Jul 2013 21:00:47 +0000 (21:00 +0000)]
[PECOFF] Fix use-after-free.

llvm-svn: 186771

11 years agoAdded preproc callback for pragma directives.
Enea Zaffanella [Sat, 20 Jul 2013 20:09:11 +0000 (20:09 +0000)]
Added preproc callback for pragma directives.

llvm-svn: 186770

11 years agoAdd missing check for creating an instance of an abstract class through an
Richard Smith [Sat, 20 Jul 2013 19:41:36 +0000 (19:41 +0000)]
Add missing check for creating an instance of an abstract class through an
implicit conversion sequence.

llvm-svn: 186769

11 years agoUndisable a test for a c++98-compat warning for inheriting constructors now that...
Richard Smith [Sat, 20 Jul 2013 19:22:08 +0000 (19:22 +0000)]
Undisable a test for a c++98-compat warning for inheriting constructors now that we implement them.

llvm-svn: 186768

11 years agoDisallow global aliases to bitcast between address spaces
Matt Arsenault [Sat, 20 Jul 2013 17:46:05 +0000 (17:46 +0000)]
Disallow global aliases to bitcast between address spaces

llvm-svn: 186767

11 years agoRemove trailing whitespace, fix file path in comment
Matt Arsenault [Sat, 20 Jul 2013 17:46:00 +0000 (17:46 +0000)]
Remove trailing whitespace, fix file path in comment

llvm-svn: 186766

11 years agoadd type attribute warn_unused, for -Wunused-variable warnings (pr#14253)
Lubos Lunak [Sat, 20 Jul 2013 15:05:36 +0000 (15:05 +0000)]
add type attribute warn_unused, for -Wunused-variable warnings (pr#14253)

The functionality is equivalent to the GCC attribute. Variables of tagged
types will be warned about as unused if they are not used in any way
except for possible (even non-trivial) ctors/dtors called. Useful for tagging
classes like std::string (which is not part of this commit).

llvm-svn: 186765

11 years agoavoid bogus warnings about "unknown" pragmas with -frewrite-includes (pr#14831)
Lubos Lunak [Sat, 20 Jul 2013 14:30:01 +0000 (14:30 +0000)]
avoid bogus warnings about "unknown" pragmas with -frewrite-includes (pr#14831)

llvm-svn: 186764

11 years agofix sometimes incorrect line numbers in -frewrite-includes mode (pr#14795)
Lubos Lunak [Sat, 20 Jul 2013 14:23:27 +0000 (14:23 +0000)]
fix sometimes incorrect line numbers in -frewrite-includes mode (pr#14795)

Every #include is surrounded by #if 0 in order to comment it out, which adds
lines. That is fixed up right after, but that all can be inside #if part
that is not processed, so fix up also after every end of a conditional part.

llvm-svn: 186763

11 years agoSilence GCC warning for using both enum and unsigned in a ternary expr.
Benjamin Kramer [Sat, 20 Jul 2013 12:06:17 +0000 (12:06 +0000)]
Silence GCC warning for using both enum and unsigned in a ternary expr.

llvm-svn: 186762

11 years agoSROA: Microoptimization: Remove dead entries first, then sort.
Benjamin Kramer [Sat, 20 Jul 2013 08:38:34 +0000 (08:38 +0000)]
SROA: Microoptimization: Remove dead entries first, then sort.

While there replace an explicit struct with std::mem_fun.

llvm-svn: 186761

11 years agoDiagnosticIDs: Forbid Diag ID from being valid
David Majnemer [Sat, 20 Jul 2013 07:15:15 +0000 (07:15 +0000)]
DiagnosticIDs: Forbid Diag ID from being valid

Diag ID is used throughout clang as a sentinel id meaning "this is an
invalid diagnostic id."  Confusingly, Diag ID maps to a valid, usable,
diagnostic id.  Instead, start diagnostic ids at ID one.

Incidently, remove an unused element from StaticDiagInfo.

llvm-svn: 186760

11 years agoInstCombine: call FoldOpIntoSelect for all floating binops, not just fmul
Stephen Lin [Sat, 20 Jul 2013 07:13:13 +0000 (07:13 +0000)]
InstCombine: call FoldOpIntoSelect for all floating binops, not just fmul

llvm-svn: 186759

11 years agoHave InlineCost check constant fcmps
Matt Arsenault [Sat, 20 Jul 2013 04:09:00 +0000 (04:09 +0000)]
Have InlineCost check constant fcmps

llvm-svn: 186758

11 years agoIf a default argument is a dependent type, get the real type from the desugared
Richard Trieu [Sat, 20 Jul 2013 03:49:02 +0000 (03:49 +0000)]
If a default argument is a dependent type, get the real type from the desugared
template.  Passing around dependent types can lead to integral arguments that
cannot be evaluated.

llvm-svn: 186757

11 years agoAdd Option unit tests to the make build
Hans Wennborg [Sat, 20 Jul 2013 03:04:36 +0000 (03:04 +0000)]
Add Option unit tests to the make build

Previously, they were only built and run in the CMake build.

llvm-svn: 186756

11 years ago[mach-o] factor out all cputype <-> arch conversions to one table driven location
Nick Kledzik [Sat, 20 Jul 2013 02:08:23 +0000 (02:08 +0000)]
[mach-o] factor out all cputype <-> arch conversions to one table driven location

llvm-svn: 186755

11 years agoFix bug in computing POD-for-layout.
Eli Friedman [Sat, 20 Jul 2013 01:06:31 +0000 (01:06 +0000)]
Fix bug in computing POD-for-layout.

A class with a field of non-POD-for-layout type is not POD-for-layout.
This computation should not depend on whether the field is of POD type
in the language sense.

Fixes PR16537.

Patch by Josh Magee.

llvm-svn: 186741

11 years agoUse -lines option instead of -offset/-length. This fixes problems with files using...
Alexander Kornienko [Sat, 20 Jul 2013 01:01:25 +0000 (01:01 +0000)]
Use -lines option instead of -offset/-length. This fixes problems with files using dos newlines (<CR><LF>).

llvm-svn: 186740

11 years ago[PECOFF][Driver] Add -base command line option.
Rui Ueyama [Sat, 20 Jul 2013 00:45:00 +0000 (00:45 +0000)]
[PECOFF][Driver] Add -base command line option.

llvm-svn: 186739

11 years agoMake IgnoreParens() look through ChooseExprs.
Eli Friedman [Sat, 20 Jul 2013 00:40:58 +0000 (00:40 +0000)]
Make IgnoreParens() look through ChooseExprs.

This is the same way GenericSelectionExpr works, and it's generally a
more consistent approach.

A large part of this patch is devoted to caching the value of the condition
of a ChooseExpr; it's needed to avoid threading an ASTContext into
IgnoreParens().

Fixes <rdar://problem/14438917>.

llvm-svn: 186738

11 years agoDebug Info Verifier: simplify DIxxx::Verify
Manman Ren [Sat, 20 Jul 2013 00:38:46 +0000 (00:38 +0000)]
Debug Info Verifier: simplify DIxxx::Verify

Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use
DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes
that should be a DIType and we will call Verify on those lists.

llvm-svn: 186737

11 years agoFix size_t -> uint warnings with MSVC 64-bit build
Matt Arsenault [Sat, 20 Jul 2013 00:20:10 +0000 (00:20 +0000)]
Fix size_t -> uint warnings with MSVC 64-bit build

llvm-svn: 186736

11 years agoRefactor AnalyzeBranch on ARM. The previous version did not always analyze
Lang Hames [Fri, 19 Jul 2013 23:52:47 +0000 (23:52 +0000)]
Refactor AnalyzeBranch on ARM. The previous version did not always analyze
indirect branches correctly. Under some circumstances, this led to the deletion
of basic blocks that were the destination of indirect branches. In that case it
left indirect branches to nowhere in the code.

This patch replaces, and is more general than either of the previous fixes for
indirect-branch-analysis issues, r181161 and r186461.

For other branches (not indirect) this refactor should have *almost* identical
behavior to the previous version. There are some corner cases where this
refactor is able to analyze blocks that the previous version could not (e.g.
this necessitated the update to thumb2-ifcvt2.ll).

<rdar://problem/14464830>

llvm-svn: 186735

11 years agoRetry submitting r186623: COFFDumper: Dump data directory entries.
Rui Ueyama [Fri, 19 Jul 2013 23:23:29 +0000 (23:23 +0000)]
Retry submitting r186623: COFFDumper: Dump data directory entries.

The original change was rolled back in r186627 because of test
failures on the big endian machine. I believe I fixed the issue
so re-submitting.

llvm-svn: 186734

11 years agofix an 80-col line.
Nadav Rotem [Fri, 19 Jul 2013 23:14:01 +0000 (23:14 +0000)]
fix an 80-col line.

llvm-svn: 186733

11 years agoUse LLVMs ADTs that improve the compile time of this pass.
Nadav Rotem [Fri, 19 Jul 2013 23:12:19 +0000 (23:12 +0000)]
Use LLVMs ADTs that improve the compile time of this pass.

llvm-svn: 186732

11 years agoSLPVectorizer: Improve the compile time of isConsecutive by reordering the conditions...
Nadav Rotem [Fri, 19 Jul 2013 23:11:15 +0000 (23:11 +0000)]
SLPVectorizer: Improve the compile time of isConsecutive by reordering the conditions that check GEPs and eliminate two of the calls to accumulateConstantOffset.

llvm-svn: 186731

11 years agoFIXME fix: improving diagnostics for template arguments deduction of class templates...
Larisse Voufo [Fri, 19 Jul 2013 23:00:19 +0000 (23:00 +0000)]
FIXME fix: improving diagnostics for template arguments deduction of class templates and explicit specializations
    This patch essentially removes all the FIXMEs following calls to DeduceTemplateArguments() that want to keep track of deduction failure info.

llvm-svn: 186730

11 years agoRevert "Use function overloading instead of template specialization for diagnosis...
Larisse Voufo [Fri, 19 Jul 2013 22:53:23 +0000 (22:53 +0000)]
Revert "Use function overloading instead of template specialization for diagnosis of bad template argument deductions."

This reverts commit a730f548325756d050d4caaa28fcbffdae8dfe95.

llvm-svn: 186729

11 years agoFix pack instantiation with function types.
Eli Friedman [Fri, 19 Jul 2013 22:50:29 +0000 (22:50 +0000)]
Fix pack instantiation with function types.

Make sure we correctly expand packs which expand to another
pack in a function type.

llvm-svn: 186728

11 years agoUse function overloading instead of template specialization for diagnosis of bad...
Larisse Voufo [Fri, 19 Jul 2013 22:34:32 +0000 (22:34 +0000)]
Use function overloading instead of template specialization for diagnosis of bad template argument deductions.

llvm-svn: 186727

11 years agoCorrectly handle packs for variadic type traits.
Eli Friedman [Fri, 19 Jul 2013 21:49:32 +0000 (21:49 +0000)]
Correctly handle packs for variadic type traits.

I'm not sure how to write a test for this; the following shows the
difference in -ast-dump:

template <int x> struct A {};
template <class T> struct B { };
template <class ...Args> using C = A<(__is_trivially_constructible(Args...))>;
template <class ...Args> using D = C<B<Args>...>;

However, I can't seem to write a test that triggers a visible difference
in behavior.

llvm-svn: 186726

11 years agoR600: Don't emit empty then clause and use alu_pop_after
Vincent Lejeune [Fri, 19 Jul 2013 21:45:15 +0000 (21:45 +0000)]
R600: Don't emit empty then clause and use alu_pop_after

llvm-svn: 186725

11 years agoR600: Simplify AMDILCFGStructurize by removing templates and assuming single exit
Vincent Lejeune [Fri, 19 Jul 2013 21:45:06 +0000 (21:45 +0000)]
R600: Simplify AMDILCFGStructurize by removing templates and assuming single exit

llvm-svn: 186724

11 years agoR600: Replace legacy debug code in AMDILCFGStructurizer.cpp
Vincent Lejeune [Fri, 19 Jul 2013 21:44:56 +0000 (21:44 +0000)]
R600: Replace legacy debug code in AMDILCFGStructurizer.cpp

llvm-svn: 186723

11 years agoRemove trailing whitespace
Craig Topper [Fri, 19 Jul 2013 21:43:59 +0000 (21:43 +0000)]
Remove trailing whitespace

llvm-svn: 186722

11 years agoFix inserting new elements in a specified location.
Rafael Espindola [Fri, 19 Jul 2013 21:23:28 +0000 (21:23 +0000)]
Fix inserting new elements in a specified location.

We were only handling the 'a' and 'b' options during moves before.

llvm-svn: 186721

11 years agoAdd a cl.exe compatible driver mode
Hans Wennborg [Fri, 19 Jul 2013 20:33:20 +0000 (20:33 +0000)]
Add a cl.exe compatible driver mode

The mode doesn't actually do anything yet, but this provides a
way to get into it.

llvm-svn: 186720

11 years agoUse an i686 triple for this test now that it uses stdcall
Reid Kleckner [Fri, 19 Jul 2013 20:32:18 +0000 (20:32 +0000)]
Use an i686 triple for this test now that it uses stdcall

There seems to be a crash here if we have a calling convention attribute
that gets ignored and then we instantiate templates.

llvm-svn: 186719

11 years agoFix another place where clang check objc selector name instead of checking the select...
Jean-Daniel Dupas [Fri, 19 Jul 2013 20:25:56 +0000 (20:25 +0000)]
Fix another place where clang check objc selector name instead of checking the selector family

Summary: In ARC mode, clang emits a warning if the result of an 'init' method is unused but miss cases where the method does not follows the Cocoa naming convention but is properly declared as an init family method.

CC: cfe-commits, eli.friedman
Differential Revision: http://llvm-reviews.chandlerc.com/D1163

llvm-svn: 186718

11 years agoReworked the test decorators to match the test results on the buildbots.
Ashok Thirumurthi [Fri, 19 Jul 2013 20:22:43 +0000 (20:22 +0000)]
Reworked the test decorators to match the test results on the buildbots.

llvm-svn: 186717

11 years agoObjectiveC migrator: Another use case of enum
Fariborz Jahanian [Fri, 19 Jul 2013 20:18:36 +0000 (20:18 +0000)]
ObjectiveC migrator: Another use case of enum
declaration which can be migrated to NS_ENUM.

llvm-svn: 186716

11 years agoAdd support for raw_ostream on the printing methods of Diagnostics.
Samuel Benzaquen [Fri, 19 Jul 2013 20:02:35 +0000 (20:02 +0000)]
Add support for raw_ostream on the printing methods of Diagnostics.

Summary:
Add printToStream*(llvm::raw_ostream&) methods to Diagnostics, and reimplement everything based on streams instead of concatenating strings.
Also, fix some functions to start with lowercase to match the style guide.

Reviewers: klimek

CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D1187

llvm-svn: 186715

11 years agoCreate calling convention AttributedType sugar nodes
Reid Kleckner [Fri, 19 Jul 2013 19:51:03 +0000 (19:51 +0000)]
Create calling convention AttributedType sugar nodes

Canonical types are unchanged.  The type printer had to be changed to
avoid printing any non-default implicit calling convention as well as
the calling convention attribute.

Reviewers: rjmccall

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

llvm-svn: 186714

11 years agoFix for template substitution with packs.
Eli Friedman [Fri, 19 Jul 2013 19:40:38 +0000 (19:40 +0000)]
Fix for template substitution with packs.

When we see a pack, and replace it with a template argument which is
also a pack, we want to use the pack pattern, not the expanded pack.
The caller should take care of expanding the pack afterwards.

Fixes PR16646.

llvm-svn: 186713

11 years agoAdd another link to the Python API docs.
Daniel Malea [Fri, 19 Jul 2013 19:15:45 +0000 (19:15 +0000)]
Add another link to the Python API docs.

llvm-svn: 186712

11 years agoUpdate users manual to indicate:
Richard Smith [Fri, 19 Jul 2013 19:06:48 +0000 (19:06 +0000)]
Update users manual to indicate:
  1) clang++ must be used when linking C++ programs using -fsanitize=undefined, and
  2) MSan can't be combined with TSan or ASan.

llvm-svn: 186711

11 years ago[mips] Add support for command-line options -mno-check-zero-division and
Akira Hatanaka [Fri, 19 Jul 2013 18:58:48 +0000 (18:58 +0000)]
[mips] Add support for command-line options -mno-check-zero-division and
-mcheck-zero-division.

llvm-svn: 186710

11 years ago[arcmt] After checking is successful disable auto-synthesize to avoid "@synthesize...
Argyrios Kyrtzidis [Fri, 19 Jul 2013 18:57:15 +0000 (18:57 +0000)]
[arcmt] After checking is successful disable auto-synthesize to avoid "@synthesize of 'weak' property is only
allowed in ARC" errors.

rdar://14461559

llvm-svn: 186709

11 years agoReplace some existing type attribute diagnostics with a
Aaron Ballman [Fri, 19 Jul 2013 18:53:44 +0000 (18:53 +0000)]
Replace some existing type attribute diagnostics with a
single diagnostic that selects.  No functional changes intended.

llvm-svn: 186708

11 years agoAdd SourceRange to PPCallbacks::Defined callback.
John Thompson [Fri, 19 Jul 2013 18:50:04 +0000 (18:50 +0000)]
Add SourceRange to PPCallbacks::Defined callback.

llvm-svn: 186707

11 years agoUpdated the test suite to fix xpasses on the gcc buildbot primarily due to r186347...
Ashok Thirumurthi [Fri, 19 Jul 2013 18:46:55 +0000 (18:46 +0000)]
Updated the test suite to fix xpasses on the gcc buildbot primarily due to r186347 (thanks Greg!).
Your mileage may vary depending on the gcc and stl versions in use (see llvm.org/pr15301).

llvm-svn: 186706

11 years agos/compiler_used/compiler.used/.
Rafael Espindola [Fri, 19 Jul 2013 18:44:51 +0000 (18:44 +0000)]
s/compiler_used/compiler.used/.

We were incorrectly using compiler_used instead of compiler.used. Unfortunately
the passes using the broken name had tests also using the broken name.

llvm-svn: 186705

11 years agoAdd some flag exclusion tests.
Reid Kleckner [Fri, 19 Jul 2013 18:05:13 +0000 (18:05 +0000)]
Add some flag exclusion tests.

llvm-svn: 186704

11 years ago[Option] Add inclusion and exclusion flags to option parsing
Reid Kleckner [Fri, 19 Jul 2013 18:04:57 +0000 (18:04 +0000)]
[Option] Add inclusion and exclusion flags to option parsing

Summary:
This allows the clang driver to put MSVC compatible options in the same
enumerator space as its normal options but exclude them from normal
option parsing.

Also changes the standard ParseArgs() method to consider unknown
arguments with a leading slash as being inputs rather than flags.

High level discussion for clang-cl is here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-June/030404.html

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1049

llvm-svn: 186703

11 years agoFix source range of implicitly instantiated friend declaration.
Enea Zaffanella [Fri, 19 Jul 2013 18:02:36 +0000 (18:02 +0000)]
Fix source range of implicitly instantiated friend declaration.

llvm-svn: 186702

11 years agoFix test to actually check things.
Benjamin Kramer [Fri, 19 Jul 2013 17:49:21 +0000 (17:49 +0000)]
Fix test to actually check things.

llvm-svn: 186701

11 years agoFixes an ObjC migrator crash when last decl
Fariborz Jahanian [Fri, 19 Jul 2013 17:44:32 +0000 (17:44 +0000)]
Fixes an ObjC migrator crash when last decl
in file is an enum.

llvm-svn: 186700

11 years agoAdd links to LLDB API reference docs
Daniel Malea [Fri, 19 Jul 2013 17:33:02 +0000 (17:33 +0000)]
Add links to LLDB API reference docs

llvm-svn: 186699

11 years agoMinor typeo fixes in doc scripts
Daniel Malea [Fri, 19 Jul 2013 17:32:48 +0000 (17:32 +0000)]
Minor typeo fixes in doc scripts

llvm-svn: 186698

11 years agoAdd LLDB API reference docs (for Python and C++)
Daniel Malea [Fri, 19 Jul 2013 17:28:54 +0000 (17:28 +0000)]
Add LLDB API reference docs (for Python and C++)

llvm-svn: 186697

11 years agoThis patch implements __get_cpuid_max() as an inline and __cpuid() and
Roman Divacky [Fri, 19 Jul 2013 17:28:36 +0000 (17:28 +0000)]
This patch implements __get_cpuid_max() as an inline and __cpuid() and
__cpuid_count() as macros to be compatible with GCC's cpuid.h.  It also adds
bit_<foo> constants for the various feature bits as described in version 039
(May 2011) of Intel's SDM Volume 2 in the description of the CPUID
instruction.  The list of bit_<foo> constants is a bit exhaustive (GCC
doesn't do near this many).  More bits could be added from a newer version of
SDM if desired.

Patch by John Baldwin!

llvm-svn: 186696

11 years agolit: Support cancellation on Windows
Nico Rieck [Fri, 19 Jul 2013 17:08:08 +0000 (17:08 +0000)]
lit: Support cancellation on Windows

The current machinery using KeyboardInterrupt for canceling doesn't work
with multiple threads on Windows as it just cancels the currently run tests
but the runners continue.

We install a handler for Ctrl-C which stops the provider from providing any
more tests to the runners. Together with aborting all currently running
tests, this brings lit to a halt.

llvm-svn: 186695

11 years ago[SystemZ] Add -march= command-line option
Richard Sandiford [Fri, 19 Jul 2013 16:51:51 +0000 (16:51 +0000)]
[SystemZ] Add -march= command-line option

llvm-svn: 186694

11 years agoinclude only LLDB API in docs generated by lldb-cpp-doc (cmake) target
Daniel Malea [Fri, 19 Jul 2013 16:50:24 +0000 (16:50 +0000)]
include only LLDB API in docs generated by lldb-cpp-doc (cmake) target

llvm-svn: 186693

11 years agoAdd a line that got missed off somehow. Sorry about that!
Joey Gouly [Fri, 19 Jul 2013 16:45:16 +0000 (16:45 +0000)]
Add a line that got missed off somehow. Sorry about that!

llvm-svn: 186692

11 years agoImplement generic upsample()
Aaron Watry [Fri, 19 Jul 2013 16:44:37 +0000 (16:44 +0000)]
Implement generic upsample()

Reduces all vector upsamples down to its scalar components, so probably
not the most efficient thing in the world, but it does what the
spec says it needs to do.

Another possible implementation would be to convert/cast everything as
unsigned if necessary, upsample the input vectors, create the upsampled
value, and then cast back to signed if required.

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
llvm-svn: 186691

11 years ago[SystemZ] Add tests for ALHSIK and ALGHSIK
Richard Sandiford [Fri, 19 Jul 2013 16:44:32 +0000 (16:44 +0000)]
[SystemZ] Add tests for ALHSIK and ALGHSIK

The insn definitions themselves crept into r186689, sorry.
This should be the last of the distinct-ops instructions.

llvm-svn: 186690

11 years ago[SystemZ] Add ALRK, AGLRK, SLRK and SGLRK
Richard Sandiford [Fri, 19 Jul 2013 16:37:00 +0000 (16:37 +0000)]
[SystemZ] Add ALRK, AGLRK, SLRK and SGLRK

Follows the same lines as r186686, but much more limited, since we only
use ADD LOGICAL for multi-i64 additions.

llvm-svn: 186689

11 years ago[ARMv8] Implement the NEON instructions VRINT{N, X, A, Z, M, P}.
Joey Gouly [Fri, 19 Jul 2013 16:34:16 +0000 (16:34 +0000)]
[ARMv8] Implement the NEON instructions VRINT{N, X, A, Z, M, P}.

llvm-svn: 186688

11 years ago[SystemZ] Add AHIK and AGHIK
Richard Sandiford [Fri, 19 Jul 2013 16:32:12 +0000 (16:32 +0000)]
[SystemZ] Add AHIK and AGHIK

I did these as a separate patch because it uses a slightly different
form of RIE layout.

llvm-svn: 186687

11 years ago[SystemZ] Add ARK, AGRK, SRK and SGRK
Richard Sandiford [Fri, 19 Jul 2013 16:26:39 +0000 (16:26 +0000)]
[SystemZ] Add ARK, AGRK, SRK and SGRK

The testsuite changes follow the same lines as for r186683.

llvm-svn: 186686

11 years ago[SystemZ] Add NGRK, OGRK and XGRK
Richard Sandiford [Fri, 19 Jul 2013 16:24:22 +0000 (16:24 +0000)]
[SystemZ] Add NGRK, OGRK and XGRK

Like r186683, but for 64 bits.

llvm-svn: 186685

11 years agoInitialize TempFileHandle.
Serge Pavlov [Fri, 19 Jul 2013 16:23:54 +0000 (16:23 +0000)]
Initialize TempFileHandle.

llvm-svn: 186684

11 years ago[SystemZ] Add NRK, ORK and XRK
Richard Sandiford [Fri, 19 Jul 2013 16:21:55 +0000 (16:21 +0000)]
[SystemZ] Add NRK, ORK and XRK

The atomic tests assume the two-operand forms, so I've restricted them to z10.

Running and-01.ll, or-01.ll and xor-01.ll for z196 as well as z10 shows why
using convertToThreeAddress() is better than exposing the three-operand forms
first and then converting back to two operands where possible (which is what
I'd originally tried).  Using the three-operand form first stops us from
taking advantage of NG, OG and XG for spills.

llvm-svn: 186683

11 years agoARM: Add instruction aliases for the Thumb2 PLD/PLDW (literal) alternate form.
Tilmann Scheller [Fri, 19 Jul 2013 16:18:56 +0000 (16:18 +0000)]
ARM: Add instruction aliases for the Thumb2 PLD/PLDW (literal) alternate form.

See A8.8.127 in ARM DDI 0406C.b.

Related to <rdar://problem/14403733>.

llvm-svn: 186682

11 years ago[SystemZ] Use SLLK, SRLK and SRAK for codegen
Richard Sandiford [Fri, 19 Jul 2013 16:12:08 +0000 (16:12 +0000)]
[SystemZ] Use SLLK, SRLK and SRAK for codegen

This patch uses the instructions added in r186680 for codegen.

llvm-svn: 186681

11 years ago[SystemZ] Start adding z196 and zEC12 support
Richard Sandiford [Fri, 19 Jul 2013 16:09:03 +0000 (16:09 +0000)]
[SystemZ] Start adding z196 and zEC12 support

This first step just adds definitions for SLLK, SRLK and SRAK.
The next patch will actually make use of them during codegen.

insn-bad.s tests that some form of error is reported when using these
instructions on z10.  More work is needed to get the "instruction requires:
distinct-ops" that we'd ideally like, so I've stubbed that part out for now.
I'll come back and make it mandatory once the necessary changes are in.

llvm-svn: 186680

11 years agoSplit openFileForWrite into windows and unix versions.
Rafael Espindola [Fri, 19 Jul 2013 15:02:03 +0000 (15:02 +0000)]
Split openFileForWrite into windows and unix versions.

It is similar to 186511, but for creating files for writing.

llvm-svn: 186679

11 years agoAdd a unit test for checking that we respect the F_Binary flag.
Rafael Espindola [Fri, 19 Jul 2013 14:41:25 +0000 (14:41 +0000)]
Add a unit test for checking that we respect the F_Binary flag.

llvm-svn: 186676

11 years agoFixed some formatting issues with clang-format to get a baseline.
John Thompson [Fri, 19 Jul 2013 14:19:31 +0000 (14:19 +0000)]
Fixed some formatting issues with clang-format to get a baseline.

llvm-svn: 186675

11 years ago[SystemZ] Enable frame-pointer elimination for -O1 and above
Richard Sandiford [Fri, 19 Jul 2013 14:06:49 +0000 (14:06 +0000)]
[SystemZ] Enable frame-pointer elimination for -O1 and above

Copies the x86 behavior.

llvm-svn: 186674

11 years agoRevert r186672 - turns out ASan supports Mac OS 10.6 yet.
Alexey Samsonov [Fri, 19 Jul 2013 12:53:04 +0000 (12:53 +0000)]
Revert r186672 - turns out ASan supports Mac OS 10.6 yet.

llvm-svn: 186673

11 years ago[ASan] Reflect the dropped Mac OS 10.6 support in docs
Alexey Samsonov [Fri, 19 Jul 2013 12:33:30 +0000 (12:33 +0000)]
[ASan] Reflect the dropped Mac OS 10.6 support in docs

llvm-svn: 186672

11 years agoAllow clang tools to display an overview when using the CommonOptionsParser.
Manuel Klimek [Fri, 19 Jul 2013 12:20:59 +0000 (12:20 +0000)]
Allow clang tools to display an overview when using the CommonOptionsParser.

Patch by Guillaume Papin.

llvm-svn: 186671