platform/upstream/llvm.git
11 years ago[PECOFF] /manifestuac option is case insensitive.
Rui Ueyama [Tue, 22 Oct 2013 17:56:55 +0000 (17:56 +0000)]
[PECOFF] /manifestuac option is case insensitive.

llvm-svn: 193173

11 years agoFix llvm-cov counts to be 64-bit integers to avoid overflows.
Bob Wilson [Tue, 22 Oct 2013 17:43:47 +0000 (17:43 +0000)]
Fix llvm-cov counts to be 64-bit integers to avoid overflows.

Line counts in llvm-cov are read in as 64-bit integers but were being truncated
to 32-bit in collectLineCounts(), which caused overflow for large counts.
This patch fixes all counts to be uint64_t.

Patch by Yuchen Wu!

llvm-svn: 193172

11 years ago[PECOFF] Fix /manifestuac handling.
Rui Ueyama [Tue, 22 Oct 2013 17:42:42 +0000 (17:42 +0000)]
[PECOFF] Fix /manifestuac handling.

uiAccess argument's type is not really boolean. It's string.

llvm-svn: 193171

11 years agoReenable 'break' in 'for' specifier to allow compilation of QT macro 'foreach'
Serge Pavlov [Tue, 22 Oct 2013 17:14:47 +0000 (17:14 +0000)]
Reenable 'break' in 'for' specifier to allow compilation of QT macro 'foreach'

This is a fix to PR17649, caused by fix in r193073. QT uses 'break' statement
to implement their 'foreach' macro. To enable build of QT, this fix reenables
break but only in 'for' statement specifier and only in the third expression.

llvm-svn: 193170

11 years agoMove local Db type out to namespace scope.
Howard Hinnant [Tue, 22 Oct 2013 16:45:48 +0000 (16:45 +0000)]
Move local Db type out to namespace scope.

llvm-svn: 193169

11 years agoclang-format: Fix ObjC literal indentation in Google style.
Daniel Jasper [Tue, 22 Oct 2013 15:45:58 +0000 (15:45 +0000)]
clang-format: Fix ObjC literal indentation in Google style.

Style guide demands a two-space indent.

Before:
  NSArray *arguments = @[
      kind == kUserTicket ? @"--user-store" : @"--system-store",
      @"--print-tickets",
      @"--productid",
      @"com.google.Chrome"
  ];

After:
  NSArray *arguments = @[
    kind == kUserTicket ? @"--user-store" : @"--system-store",
    @"--print-tickets",
    @"--productid",
    @"com.google.Chrome"
  ];

llvm-svn: 193168

11 years agoclang-format: Improve formatting of ObjC array literals.
Daniel Jasper [Tue, 22 Oct 2013 15:30:28 +0000 (15:30 +0000)]
clang-format: Improve formatting of ObjC array literals.

Before:
  NSArray *arguments =
      @[ kind == kUserTicket ? @"--user-store" : @"--system-store",
         @"--print-tickets", @"--productid", @"com.google.Chrome" ];
After:
  NSArray *arguments = @[
      kind == kUserTicket ? @"--user-store" : @"--system-store",
      @"--print-tickets",
      @"--productid",
      @"com.google.Chrome"
  ];

This fixes llvm.org/PR15231.

llvm-svn: 193167

11 years agoUse early return. No functionality change.
Rafael Espindola [Tue, 22 Oct 2013 15:18:22 +0000 (15:18 +0000)]
Use early return. No functionality change.

llvm-svn: 193166

11 years agoSpeling fixes.
Benjamin Kramer [Tue, 22 Oct 2013 15:18:03 +0000 (15:18 +0000)]
Speling fixes.

llvm-svn: 193165

11 years agoDrop the unneeded VBase field from MethodInfo in the VFTableBuilder class
Timur Iskhodzhanov [Tue, 22 Oct 2013 14:50:20 +0000 (14:50 +0000)]
Drop the unneeded VBase field from MethodInfo in the VFTableBuilder class

llvm-svn: 193164

11 years ago[msan] Drain allocator cache when leaving thread.
Evgeniy Stepanov [Tue, 22 Oct 2013 14:31:30 +0000 (14:31 +0000)]
[msan] Drain allocator cache when leaving thread.

llvm-svn: 193163

11 years agoRevert "This patch causes clang to reject alias attributes that point to undefined...
Rafael Espindola [Tue, 22 Oct 2013 14:23:09 +0000 (14:23 +0000)]
Revert "This patch causes clang to reject alias attributes that point to undefined names. For example, with this patch we now reject"

This reverts commit r193161.

It broke

void foo() __attribute__((alias("bar")));
void bar() {}
void zed() __attribute__((alias("foo")));

Looks like we have to fix pr17639 first :-(

llvm-svn: 193162

11 years agoThis patch causes clang to reject alias attributes that point to undefined
Rafael Espindola [Tue, 22 Oct 2013 13:51:06 +0000 (13:51 +0000)]
This patch causes clang to reject alias attributes that point to undefined
names. For example, with this patch we now reject

void f1(void) __attribute__((alias("g1")));

This patch is implemented in CodeGen. It is quiet a bit simpler and more
compatible with gcc than implementing it in Sema. The downside is that the
errors only fire during -emit-llvm.

llvm-svn: 193161

11 years agoFix the -Werror -Wpedantic clang selfhost build
Alp Toker [Tue, 22 Oct 2013 12:30:55 +0000 (12:30 +0000)]
Fix the -Werror -Wpedantic clang selfhost build

This is a stopgap fix for cast warnings introduced in r192864.

A proper fix should be investigated by the author when possible.

llvm-svn: 193160

11 years agoFixes to get LLDB building on Windows again.
Deepak Panickal [Tue, 22 Oct 2013 12:27:43 +0000 (12:27 +0000)]
Fixes to get LLDB building on Windows again.

llvm-svn: 193159

11 years ago[sanitizer] Intercept initgroups.
Evgeniy Stepanov [Tue, 22 Oct 2013 12:24:48 +0000 (12:24 +0000)]
[sanitizer] Intercept initgroups.

llvm-svn: 193158

11 years ago[mips][msa] Direct Object Emission support for conditional branches.
Matheus Almeida [Tue, 22 Oct 2013 09:43:32 +0000 (09:43 +0000)]
[mips][msa] Direct Object Emission support for conditional branches.

These branches have a 16-bit offset (R_MIPS_PC16).

List of conditional branch instructions:
bnz.{b,h,w,d}
bnz.v
bz.{b,h,w,d}
bz.v

llvm-svn: 193157

11 years agoAVX-512: aligned / unaligned load and store for 512-bit integer vectors.
Elena Demikhovsky [Tue, 22 Oct 2013 09:19:28 +0000 (09:19 +0000)]
AVX-512: aligned / unaligned load and store for 512-bit integer vectors.

llvm-svn: 193156

11 years agoFix typo in variable name
Alp Toker [Tue, 22 Oct 2013 09:11:45 +0000 (09:11 +0000)]
Fix typo in variable name

llvm-svn: 193155

11 years agoFix comment typo
Alp Toker [Tue, 22 Oct 2013 09:00:49 +0000 (09:00 +0000)]
Fix comment typo

llvm-svn: 193154

11 years agoRemove incorrect assert.
Manuel Klimek [Tue, 22 Oct 2013 08:27:19 +0000 (08:27 +0000)]
Remove incorrect assert.

If we run into the second preprocessor branch chain, the first branch
chain might have already set the maximum branch count on that level to
something > 0.

Fixes PR17645.

llvm-svn: 193153

11 years agoAdd testcase for PR3168. It was fixed over time.
Bill Wendling [Tue, 22 Oct 2013 08:23:03 +0000 (08:23 +0000)]
Add testcase for PR3168. It was fixed over time.
PR3168

llvm-svn: 193152

11 years agoAllow a header to be part of multiple modules.
Daniel Jasper [Tue, 22 Oct 2013 08:09:47 +0000 (08:09 +0000)]
Allow a header to be part of multiple modules.

This patch changes two things:

a) Allow a header to be part of multiple modules. The reasoning is that
in existing codebases that have a module-like build system, the same
headers might be used in several build targets. Simple reasons might be
that they defined different classes that are declared in the same
header. Supporting a header as a part of multiple modules will make the
transistion easier for those cases. A later step in clang can then
determine whether the two modules are actually compatible and can be
merged and error out appropriately. The later check is similar to what
needs to be done for template specializations anyway.

b) Allow modules to be stored in a directory tree separate from the
headers they describe.

Review: http://llvm-reviews.chandlerc.com/D1951
llvm-svn: 193151

11 years agoUsing FoldingSet in SelectionDAG::getVTList.
Wan Xiaofei [Tue, 22 Oct 2013 08:02:02 +0000 (08:02 +0000)]
Using FoldingSet in SelectionDAG::getVTList.

VTList has a long life cycle through the module and getVTList is frequently called. In current getVTList, sequential search over a std::vector is used, this is inefficient in big module.
This patch use FoldingSet to implement hashing mechanism when searching.

Reviewer: Nadav Rotem
Test    : Pass unit tests & LNT test suite

llvm-svn: 193150

11 years agollvm-c: Add LLVMPrintTypeToString
Anders Waldenborg [Tue, 22 Oct 2013 06:58:34 +0000 (06:58 +0000)]
llvm-c: Add LLVMPrintTypeToString

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

llvm-svn: 193149

11 years agoChange llvm-cov output formatting to be more similar to gcov.
Bob Wilson [Tue, 22 Oct 2013 05:09:41 +0000 (05:09 +0000)]
Change llvm-cov output formatting to be more similar to gcov.

- Replaced tabs with proper padding
- print() takes two arguments, which are the GCNO and GCDA filenames
- Files are listed at the top of output, appended by line 0
- Stripped strings of trailing \0s
- Removed last two lines of whitespace in output

Patch by Yuchen Wu!

llvm-svn: 193148

11 years agoClarify SCEV comments.
Andrew Trick [Tue, 22 Oct 2013 05:09:40 +0000 (05:09 +0000)]
Clarify SCEV comments.

We handle for(i=n; i>0; i -= s) by canonicalizing within SCEV to for(i=-n; i<0; i += s).

llvm-svn: 193147

11 years agoReplace (V)MOVZDI2PDIrr/rm instructions with patterns that select (V)MOVDI2PDIrr/rm.
Craig Topper [Tue, 22 Oct 2013 04:35:20 +0000 (04:35 +0000)]
Replace (V)MOVZDI2PDIrr/rm instructions with patterns that select (V)MOVDI2PDIrr/rm.

llvm-svn: 193146

11 years ago[PECOFF] Add /manifestuac command line option.
Rui Ueyama [Tue, 22 Oct 2013 04:21:29 +0000 (04:21 +0000)]
[PECOFF] Add /manifestuac command line option.

This option is used for the manifest file too.

llvm-svn: 193145

11 years agoSema: Do not allow template declarations inside local classes
David Majnemer [Tue, 22 Oct 2013 04:14:18 +0000 (04:14 +0000)]
Sema: Do not allow template declarations inside local classes

Summary:
Enforce the rule in C++11 [temp.mem]p2 that local classes cannot have
member templates.

This fixes PR16947.

N.B.  C++14 has slightly different wording to afford generic lambdas
declared inside of functions.

Fun fact:  Some formulations of local classes with member templates
would cause clang to crash during Itanium mangling, such as the
following:

void outer_mem() {
  struct Inner {
    template <typename = void>
    struct InnerTemplateClass {
      static void itc_mem() {}
    };
  };
  Inner::InnerTemplateClass<>::itc_mem();
}

Reviewers: eli.friedman, rsmith, doug.gregor, faisalv

Reviewed By: doug.gregor

CC: cfe-commits, ygao
Differential Revision: http://llvm-reviews.chandlerc.com/D1866

llvm-svn: 193144

11 years ago[PECOFF] Better error handling for /manifest.
Rui Ueyama [Tue, 22 Oct 2013 04:10:06 +0000 (04:10 +0000)]
[PECOFF] Better error handling for /manifest.

llvm-svn: 193143

11 years ago[PECOFF] Return false on error. No functionality change.
Rui Ueyama [Tue, 22 Oct 2013 03:50:58 +0000 (03:50 +0000)]
[PECOFF] Return false on error. No functionality change.

llvm-svn: 193142

11 years ago[PECOFF] Parse /manifest command line option.
Rui Ueyama [Tue, 22 Oct 2013 03:49:35 +0000 (03:49 +0000)]
[PECOFF] Parse /manifest command line option.

The manifest file is an XML file that conveys some information to the loader,
such as whether the executable needs to run as Administrator or not. This patch
is to parse command line option for manifest file.

Actual XML file generation will be done in a separate patch.

llvm-svn: 193141

11 years agoUpdate ResolveFunctionPointers to build after the changes
Jason Molenda [Tue, 22 Oct 2013 03:11:55 +0000 (03:11 +0000)]
Update ResolveFunctionPointers to build after the changes
of llvm r193091.  Thanks to Ed Maste for narrowing it down.

llvm-svn: 193140

11 years agoARM: Thumb2 copy for GPRPair needs to use thumb instructions.
Jim Grosbach [Tue, 22 Oct 2013 02:29:37 +0000 (02:29 +0000)]
ARM: Thumb2 copy for GPRPair needs to use thumb instructions.

Use tMOVr instead of plain MOVr.

rdar://15193017

llvm-svn: 193139

11 years agoARM: Clean up copyPhysReg() a bit.
Jim Grosbach [Tue, 22 Oct 2013 02:29:35 +0000 (02:29 +0000)]
ARM: Clean up copyPhysReg() a bit.

No functional change, just cleaning things up for readability.

llvm-svn: 193138

11 years agoTBAA: fix PR17620.
Manman Ren [Tue, 22 Oct 2013 01:40:25 +0000 (01:40 +0000)]
TBAA: fix PR17620.

We can have a struct type with a single field and the field does not start
with 0. In that case, we should correctly update the offset.

llvm-svn: 193137

11 years agoFix for a mistake spotted by Enrico with the SBThread::queue_id accessor.
Jason Molenda [Tue, 22 Oct 2013 01:37:18 +0000 (01:37 +0000)]
Fix for a mistake spotted by Enrico with the SBThread::queue_id accessor.

llvm-svn: 193136

11 years agoFormatting/whitespace.
Eric Christopher [Tue, 22 Oct 2013 00:22:39 +0000 (00:22 +0000)]
Formatting/whitespace.

llvm-svn: 193135

11 years agoMove the printing of llvm-cov information out from collectLineCounts().
Bob Wilson [Tue, 22 Oct 2013 00:09:03 +0000 (00:09 +0000)]
Move the printing of llvm-cov information out from collectLineCounts().

collectLineCounts() should only organize the output data. This is done in
anticipation of subsequent changes which will pass in GCNO and GCDA filenames
into the print function where it is printed similar to the gcov output.

Patch by Yuchen Wu!

llvm-svn: 193134

11 years agofix two typos.
Adrian Prantl [Mon, 21 Oct 2013 23:55:19 +0000 (23:55 +0000)]
fix two typos.

llvm-svn: 193133

11 years agoExpose the Thread::GetQueueID() method through the SBThread API, similar to
Jason Molenda [Mon, 21 Oct 2013 23:52:54 +0000 (23:52 +0000)]
Expose the Thread::GetQueueID() method through the SBThread API, similar to
the existing SBThread::GetQueueName() method.

llvm-svn: 193132

11 years agoFIXME comment shouldn't have been doxygen style
Andrew Kaylor [Mon, 21 Oct 2013 23:27:02 +0000 (23:27 +0000)]
FIXME comment shouldn't have been doxygen style

llvm-svn: 193131

11 years agoFix spelling, grammar, and match naming convention for test files.
Eric Christopher [Mon, 21 Oct 2013 23:14:06 +0000 (23:14 +0000)]
Fix spelling, grammar, and match naming convention for test files.

llvm-svn: 193130

11 years agoDWARF Type Hashing: Include reference and rvalue reference type in the declarable...
David Blaikie [Mon, 21 Oct 2013 23:06:19 +0000 (23:06 +0000)]
DWARF Type Hashing: Include reference and rvalue reference type in the declarable summary hashing path

More support for 7.25 Part 5.

llvm-svn: 193129

11 years agoRevert "Re-enable passing MS inline asm test."
Reid Kleckner [Mon, 21 Oct 2013 22:56:09 +0000 (22:56 +0000)]
Revert "Re-enable passing MS inline asm test."

Microsoft inline asm crashes on the hexagon bot for unknown reasons.

This reverts commit r193124.

llvm-svn: 193128

11 years agoRevert "Initialize some members where they are declared."
Rui Ueyama [Mon, 21 Oct 2013 22:37:14 +0000 (22:37 +0000)]
Revert "Initialize some members where they are declared."

Because MSVC11 doesn't like this new C++11 feature. The last commit
broke the buildbot.

llvm-svn: 193127

11 years agoDWARF type hashing: begin implementing Step 5, summary hashing in declarable contexts
David Blaikie [Mon, 21 Oct 2013 22:36:50 +0000 (22:36 +0000)]
DWARF type hashing: begin implementing Step 5, summary hashing in declarable contexts

There are several other tag types that need similar handling but to
ensure test coverage they'll be coming incrementally.

llvm-svn: 193126

11 years agoRemoving unnecessary link component for MCJIT unittests
Andrew Kaylor [Mon, 21 Oct 2013 22:35:06 +0000 (22:35 +0000)]
Removing unnecessary link component for MCJIT unittests

llvm-svn: 193125

11 years agoRe-enable passing MS inline asm test.
Reid Kleckner [Mon, 21 Oct 2013 22:30:53 +0000 (22:30 +0000)]
Re-enable passing MS inline asm test.

llvm-svn: 193124

11 years agoRevert "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."
Reid Kleckner [Mon, 21 Oct 2013 22:26:36 +0000 (22:26 +0000)]
Revert "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."

This reverts commit r193100.

It was failing to compile with MSVC 2012 while instantiating
llvm::Optional<DynTypedMatcher>.

llvm-svn: 193123

11 years agoInitialize some members where they are declared. No functionality change.
Rui Ueyama [Mon, 21 Oct 2013 22:25:02 +0000 (22:25 +0000)]
Initialize some members where they are declared. No functionality change.

llvm-svn: 193122

11 years agoDisable layout-transitivity test on Darwin for now.
Rui Ueyama [Mon, 21 Oct 2013 22:19:27 +0000 (22:19 +0000)]
Disable layout-transitivity test on Darwin for now.

llvm-svn: 193121

11 years agoUpdated and added to the Consumed documentation.
Chris Wailes [Mon, 21 Oct 2013 20:54:06 +0000 (20:54 +0000)]
Updated and added to the Consumed documentation.

llvm-svn: 193120

11 years agoDIEHashTest: Correct the order of operands to the TEST macro
David Blaikie [Mon, 21 Oct 2013 20:28:30 +0000 (20:28 +0000)]
DIEHashTest: Correct the order of operands to the TEST macro

And add the 'Test' suffix so the test case name matches the file name.

llvm-svn: 193119

11 years ago[AArch64] Add the constraint to NEON scalar mla/mls instructions.
Chad Rosier [Mon, 21 Oct 2013 20:12:01 +0000 (20:12 +0000)]
[AArch64] Add the constraint to NEON scalar mla/mls instructions.

llvm-svn: 193118

11 years ago[AArch64] Add the constraint to NEON scalar mla/mls instructions.
Chad Rosier [Mon, 21 Oct 2013 20:11:47 +0000 (20:11 +0000)]
[AArch64] Add the constraint to NEON scalar mla/mls instructions.

llvm-svn: 193117

11 years agoFix string assignment, David Blaikie suggestion.
Yaron Keren [Mon, 21 Oct 2013 20:07:37 +0000 (20:07 +0000)]
Fix string assignment, David Blaikie suggestion.

llvm-svn: 193116

11 years agoSimplifyCFG: Don't duplicate calls to functions marked noduplicate v2
Tom Stellard [Mon, 21 Oct 2013 20:07:30 +0000 (20:07 +0000)]
SimplifyCFG: Don't duplicate calls to functions marked noduplicate v2

v2:
  - Use CI->cannotDuplicate()

llvm-svn: 193115

11 years agoFixed breakpoints to be able to be set on eSymbolTypeReExported symbols and resolve...
Greg Clayton [Mon, 21 Oct 2013 20:04:47 +0000 (20:04 +0000)]
Fixed breakpoints to be able to be set on eSymbolTypeReExported symbols and resolve to the correct function. This allows setting a breakpoint on "memset" for iOS simulator binaries and the correct breakpoint will be set on "__platform_memset".

llvm-svn: 193114

11 years agoRemove unused TargetLowering field.
Matt Arsenault [Mon, 21 Oct 2013 20:04:01 +0000 (20:04 +0000)]
Remove unused TargetLowering field.

llvm-svn: 193113

11 years agoFix CodeGen for vectors of pointers with address spaces.
Matt Arsenault [Mon, 21 Oct 2013 20:03:58 +0000 (20:03 +0000)]
Fix CodeGen for vectors of pointers with address spaces.

llvm-svn: 193112

11 years agoFix CodeGen for different size address space GEPs
Matt Arsenault [Mon, 21 Oct 2013 20:03:54 +0000 (20:03 +0000)]
Fix CodeGen for different size address space GEPs

llvm-svn: 193111

11 years agoMake this test pass -verify.
Rafael Espindola [Mon, 21 Oct 2013 19:48:28 +0000 (19:48 +0000)]
Make this test pass -verify.

Instead of using not, just drop the fastcall attribute which was causing
an warning:

calling convention 'fastcall' ignored for this target

llvm-svn: 193110

11 years agoUse more type helper functions
Matt Arsenault [Mon, 21 Oct 2013 19:43:56 +0000 (19:43 +0000)]
Use more type helper functions

llvm-svn: 193109

11 years ago[lsan] When detect_leaks=false, be completely silent.
Sergey Matveev [Mon, 21 Oct 2013 19:35:00 +0000 (19:35 +0000)]
[lsan] When detect_leaks=false, be completely silent.

In particular, don't make a fuss if we're passed a malformed suppressions file,
or if we have trouble identifying ld.so. Also, make LSan interface functions
no-ops in this case.

llvm-svn: 193108

11 years agoReuse variable
Matt Arsenault [Mon, 21 Oct 2013 19:24:15 +0000 (19:24 +0000)]
Reuse variable

llvm-svn: 193107

11 years agoFix the build in DIE.cpp with MSVC 2010
Reid Kleckner [Mon, 21 Oct 2013 19:18:31 +0000 (19:18 +0000)]
Fix the build in DIE.cpp with MSVC 2010

llvm-svn: 193106

11 years agoDWARF type hashing: Handle multiple (including recursive) references to the same...
David Blaikie [Mon, 21 Oct 2013 18:59:40 +0000 (18:59 +0000)]
DWARF type hashing: Handle multiple (including recursive) references to the same type

This uses a map, keeping the type DIE numbering separate from the DIEs
themselves - alternatively we could do things the way GCC does if we
want to add an integer to the DIE type to record the numbering there.

llvm-svn: 193105

11 years agoTeach SimplifyCFG about address spaces
Matt Arsenault [Mon, 21 Oct 2013 18:55:08 +0000 (18:55 +0000)]
Teach SimplifyCFG about address spaces

llvm-svn: 193104

11 years agoIgnore -fstrength-reduce and -fno-strength-reduce.
Rafael Espindola [Mon, 21 Oct 2013 18:49:56 +0000 (18:49 +0000)]
Ignore -fstrength-reduce and -fno-strength-reduce.

GCC does the same.

llvm-svn: 193103

11 years agoFix creating bitcasts between address spaces in SCEV.
Matt Arsenault [Mon, 21 Oct 2013 18:41:10 +0000 (18:41 +0000)]
Fix creating bitcasts between address spaces in SCEV.

The test before wasn't successfully testing this
since it was missing the datalayout piece to change
the size of the second address space.

llvm-svn: 193102

11 years ago<rdar://problem/14496092>
Greg Clayton [Mon, 21 Oct 2013 18:40:51 +0000 (18:40 +0000)]
<rdar://problem/14496092>

Fixed an issue with reexported symbols on MacOSX by adding support for symbols re-exporting symbols. There is now a new symbol type eSymbolTypeReExported which contains a new name for the re-exported symbol and the new shared library. These symbols are only used when a symbol is re-exported as a symbol under a different name.

Modified the expression parser to be able to deal with finding the re-exported symbols and track down the actual symbol it refers to.

llvm-svn: 193101

11 years agoRefactor DynTypedMatcher into a value type class, just like Matcher<T>.
Samuel Benzaquen [Mon, 21 Oct 2013 18:40:51 +0000 (18:40 +0000)]
Refactor DynTypedMatcher into a value type class, just like Matcher<T>.

Summary:
Refactor DynTypedMatcher into a value type class, just like Matcher<T>.
This simplifies its usage and removes the virtual hierarchy from Matcher<T>.
It also enables planned changes to replace MatcherInteface<T>.
Too many instantiaions of this class hierarchy has been causing Registry.cpp.o to bloat in size and number of symbols.

Reviewers: klimek

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

llvm-svn: 193100

11 years agoExtend test to show an alias can be before a definition.
Rafael Espindola [Mon, 21 Oct 2013 18:24:30 +0000 (18:24 +0000)]
Extend test to show an alias can be before a definition.

llvm-svn: 193099

11 years agoUse internal_memset to initialize this variable.
Peter Collingbourne [Mon, 21 Oct 2013 18:11:57 +0000 (18:11 +0000)]
Use internal_memset to initialize this variable.

Otherwise, the compiler may use memset in non-optimized builds, which is
forbidden in the nolibc part of the runtime.

llvm-svn: 193098

11 years agoRemove unused SCEV functions
Matt Arsenault [Mon, 21 Oct 2013 18:08:09 +0000 (18:08 +0000)]
Remove unused SCEV functions

llvm-svn: 193097

11 years agoX86 vector element shift-by-immediate instructions take i8 immediates. Make
Lang Hames [Mon, 21 Oct 2013 17:51:24 +0000 (17:51 +0000)]
X86 vector element shift-by-immediate instructions take i8 immediates. Make
the instruction defenitions and ISEL reflect this.

Prior to this patch these instructions took an i32i8imm, and the high bits were
dropped during encoding. This led to incorrect behavior for shifts by
immediates higher than 255. This patch fixes that issue by detecting large
immediate shifts and returning constant zero (for logical shifts) or capping
the shift amount at an encodable value (for arithmetic shifts).

Fixes <rdar://problem/14968098>

llvm-svn: 193096

11 years agoFix up some old review feedback.
Eric Christopher [Mon, 21 Oct 2013 17:48:51 +0000 (17:48 +0000)]
Fix up some old review feedback.

llvm-svn: 193095

11 years agoImproving MCJIT/RuntimeDyld thread safety
Andrew Kaylor [Mon, 21 Oct 2013 17:42:06 +0000 (17:42 +0000)]
Improving MCJIT/RuntimeDyld thread safety

llvm-svn: 193094

11 years agoCleanup redundant include.
Rafael Espindola [Mon, 21 Oct 2013 17:34:39 +0000 (17:34 +0000)]
Cleanup redundant include.

Patch by Daniel Marjamäki.

llvm-svn: 193093

11 years agoGet rid of the FooStructSynth, it was a testing thing I put in and forgot to remove
Enrico Granata [Mon, 21 Oct 2013 17:29:51 +0000 (17:29 +0000)]
Get rid of the FooStructSynth, it was a testing thing I put in and forgot to remove
Hopefully nobody had a struct Foo in their app:-)

llvm-svn: 193092

11 years agoDebugInfo: Put each kind of constant (form, attribute, tag, etc) into its own enum...
David Blaikie [Mon, 21 Oct 2013 17:28:37 +0000 (17:28 +0000)]
DebugInfo: Put each kind of constant (form, attribute, tag, etc) into its own enum for ease of use.

This allows various variables to be more self-documenting and easier to
debug by being of specific types without overlapping enum values.

Precommit review by Eric Christopher.

llvm-svn: 193091

11 years agoOptimize more linkonce_odr values during LTO.
Rafael Espindola [Mon, 21 Oct 2013 17:14:55 +0000 (17:14 +0000)]
Optimize more linkonce_odr values during LTO.

When a linkonce_odr value that is on the dso list is not unnamed_addr
we can still look to see if anything is actually using its address. If
not, it is safe to hide it.

This patch implements that by moving GlobalStatus to Transforms/Utils
and using it in Internalize.

llvm-svn: 193090

11 years agoDebugInfo: Hash DW_FORM_GNU_str_index as a string.
David Blaikie [Mon, 21 Oct 2013 16:37:22 +0000 (16:37 +0000)]
DebugInfo: Hash DW_FORM_GNU_str_index as a string.

Found while adding type safety to the various DWARF enumerations (form,
attribute, tag, etc) that caused Clang to warn on an incompletely
covered switch. Converting the comment to a default/unreachable
uncovered this case of an unsupported form encoding. Seems we were
skipping fission strings entirely.

llvm-svn: 193089

11 years agoPatch by GM: Turn off 'deprecated' warnings when building with MSVC, and add '-Werror...
Marshall Clow [Mon, 21 Oct 2013 15:56:35 +0000 (15:56 +0000)]
Patch by GM: Turn off 'deprecated' warnings when building with MSVC, and add '-Werror=return-type' to catch funtions that aren't returning what they should.

llvm-svn: 193088

11 years agoPatch by GM: apparently '__value' (two underscores) is a special name in Visual Studi...
Marshall Clow [Mon, 21 Oct 2013 15:43:25 +0000 (15:43 +0000)]
Patch by GM: apparently '__value' (two underscores) is a special name in Visual Studio, so rename the private method in <regex> with that name. GM's patch used  '___value' (three underscores), but I changed that to '__regex_traits_value' because I've been burned in the past by identifiers that appear identical but are not.

llvm-svn: 193087

11 years agoPatch from GM: locale.cpp; make implicit conversions to bool explicit, fix some ...
Marshall Clow [Mon, 21 Oct 2013 15:07:28 +0000 (15:07 +0000)]
Patch from GM: locale.cpp; make implicit conversions to bool explicit, fix some 'unknown pragma' warnings when compiling under MSVC, and don't use the __sso_allocator under windows, b/c MSVC doesn't support aligned-by value parameters

llvm-svn: 193086

11 years agoPatch by GM: Making implicit conversion to bool explicit in <ios> and <__locale>
Marshall Clow [Mon, 21 Oct 2013 14:41:05 +0000 (14:41 +0000)]
Patch by GM: Making implicit conversion to bool explicit in <ios> and <__locale>

llvm-svn: 193085

11 years agoPatch by GM: Adding MSVC support to __bit_reference
Marshall Clow [Mon, 21 Oct 2013 14:29:37 +0000 (14:29 +0000)]
Patch by GM: Adding MSVC support to __bit_reference

llvm-svn: 193084

11 years agoAVX-512: MUL operation lowering for v8i64
Elena Demikhovsky [Mon, 21 Oct 2013 13:27:34 +0000 (13:27 +0000)]
AVX-512: MUL operation lowering for v8i64

llvm-svn: 193083

11 years ago[mips][msa] Direct Object Emission support for LD/ST instructions.
Matheus Almeida [Mon, 21 Oct 2013 13:07:13 +0000 (13:07 +0000)]
[mips][msa] Direct Object Emission support for LD/ST instructions.

llvm-svn: 193082

11 years ago[mips][msa] Direct Object Emission support for LDI instructions.
Matheus Almeida [Mon, 21 Oct 2013 12:56:20 +0000 (12:56 +0000)]
[mips][msa] Direct Object Emission support for LDI instructions.

llvm-svn: 193081

11 years ago[mips][msa] Direct Object Emission support for MOVE.v.
Matheus Almeida [Mon, 21 Oct 2013 12:43:54 +0000 (12:43 +0000)]
[mips][msa] Direct Object Emission support for MOVE.v.

llvm-svn: 193080

11 years agoDriver: Various string-related cleanups.
Benjamin Kramer [Mon, 21 Oct 2013 12:33:55 +0000 (12:33 +0000)]
Driver: Various string-related cleanups.

Also fixes some funky formatting.

llvm-svn: 193079

11 years ago[mips][msa] Direct Object Emission support for CTCMSA and CFCMSA.
Matheus Almeida [Mon, 21 Oct 2013 12:26:50 +0000 (12:26 +0000)]
[mips][msa] Direct Object Emission support for CTCMSA and CFCMSA.

These instructions are logically related as they allow read/write of MSA control registers.
Currently MSA control registers are emitted by number but hopefully that will change as soon
as GAS starts accepting them by name as that would make the assembly easier to read.

llvm-svn: 193078

11 years ago[mips][msa] Direct Object Emission of SPLAT instruction.
Matheus Almeida [Mon, 21 Oct 2013 12:07:26 +0000 (12:07 +0000)]
[mips][msa] Direct Object Emission of SPLAT instruction.

llvm-svn: 193077

11 years ago[mips][msa] Fix definition of SLD instruction.
Matheus Almeida [Mon, 21 Oct 2013 11:47:56 +0000 (11:47 +0000)]
[mips][msa] Fix definition of SLD instruction.

The second parameter of the SLD intrinsic is the number of columns (GPR) to
slide left the source array.

llvm-svn: 193076

11 years agoSet the default hardware division features for ARM cpus. Also set it as default for...
Silviu Baranga [Mon, 21 Oct 2013 10:59:33 +0000 (10:59 +0000)]
Set the default hardware division features for ARM cpus. Also set it as default for A32 armv8.

llvm-svn: 193075

11 years agoAdd the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware divide...
Silviu Baranga [Mon, 21 Oct 2013 10:54:53 +0000 (10:54 +0000)]
Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior.

llvm-svn: 193074