platform/upstream/llvm.git
10 years agoObjectiveC migrator: some refactoring to reduce
Fariborz Jahanian [Thu, 22 Aug 2013 21:40:15 +0000 (21:40 +0000)]
ObjectiveC migrator: some refactoring to reduce
code size.

llvm-svn: 189070

10 years agoCheck for absence of the flag.
Bill Wendling [Thu, 22 Aug 2013 21:30:21 +0000 (21:30 +0000)]
Check for absence of the flag.

llvm-svn: 189069

10 years agoUpdate to remove the no-frame-pointer-elim-non-leaf flag if it was set to 'false'.
Bill Wendling [Thu, 22 Aug 2013 21:28:54 +0000 (21:28 +0000)]
Update to remove the no-frame-pointer-elim-non-leaf flag if it was set to 'false'.

llvm-svn: 189068

10 years agoRound plt entsize to addralign
Michael Sartain [Thu, 22 Aug 2013 21:25:53 +0000 (21:25 +0000)]
Round plt entsize to addralign

llvm-svn: 189066

10 years agoFix some tests. The 'false' version just omits the attribute altogether.
Bill Wendling [Thu, 22 Aug 2013 21:20:14 +0000 (21:20 +0000)]
Fix some tests. The 'false' version just omits the attribute altogether.

llvm-svn: 189065

10 years agoOnly add this attribute when it's set. If it's not there, the assumption is that...
Bill Wendling [Thu, 22 Aug 2013 21:16:51 +0000 (21:16 +0000)]
Only add this attribute when it's set. If it's not there, the assumption is that it's off.

llvm-svn: 189064

10 years agoCheck only if we have this attribute. If it's not an attribute, then it's assumed...
Bill Wendling [Thu, 22 Aug 2013 21:16:14 +0000 (21:16 +0000)]
Check only if we have this attribute. If it's not an attribute, then it's assumed false.

llvm-svn: 189063

10 years agoadd register name to UnwindLog error message
Michael Sartain [Thu, 22 Aug 2013 21:00:35 +0000 (21:00 +0000)]
add register name to UnwindLog error message

llvm-svn: 189062

10 years agoA clang::Type::Decayed type to kill compile warning
Michael Sartain [Thu, 22 Aug 2013 20:50:18 +0000 (20:50 +0000)]
A clang::Type::Decayed type to kill compile warning

llvm-svn: 189061

10 years agoFileCheckize some tests.
Bill Wendling [Thu, 22 Aug 2013 20:46:05 +0000 (20:46 +0000)]
FileCheckize some tests.

llvm-svn: 189060

10 years agoUpdate to consumed analysis.
DeLesley Hutchins [Thu, 22 Aug 2013 20:44:47 +0000 (20:44 +0000)]
Update to consumed analysis.

Patch by chris.wailes@gmail.com.  The following functionality was added:

* The same functionality is now supported for both CXXOperatorCallExprs and CXXMemberCallExprs.
* Factored out some code in StmtVisitor.
* Removed variables from the state map when their destructors are encountered.
* Started adding documentation for the consumed analysis attributes.

llvm-svn: 189059

10 years agoadd error checking and messages to 'target modules show-unwind' command
Michael Sartain [Thu, 22 Aug 2013 20:42:30 +0000 (20:42 +0000)]
add error checking and messages to 'target modules show-unwind' command

llvm-svn: 189058

10 years agoR600/SI: Fix another case of illegal VGPR to SGPR copy
Tom Stellard [Thu, 22 Aug 2013 20:21:02 +0000 (20:21 +0000)]
R600/SI: Fix another case of illegal VGPR to SGPR copy

This fixes a crash in Unigine Tropics.

https://bugs.freedesktop.org/show_bug.cgi?id=68389

llvm-svn: 189057

10 years agoDataFlowSanitizer: Add a design doc paragraph on checking ABI consistency.
Peter Collingbourne [Thu, 22 Aug 2013 20:08:20 +0000 (20:08 +0000)]
DataFlowSanitizer: Add a design doc paragraph on checking ABI consistency.

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

llvm-svn: 189055

10 years agoDataFlowSanitizer: Replace non-instrumented aliases of instrumented functions, and...
Peter Collingbourne [Thu, 22 Aug 2013 20:08:15 +0000 (20:08 +0000)]
DataFlowSanitizer: Replace non-instrumented aliases of instrumented functions, and vice versa, with wrappers.

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

llvm-svn: 189054

10 years agoDataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.
Peter Collingbourne [Thu, 22 Aug 2013 20:08:11 +0000 (20:08 +0000)]
DataFlowSanitizer: Factor the wrapper builder out to buildWrapperFunction.

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

llvm-svn: 189053

10 years agoDataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".
Peter Collingbourne [Thu, 22 Aug 2013 20:08:08 +0000 (20:08 +0000)]
DataFlowSanitizer: Prefix the name of each instrumented function with "dfs$".

DFSan changes the ABI of each function in the module.  This makes it possible
for a function with the native ABI to be called with the instrumented ABI,
or vice versa, thus possibly invoking undefined behavior.  A simple way
of statically detecting instances of this problem is to prepend the prefix
"dfs$" to the name of each instrumented-ABI function.

This will not catch every such problem; in particular function pointers passed
across the instrumented-native barrier cannot be used on the other side.
These problems could potentially be caught dynamically.

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

llvm-svn: 189052

10 years agoAdd a separate llvm.global_ctors entry for linkonce_odr data initializers
Reid Kleckner [Thu, 22 Aug 2013 20:07:45 +0000 (20:07 +0000)]
Add a separate llvm.global_ctors entry for linkonce_odr data initializers

Summary:
These typically come from static data members of class template
specializations.  This accomplishes two things:

1. May expose GlobalOpt optimizations for Itanium C++ ABI code.
2. Works toward fixing double initialization in the Microsoft C++ ABI.

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

llvm-svn: 189051

10 years agoclang-replace: Layout of test directory now more standard
Edwin Vane [Thu, 22 Aug 2013 19:44:07 +0000 (19:44 +0000)]
clang-replace: Layout of test directory now more standard

Test-time dependencies now live within test/clang-replace/Inputs which is more
in line with llvm and clang test suites.

Added 'Inputs' to the lit config's 'exclude' list as with llvm's lit.cfg since
test-time dependencies should not have any lit scripts within.

llvm-svn: 189047

10 years agoGlen: replace obsolete _LIBCPP_CANTTHROW with _NOEXCEPT.
Howard Hinnant [Thu, 22 Aug 2013 19:39:03 +0000 (19:39 +0000)]
Glen: replace obsolete _LIBCPP_CANTTHROW with _NOEXCEPT.

llvm-svn: 189046

10 years agoMark LWG issues #2083, 2099 and 2105 as complete. No functionality change.
Marshall Clow [Thu, 22 Aug 2013 18:53:17 +0000 (18:53 +0000)]
Mark LWG issues #2083, 2099 and 2105 as complete. No functionality change.

llvm-svn: 189044

10 years agoXFAIL a few tests on darwin12
Howard Hinnant [Thu, 22 Aug 2013 18:47:39 +0000 (18:47 +0000)]
XFAIL a few tests on darwin12

llvm-svn: 189043

10 years agoFileCheckify a grep test.
Reid Kleckner [Thu, 22 Aug 2013 18:45:40 +0000 (18:45 +0000)]
FileCheckify a grep test.

llvm-svn: 189042

10 years agoObjectiveC migrator: Provide ARC annotations for
Fariborz Jahanian [Thu, 22 Aug 2013 18:35:27 +0000 (18:35 +0000)]
ObjectiveC migrator: Provide ARC annotations for
CF methods too.

llvm-svn: 189041

10 years agoZhihao Yuan noted that there were a few unneeded statements. Eliminated the unneces...
Howard Hinnant [Thu, 22 Aug 2013 18:29:50 +0000 (18:29 +0000)]
Zhihao Yuan noted that there were a few unneeded  statements.  Eliminated the unnecessary ones, and commented the ones that are there for non-obvious reasons such as to help things limp along in C++03 language mode.

llvm-svn: 189039

10 years agoRevert "cpp11-migrate: Add a class to support include directives modifications"
Guillaume Papin [Thu, 22 Aug 2013 18:20:03 +0000 (18:20 +0000)]
Revert "cpp11-migrate: Add a class to support include directives modifications"

This reverts commit r189017.

It broke the windows bots:
- http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/4176
- http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/3837

llvm-svn: 189037

10 years agoZhihao Yuan noted that a move assignment operation was missing from std::adjacent_dif...
Howard Hinnant [Thu, 22 Aug 2013 18:02:34 +0000 (18:02 +0000)]
Zhihao Yuan noted that a move assignment operation was missing from std::adjacent_difference.  Fixed.

llvm-svn: 189036

10 years ago[lld][PECOFF] Fix one more reference to a temporary string
Shankar Easwaran [Thu, 22 Aug 2013 17:59:03 +0000 (17:59 +0000)]
[lld][PECOFF] Fix one more reference to a temporary string

llvm-svn: 189035

10 years agoDavid Blaikie suggested this test for detecting constexpr on the error_category defau...
Howard Hinnant [Thu, 22 Aug 2013 17:41:48 +0000 (17:41 +0000)]
David Blaikie suggested this test for detecting constexpr on the error_category default constructor.  Additionally I decided to make this constructor trivial as well, as I could not come up with a rationale for not doing so.  Fully tested with both current Apple clang and tip-of-trunk clang.

llvm-svn: 189034

10 years ago[Debug Info Tests] Update testing cases.
Manman Ren [Thu, 22 Aug 2013 17:11:18 +0000 (17:11 +0000)]
[Debug Info Tests] Update testing cases.

A single metadata will not span multiple lines. This also helps me with
my script to automatic update the testing cases.
A debug info testing case should have a llvm.dbg.cu.
Do not use hard-coded id for debug nodes.

llvm-svn: 189033

10 years agoRefactor VariantMatcher to use an interface underneath.
Samuel Benzaquen [Thu, 22 Aug 2013 16:38:33 +0000 (16:38 +0000)]
Refactor VariantMatcher to use an interface underneath.

Summary:
Refactor VariantMatcher to use an interface underneath.
It supports "Single" and "Polymorphic". Will support more in the future.

Reviewers: klimek

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

llvm-svn: 189032

10 years agoconfigure: Regenerate corresponding to r189026.
NAKAMURA Takumi [Thu, 22 Aug 2013 16:31:34 +0000 (16:31 +0000)]
configure: Regenerate corresponding to r189026.

llvm-svn: 189031

10 years agoRe-add clang-check to the Makefile build.
Jordan Rose [Thu, 22 Aug 2013 16:12:04 +0000 (16:12 +0000)]
Re-add clang-check to the Makefile build.

I was bound to screw this up somehow.

llvm-svn: 189029

10 years agoWork around unused variable warning in release builds.
Daniel Jasper [Thu, 22 Aug 2013 16:11:46 +0000 (16:11 +0000)]
Work around unused variable warning in release builds.

llvm-svn: 189028

10 years agoFix dependencies now that the ARC migrator depends on the static analyzer.
Jordan Rose [Thu, 22 Aug 2013 15:50:02 +0000 (15:50 +0000)]
Fix dependencies now that the ARC migrator depends on the static analyzer.

Thanks for pointing this out, Stephen. I think this is right now -- I
attempted to try all four valid combinations with both the autoconf and
CMake builds.

See also LLVM changes to the configure script.

llvm-svn: 189027

10 years agoAutoconf: The Clang ARC migrator now depends on the static analyzer.
Jordan Rose [Thu, 22 Aug 2013 15:49:53 +0000 (15:49 +0000)]
Autoconf: The Clang ARC migrator now depends on the static analyzer.

I don't actually have a version of autoconf so I edited configure directly
as well. It's copy-pasted so I think there was little margin for error.

See also Clang-side dependency graph changes.

llvm-svn: 189026

10 years ago[lld][PECOFF] Fix use of temporary strings
Shankar Easwaran [Thu, 22 Aug 2013 15:37:09 +0000 (15:37 +0000)]
[lld][PECOFF] Fix use of temporary strings

llvm-svn: 189025

10 years ago[ARMv8] Add CodeGen support for VSEL.
Joey Gouly [Thu, 22 Aug 2013 15:29:11 +0000 (15:29 +0000)]
[ARMv8] Add CodeGen support for VSEL.

This uses the ARMcmov pattern that Tim cleaned up in r188995.

Thanks to Simon Tatham for his floating point help!

llvm-svn: 189024

10 years ago[lld][unittests] Change assert to llvm_unreachable
Shankar Easwaran [Thu, 22 Aug 2013 15:23:54 +0000 (15:23 +0000)]
[lld][unittests] Change assert to llvm_unreachable

llvm-svn: 189023

10 years agoDebugInfo: emit the definition of types when construction vtables are required as...
David Blaikie [Thu, 22 Aug 2013 15:23:05 +0000 (15:23 +0000)]
DebugInfo: emit the definition of types when construction vtables are required as these types may never end up emitting the full class data

This might be able to be optimized further by only doing this in the
absence of a key function, but it doesn't look like GCC is doing that so
I'm not rushing to do it just yet.

llvm-svn: 189022

10 years ago[Win32] mapped_file_region: Fix a bug in CreateFileMapping() that Size must contain...
NAKAMURA Takumi [Thu, 22 Aug 2013 15:14:53 +0000 (15:14 +0000)]
[Win32] mapped_file_region: Fix a bug in CreateFileMapping() that Size must contain Offset when Offset >= 65536.

llvm-svn: 189021

10 years agoWhitespace.
NAKAMURA Takumi [Thu, 22 Aug 2013 15:14:45 +0000 (15:14 +0000)]
Whitespace.

llvm-svn: 189020

10 years agoclang-replace: Exclude test-time deps from LIT test suite
Edwin Vane [Thu, 22 Aug 2013 15:04:34 +0000 (15:04 +0000)]
clang-replace: Exclude test-time deps from LIT test suite

Subdirectories of test/clang-replace contain test-time dependencies and not
more LIT tests. Tell LIT to ignore these directories from the test suite.

llvm-svn: 189019

10 years agoclang-format: Add column layout formatting for braced lists
Daniel Jasper [Thu, 22 Aug 2013 15:00:41 +0000 (15:00 +0000)]
clang-format: Add column layout formatting for braced lists

With this patch, braced lists (with more than 3 elements are formatted in a
column layout if possible). E.g.:

  static const uint16_t CallerSavedRegs64Bit[] = {
    X86::RAX, X86::RDX, X86::RCX, X86::RSI, X86::RDI,
    X86::R8,  X86::R9,  X86::R10, X86::R11, 0
  };

Required other changes:
- FormatTokens can now have a special role that contains extra data and can do
  special formattings. A comma separated list is currently the only
  implementation.
- Move penalty calculation entirely into ContinuationIndenter (there was a last
  piece still in UnwrappedLineFormatter).

Review: http://llvm-reviews.chandlerc.com/D1457
llvm-svn: 189018

10 years agocpp11-migrate: Add a class to support include directives modifications
Guillaume Papin [Thu, 22 Aug 2013 14:49:07 +0000 (14:49 +0000)]
cpp11-migrate: Add a class to support include directives modifications

The IncludeDirectives class helps with detecting and modifying #include
directives. For now it allows the users to add angled-includes in a source file.
This is a start for this class that will evolve in the future to add more
functionality.

This should fix the reverted commit r188791 (buildbot failures on Windows).

llvm-svn: 189017

10 years ago[lsan] Add a regression test for building C code.
Sergey Matveev [Thu, 22 Aug 2013 14:48:44 +0000 (14:48 +0000)]
[lsan] Add a regression test for building C code.

llvm-svn: 189016

10 years ago[sanitizer] Fix build when scanf interceptors are enabled, and __isoc99_*scanf are...
Evgeniy Stepanov [Thu, 22 Aug 2013 13:59:15 +0000 (13:59 +0000)]
[sanitizer] Fix build when scanf interceptors are enabled, and __isoc99_*scanf are not.

Fixes PR16916.

llvm-svn: 189015

10 years agoclang-replace: Write merged changes to disk
Edwin Vane [Thu, 22 Aug 2013 13:40:32 +0000 (13:40 +0000)]
clang-replace: Write merged changes to disk

Functionality for clang-replace completed with the addition of the ability to
write merged replacements to disk.

Test added.

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

llvm-svn: 189014

10 years agoDebugInfo: Remove explicit declaration-emissiong handling now that we have a more...
David Blaikie [Thu, 22 Aug 2013 13:36:01 +0000 (13:36 +0000)]
DebugInfo: Remove explicit declaration-emissiong handling now that we have a more principled approach (the 'requires complete type' callback)

No functionality change intended.

llvm-svn: 189013

10 years ago[lsan] Add a stress test.
Sergey Matveev [Thu, 22 Aug 2013 13:32:10 +0000 (13:32 +0000)]
[lsan] Add a stress test.

llvm-svn: 189012

10 years ago[lsan] Follow-up to r189010 - do the same in Makefile build.
Sergey Matveev [Thu, 22 Aug 2013 13:30:01 +0000 (13:30 +0000)]
[lsan] Follow-up to r189010 - do the same in Makefile build.

llvm-svn: 189011

10 years ago[lsan] Build standalone LSan with -fno-rtti.
Sergey Matveev [Thu, 22 Aug 2013 13:23:22 +0000 (13:23 +0000)]
[lsan] Build standalone LSan with -fno-rtti.

Fix issue where C code could not be built with -fsanitize=leak.

llvm-svn: 189010

10 years agoFix ARM vcvt encoding when the number of fractional bits is zero.
Mihai Popa [Thu, 22 Aug 2013 13:16:07 +0000 (13:16 +0000)]
Fix ARM vcvt encoding when the number of fractional bits is zero.

The instruction to convert between floating point and fixed point representations
takes an immediate operand for the number of fractional bits of the fixed point
value. ARMARM specifies that when that number of bits is zero, the assembler
should encode floating point/integer conversion instructions.

This patch adds the necessary instruction aliases to achieve this behaviour.

llvm-svn: 189009

10 years agoIntroducing new tool clang-replace
Edwin Vane [Thu, 22 Aug 2013 13:07:14 +0000 (13:07 +0000)]
Introducing new tool clang-replace

Introducing new tool 'clang-replace' that finds files containing
serialized Replacements and applies those changes after deduplication
and detecting conflicts.

Currently the tool does not apply changes. It stops just after the
deduplication and conflict report phase. Forthcoming patches will
complete functionality.

Both build systems updated for new tool.

Includes a conflict test case.

clang-replace added to Doxygen build.

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

llvm-svn: 189008

10 years agoTeach the SLP vectorizer the correct way to check for consecutive access
Chandler Carruth [Thu, 22 Aug 2013 12:45:17 +0000 (12:45 +0000)]
Teach the SLP vectorizer the correct way to check for consecutive access
using GEPs. Previously, it used a number of different heuristics for
analyzing the GEPs. Several of these were conservatively correct, but
failed to fall back to SCEV even when SCEV might have given a reasonable
answer. One was simply incorrect in how it was formulated.

There was good code already to recursively evaluate the constant offsets
in GEPs, look through pointer casts, etc. I gathered this into a form
code like the SLP code can use in a previous commit, which allows all of
this code to become quite simple.

There is some performance (compile time) concern here at first glance as
we're directly attempting to walk both pointers constant GEP chains.
However, a couple of thoughts:

1) The very common cases where there is a dynamic pointer, and a second
   pointer at a constant offset (usually a stride) from it, this code
   will actually not do any unnecessary work.

2) InstCombine and other passes work very hard to collapse constant
   GEPs, so it will be rare that we iterate here for a long time.

That said, if there remain performance problems here, there are some
obvious things that can improve the situation immensely. Doing
a vectorizer-pass-wide memoizer for each individual layer of pointer
values, their base values, and the constant offset is likely to be able
to completely remove redundant work and strictly limit the scaling of
the work to scrape these GEPs. Since this optimization was not done on
the prior version (which would still benefit from it), I've not done it
here. But if folks have benchmarks that slow down it should be straight
forward for them to add.

I've added a test case, but I'm not really confident of the amount of
testing done for different access patterns, strides, and pointer
manipulation.

llvm-svn: 189007

10 years ago[ARM] Constrain some register classes in EmitAtomicBinary64 so that
Joey Gouly [Thu, 22 Aug 2013 12:19:24 +0000 (12:19 +0000)]
[ARM] Constrain some register classes in EmitAtomicBinary64 so that
we pass these tests with -verify-machineinstrs.

llvm-svn: 189006

10 years agoAVX-512: Added masked SHIFT commands, more encoding tests
Elena Demikhovsky [Thu, 22 Aug 2013 12:18:28 +0000 (12:18 +0000)]
AVX-512: Added masked SHIFT commands, more encoding tests

llvm-svn: 189005

10 years agoRevert "Implement a rudimentary form of generic lambdas."
Manuel Klimek [Thu, 22 Aug 2013 12:12:24 +0000 (12:12 +0000)]
Revert "Implement a rudimentary form of generic lambdas."

This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7.

llvm-svn: 189004

10 years agoRevert "Remove some unused variables identified by Juergen Ributzka *I need to turn...
Manuel Klimek [Thu, 22 Aug 2013 12:12:05 +0000 (12:12 +0000)]
Revert "Remove some unused variables identified by Juergen Ributzka *I need to turn on this warning in Visual C++ - sorry!*"

This reverts commit d01d0b63d87ac465f15ce1d6b56bf3faf4525769.

llvm-svn: 189003

10 years agoFix ARM FastISel PIC function call.
Logan Chien [Thu, 22 Aug 2013 12:08:04 +0000 (12:08 +0000)]
Fix ARM FastISel PIC function call.

The function call to external function should come with PLT relocation
type if the PIC relocation model is used.

llvm-svn: 189002

10 years agoSuppress MemoryBufferTest.cpp on win32 for now. Investigating.
NAKAMURA Takumi [Thu, 22 Aug 2013 12:00:44 +0000 (12:00 +0000)]
Suppress MemoryBufferTest.cpp on win32 for now. Investigating.

llvm-svn: 189001

10 years agoAdd a new helper method to Value to strip in-bounds constant offsets of
Chandler Carruth [Thu, 22 Aug 2013 11:25:11 +0000 (11:25 +0000)]
Add a new helper method to Value to strip in-bounds constant offsets of
pointers, but accumulate the offset into an APInt in the process of
stripping it.

This is a pretty handy thing to have, such as when trying to determine
if two pointers are at some constant relative offset. I'll be committing
a patch shortly to use it for exactly that purpose.

llvm-svn: 189000

10 years agoMemoryBufferTest.cpp: Tweak offset corresponding to the case that PageSize is greater...
NAKAMURA Takumi [Thu, 22 Aug 2013 10:23:58 +0000 (10:23 +0000)]
MemoryBufferTest.cpp: Tweak offset corresponding to the case that PageSize is greater than 8000.

PageSize, aka AllocationGranularity, is 65536 on Win32 (and Cygwin).

llvm-svn: 188999

10 years agoMemoryBuffer.cpp: Consider if PageSize were not 4096 in shouldUseMmap(). Follow-up...
NAKAMURA Takumi [Thu, 22 Aug 2013 10:23:52 +0000 (10:23 +0000)]
MemoryBuffer.cpp: Consider if PageSize were not 4096 in shouldUseMmap(). Follow-up to r188903.

The AllocationGranularity can be 65536 on Win32, even on Cygwin.

llvm-svn: 188998

10 years agoClean up the doxygen formatting of the comments on the strip* methods on
Chandler Carruth [Thu, 22 Aug 2013 10:12:18 +0000 (10:12 +0000)]
Clean up the doxygen formatting of the comments on the strip* methods on
Value. These methods probably don't belong here, and I'm discussing
moving the lot of them to a better home, but for now I'm about to extend
their functionality and wanted to tidy them up first.

llvm-svn: 188997

10 years agoTypo.
David Majnemer [Thu, 22 Aug 2013 10:04:41 +0000 (10:04 +0000)]
Typo.

llvm-svn: 188996

10 years agoARM: use TableGen patterns to select CMOV operations.
Tim Northover [Thu, 22 Aug 2013 09:57:11 +0000 (09:57 +0000)]
ARM: use TableGen patterns to select CMOV operations.

Back in the mists of time (2008), it seems TableGen couldn't handle the
patterns necessary to match ARM's CMOV node that we convert select operations
to, so we wrote a lot of fairly hairy C++ to do it for us.

TableGen can deal with it now: there were a few minor differences to CodeGen
(see tests), but nothing obviously worse that I could see, so we should
probably address anything that *does* come up in a localised manner.

llvm-svn: 188995

10 years agoconst'ify Sema::ActOnCXXTryBlock by
Robert Wilhelm [Thu, 22 Aug 2013 09:20:03 +0000 (09:20 +0000)]
const'ify Sema::ActOnCXXTryBlock by
changing Parameter from MutableArrayRef to
ArrayRef.
No functionality change intended.

llvm-svn: 188994

10 years agognu-flags.c test: relax the check a bit
Dmitri Gribenko [Thu, 22 Aug 2013 08:13:43 +0000 (08:13 +0000)]
gnu-flags.c test: relax the check a bit

This tests warning flags, so no need to test for specific alignment which is
platform-dependent.

llvm-svn: 188993

10 years agoAnalysis: Make %I in printf more reasonable, add more tests
David Majnemer [Thu, 22 Aug 2013 07:53:21 +0000 (07:53 +0000)]
Analysis: Make %I in printf more reasonable, add more tests

llvm-svn: 188992

10 years agoConstify more uses of ASTContext&. No functional change.
Craig Topper [Thu, 22 Aug 2013 07:09:37 +0000 (07:09 +0000)]
Constify more uses of ASTContext&. No functional change.

llvm-svn: 188991

10 years agoARM: respect tied 64-bit inlineasm operands when printing
Tim Northover [Thu, 22 Aug 2013 06:51:04 +0000 (06:51 +0000)]
ARM: respect tied 64-bit inlineasm operands when printing

The code for 'Q' and 'R' operand modifiers needs to look through tied
operands to discover the register class.

llvm-svn: 188990

10 years agoConstify some more ASTContext& uses.
Craig Topper [Thu, 22 Aug 2013 06:02:26 +0000 (06:02 +0000)]
Constify some more ASTContext& uses.

llvm-svn: 188989

10 years ago[lld][test] fix -Wreturn-type error
Shankar Easwaran [Thu, 22 Aug 2013 05:44:08 +0000 (05:44 +0000)]
[lld][test] fix -Wreturn-type error

llvm-svn: 188988

10 years ago[stackprotector] When finding the split point to splice off the end of a parentmbb...
Michael Gottesman [Thu, 22 Aug 2013 05:40:50 +0000 (05:40 +0000)]
[stackprotector] When finding the split point to splice off the end of a parentmbb into a successmbb, include any DBG_VALUE MI.

Fix for PR16954.

llvm-svn: 188987

10 years agoConstify the ASTContext& passed to Stmt creation functions. Also constify the context...
Craig Topper [Thu, 22 Aug 2013 05:28:54 +0000 (05:28 +0000)]
Constify the ASTContext& passed to Stmt creation functions. Also constify the context in couple other functions that are called from creation functions.

llvm-svn: 188986

10 years agoConstify the ASTContext& passed to Expr creation functions. Also constify the context...
Craig Topper [Thu, 22 Aug 2013 04:58:56 +0000 (04:58 +0000)]
Constify the ASTContext& passed to Expr creation functions. Also constify the context in couple other functions that are called from creation functions.

llvm-svn: 188985

10 years agoAdd test cases for avx512 feature flags. Fix typo in avx512pf options.
Craig Topper [Thu, 22 Aug 2013 04:32:55 +0000 (04:32 +0000)]
Add test cases for avx512 feature flags. Fix typo in avx512pf options.

llvm-svn: 188984

10 years agofix build failures on platforms that use -Wunused-private-variable for builds
Shankar Easwaran [Thu, 22 Aug 2013 04:24:57 +0000 (04:24 +0000)]
fix build failures on platforms that use -Wunused-private-variable for builds

llvm-svn: 188983

10 years ago[lld][Driver] Fix the unit test for lld gnu flavor
Shankar Easwaran [Thu, 22 Aug 2013 03:18:01 +0000 (03:18 +0000)]
[lld][Driver] Fix the unit test for lld gnu flavor

llvm-svn: 188982

10 years ago[lld][Hexagon] Enable Hexagon sdata sorting test
Shankar Easwaran [Thu, 22 Aug 2013 03:02:17 +0000 (03:02 +0000)]
[lld][Hexagon] Enable Hexagon sdata sorting test

llvm-svn: 188981

10 years agoTeach LoopVectorize about address space sizes
Matt Arsenault [Thu, 22 Aug 2013 02:42:55 +0000 (02:42 +0000)]
Teach LoopVectorize about address space sizes

llvm-svn: 188980

10 years agoRemove some unused variables identified by Juergen Ributzka *I need to turn on this...
Faisal Vali [Thu, 22 Aug 2013 02:13:38 +0000 (02:13 +0000)]
Remove some unused variables identified by Juergen Ributzka *I need to turn on this warning in Visual C++ - sorry!*

llvm-svn: 188979

10 years ago[lld] Fix unused private fields for fixing build failure on darwin
Shankar Easwaran [Thu, 22 Aug 2013 01:49:16 +0000 (01:49 +0000)]
[lld] Fix unused private fields for fixing build failure on darwin

llvm-svn: 188978

10 years agoImplement a rudimentary form of generic lambdas.
Faisal Vali [Thu, 22 Aug 2013 01:49:11 +0000 (01:49 +0000)]
Implement a rudimentary form of generic lambdas.

Specifically, the following features are not included in this commit:
  - any sort of capturing within generic lambdas
  - nested lambdas
  - conversion operator for captureless lambdas
  - ensuring all visitors are generic lambda aware

As an example of what compiles:

template <class F1, class F2>
struct overload : F1, F2 {
    using F1::operator();
    using F2::operator();
    overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
  };

  auto Recursive = [](auto Self, auto h, auto ... rest) {
    return 1 + Self(Self, rest...);
  };
  auto Base = [](auto Self, auto h) {
      return 1;
  };
  overload<decltype(Base), decltype(Recursive)> O(Base, Recursive);
  int num_params =  O(O, 5, 3, "abc", 3.14, 'a');

Please see attached tests for more examples.

Some implementation notes:

  - Add a new Declarator context => LambdaExprParameterContext to
    clang::Declarator to allow the use of 'auto' in declaring generic
    lambda parameters

  - Augment AutoType's constructor (similar to how variadic
    template-type-parameters ala TemplateTypeParmDecl are implemented) to
    accept an IsParameterPack to encode a generic lambda parameter pack.

  - Add various helpers to CXXRecordDecl to facilitate identifying
    and querying a closure class

  - LambdaScopeInfo (which maintains the current lambda's Sema state)
    was augmented to house the current depth of the template being
    parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth)
    so that Sema::ActOnLambdaAutoParameter may use it to create the
    appropriate list of corresponding TemplateTypeParmDecl for each
    auto parameter identified within the generic lambda (also stored
    within the current LambdaScopeInfo).  Additionally,
    a TemplateParameterList data-member was added to hold the invented
    TemplateParameterList AST node which will be much more useful
    once we teach TreeTransform how to transform generic lambdas.

  - SemaLambda.h was added to hold some common lambda utility
    functions (this file is likely to grow ...)

  - Teach Sema::ActOnStartOfFunctionDef to check whether it
    is being called to instantiate a generic lambda's call
    operator, and if so, push an appropriately prepared
    LambdaScopeInfo object on the stack.

  - Teach Sema::ActOnStartOfLambdaDefinition to set the
    return type of a lambda without a trailing return type
    to 'auto' in C++1y mode, and teach the return type
    deduction machinery in SemaStmt.cpp to process either
    C++11 and C++14 lambda's correctly depending on the flag.

  - various tests were added - but much more will be needed.

A greatful thanks to all reviewers including Eli Friedman,
James Dennett and the ever illuminating Richard Smith.  And
yet I am certain that I have allowed unidentified bugs to creep in;
bugs, that I will do my best to slay, once identified!

Thanks!

llvm-svn: 188977

10 years agoRemove llvm-lit from the cmake install target.
Hans Wennborg [Thu, 22 Aug 2013 01:34:09 +0000 (01:34 +0000)]
Remove llvm-lit from the cmake install target.

Since it's an llvm-internal tool, we shouldn't install it.

llvm-svn: 188976

10 years agoAdd a constexpr functionality test for static data member templates.
Larisse Voufo [Thu, 22 Aug 2013 01:05:27 +0000 (01:05 +0000)]
Add a constexpr functionality test for static data member templates.

llvm-svn: 188975

10 years agoRefactor for clarity and simplicity.
Larisse Voufo [Thu, 22 Aug 2013 00:59:14 +0000 (00:59 +0000)]
Refactor for clarity and simplicity.

llvm-svn: 188974

10 years agoRevert the change that was done to test commit access.
Virgile Bello [Thu, 22 Aug 2013 00:56:22 +0000 (00:56 +0000)]
Revert the change that was done to test commit access.

llvm-svn: 188973

10 years agoTest commit access.
Virgile Bello [Thu, 22 Aug 2013 00:54:36 +0000 (00:54 +0000)]
Test commit access.

llvm-svn: 188972

10 years agoFileCheck-ize tests.
Bill Wendling [Thu, 22 Aug 2013 00:51:19 +0000 (00:51 +0000)]
FileCheck-ize tests.

llvm-svn: 188971

10 years agoAdjust for r188968.
Eli Friedman [Thu, 22 Aug 2013 00:48:18 +0000 (00:48 +0000)]
Adjust for r188968.

llvm-svn: 188970

10 years agoImprove support for static data member templates. This revision still has at least...
Larisse Voufo [Thu, 22 Aug 2013 00:28:27 +0000 (00:28 +0000)]
Improve support for static data member templates. This revision still has at least one bug, as it does not respect the variable template specialization hierarchy well.

llvm-svn: 188969

10 years agoSplit isFromMainFile into two functions.
Eli Friedman [Thu, 22 Aug 2013 00:27:10 +0000 (00:27 +0000)]
Split isFromMainFile into two functions.

Basically, isInMainFile considers line markers, and isWrittenInMainFile
doesn't.  Distinguishing between the two is useful when dealing with
files which are preprocessed files or rewritten with -frewrite-includes
(so we don't, for example, print useless warnings).

llvm-svn: 188968

10 years agoARM: R9 is not safe to use for tcGPR.
Jim Grosbach [Thu, 22 Aug 2013 00:14:24 +0000 (00:14 +0000)]
ARM: R9 is not safe to use for tcGPR.

Indirect tail-calls shouldn't use R9 for the branch destination, as
it's not reliably a call-clobbered register.

rdar://14793425

llvm-svn: 188967

10 years agoremove trailing whitespace
Shankar Easwaran [Thu, 22 Aug 2013 00:08:25 +0000 (00:08 +0000)]
remove trailing whitespace

llvm-svn: 188965

10 years agoXFAIL 3 tests on darwin 11-12. The tests have recently been modified, are correct...
Howard Hinnant [Thu, 22 Aug 2013 00:04:22 +0000 (00:04 +0000)]
XFAIL 3 tests on darwin 11-12.  The tests have recently been modified, are correct, and pass with an updated libc++.dylib

llvm-svn: 188964

10 years ago[lld][Darwin] fixing an accidentally removed change
Shankar Easwaran [Wed, 21 Aug 2013 23:31:58 +0000 (23:31 +0000)]
[lld][Darwin] fixing an accidentally removed change

llvm-svn: 188963

10 years agoDebugInfo: Require only the declaration of types only used as parameter and return...
David Blaikie [Wed, 21 Aug 2013 23:23:07 +0000 (23:23 +0000)]
DebugInfo: Require only the declaration of types only used as parameter and return types

llvm-svn: 188962

10 years ago[lld] Fix win7 failure on adding InputGraph functionality
Shankar Easwaran [Wed, 21 Aug 2013 23:13:22 +0000 (23:13 +0000)]
[lld] Fix win7 failure on adding InputGraph functionality

llvm-svn: 188961