platform/upstream/llvm.git
11 years agoDocumentation for llvm-stress: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:05:55 +0000 (19:05 +0000)]
Documentation for llvm-stress: reformat

llvm-svn: 168920

11 years agoDocumentation for opt: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:02:50 +0000 (19:02 +0000)]
Documentation for opt: reformat

llvm-svn: 168919

11 years agoMake sure that we put the rest of the sanitizer libraries on the link line
Eric Christopher [Thu, 29 Nov 2012 18:51:05 +0000 (18:51 +0000)]
Make sure that we put the rest of the sanitizer libraries on the link line
before libstdc++ like we do with ubsan.

llvm-svn: 168918

11 years ago<rdar://problem/12655594>
Greg Clayton [Thu, 29 Nov 2012 18:48:47 +0000 (18:48 +0000)]
<rdar://problem/12655594>

Be sure to resolve the file path for the "target.process.python-os-plugin-path" setting.

llvm-svn: 168916

11 years ago<rdar://problem/12635804>
Greg Clayton [Thu, 29 Nov 2012 18:40:38 +0000 (18:40 +0000)]
<rdar://problem/12635804>

Add new rpath for LLDB: ../../Library/PrivateFrameworks

Also moved the debugserver plists into the Resources group.

llvm-svn: 168915

11 years agoImprove isImpliedCond comment a bit.
Andrew Trick [Thu, 29 Nov 2012 18:35:13 +0000 (18:35 +0000)]
Improve isImpliedCond comment a bit.

llvm-svn: 168914

11 years ago[ASan] Simplify check added in r168861. Bail out from module pass early if the module...
Alexey Samsonov [Thu, 29 Nov 2012 18:27:01 +0000 (18:27 +0000)]
[ASan] Simplify check added in r168861. Bail out from module pass early if the module is blacklisted.

llvm-svn: 168913

11 years agoDocumentation for llc: reformat.
Dmitri Gribenko [Thu, 29 Nov 2012 18:16:11 +0000 (18:16 +0000)]
Documentation for llc: reformat.

llvm-svn: 168912

11 years agoApply Takumi's patch to suppress unused-variable warnings in -Asserts builds.
Matt Beaumont-Gay [Thu, 29 Nov 2012 18:15:49 +0000 (18:15 +0000)]
Apply Takumi's patch to suppress unused-variable warnings in -Asserts builds.

llvm-svn: 168911

11 years agoAdd options to AddressSanitizer passes to make them configurable by frontend.
Alexey Samsonov [Thu, 29 Nov 2012 18:14:24 +0000 (18:14 +0000)]
Add options to AddressSanitizer passes to make them configurable by frontend.

llvm-svn: 168910

11 years agofix a typo
Shuxin Yang [Thu, 29 Nov 2012 18:09:37 +0000 (18:09 +0000)]
fix a typo

llvm-svn: 168909

11 years agoUse newer command line option here.
Eric Christopher [Thu, 29 Nov 2012 18:08:24 +0000 (18:08 +0000)]
Use newer command line option here.

llvm-svn: 168908

11 years agoRemove duplicate test run lines.
Eric Christopher [Thu, 29 Nov 2012 18:08:22 +0000 (18:08 +0000)]
Remove duplicate test run lines.

llvm-svn: 168907

11 years agoDocumentation for lit: more formatting: use 'option' and 'program' directives.
Dmitri Gribenko [Thu, 29 Nov 2012 18:03:08 +0000 (18:03 +0000)]
Documentation for lit: more formatting: use 'option' and 'program' directives.

This enables cross-referencing and now '--' in option names are no more turned into en dashes.

llvm-svn: 168906

11 years agoOne more step towards making doInitialization and doFinalization useful for
Pedro Artigas [Thu, 29 Nov 2012 17:47:05 +0000 (17:47 +0000)]
One more step towards making doInitialization and doFinalization useful for
start up and clean up module passes, now that ASAN and TSAN are fixed the
tests pass

llvm-svn: 168905

11 years agoDocumentation for tblgen: formatting
Dmitri Gribenko [Thu, 29 Nov 2012 17:41:05 +0000 (17:41 +0000)]
Documentation for tblgen: formatting

llvm-svn: 168904

11 years agoUpdate to Polly for LLVM r165262 which changes TargetData to Datalayout.
Tobias Grosser [Thu, 29 Nov 2012 17:34:50 +0000 (17:34 +0000)]
Update to Polly for LLVM r165262 which changes TargetData to Datalayout.

Contributed by: Yabin Hu <yabin.hwu@gmail.com>

llvm-svn: 168903

11 years agoDocumentation for lit: formatting improvements.
Dmitri Gribenko [Thu, 29 Nov 2012 17:05:34 +0000 (17:05 +0000)]
Documentation for lit: formatting improvements.

llvm-svn: 168902

11 years agoMatch extern "C" in declaration and definition (swig template)
Daniel Malea [Thu, 29 Nov 2012 16:38:44 +0000 (16:38 +0000)]
Match extern "C" in declaration and definition (swig template)
- Fix for building with gcc 4.6

llvm-svn: 168901

11 years agoNow that the underlying problem has been fixed, add r168411 back.
Rafael Espindola [Thu, 29 Nov 2012 16:38:22 +0000 (16:38 +0000)]
Now that the underlying problem has been fixed, add r168411 back.
Original commit message:

Remove redundant code.

llvm-svn: 168900

11 years agoTest commit.
Patrik Hagglund [Thu, 29 Nov 2012 16:19:11 +0000 (16:19 +0000)]
Test commit.

llvm-svn: 168899

11 years agoDocumentation: formatting improvements
Dmitri Gribenko [Thu, 29 Nov 2012 16:12:13 +0000 (16:12 +0000)]
Documentation: formatting improvements

llvm-svn: 168897

11 years agoMerge function types in C.
Rafael Espindola [Thu, 29 Nov 2012 16:09:03 +0000 (16:09 +0000)]
Merge function types in C.

Among other differences, GCC accepts

  typedef int IA[];
  typedef int A10[10];
  static A10 *f(void);
  static IA  *f(void);
  void g(void) {
    (void)sizeof(*f());
  }

but clang used to reject it with:

  invalid application of 'sizeof' to an incomplete type 'IA' (aka 'int []')

The intention of c99's 6.2.7 seems to be that we should use the composite type
and accept as gcc does.

Doing the type merging required some extra fixes:
  * Use the type from the function type in initializations, even if an parameter
    is available.
  * Fix the merging of the noreturn attribute in function types.
  * Make CodeGen  handle the fact that an parameter type can be different from
    the corresponding type in the function type.

llvm-svn: 168895

11 years agoinstcombine: Migrate fputs optimizations
Meador Inge [Thu, 29 Nov 2012 15:45:43 +0000 (15:45 +0000)]
instcombine: Migrate fputs optimizations

This patch migrates the fputs optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168893

11 years agoinstcombine: Migrate fwrite optimizations
Meador Inge [Thu, 29 Nov 2012 15:45:39 +0000 (15:45 +0000)]
instcombine: Migrate fwrite optimizations

This patch migrates the fwrite optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168892

11 years agoinstcombine: Migrate fprintf optimizations
Meador Inge [Thu, 29 Nov 2012 15:45:33 +0000 (15:45 +0000)]
instcombine: Migrate fprintf optimizations

This patch migrates the fprintf optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168891

11 years ago[msan] Handle vector manipulation instructions.
Evgeniy Stepanov [Thu, 29 Nov 2012 15:22:06 +0000 (15:22 +0000)]
[msan] Handle vector manipulation instructions.

Handle insertelement, extractelement, shufflevector.

llvm-svn: 168889

11 years ago[msan] Fix getOriginForNaryOp.
Evgeniy Stepanov [Thu, 29 Nov 2012 14:44:00 +0000 (14:44 +0000)]
[msan] Fix getOriginForNaryOp.

The old version failed on a 3-arg instruction with (-1, 0, 0) shadows (it would
pick the 3rd operand origin irrespective of its shadow).

The new version always picks the origin of the rightmost poisoned operand.

llvm-svn: 168887

11 years agoAdded atomic 64 min/max/umin/umax instrinsics support in the ARM backend.
Silviu Baranga [Thu, 29 Nov 2012 14:41:25 +0000 (14:41 +0000)]
Added atomic 64 min/max/umin/umax instrinsics support in the ARM backend.

llvm-svn: 168886

11 years agomisched: Recompute priority queue when DFSResults are updated.
Benjamin Kramer [Thu, 29 Nov 2012 14:36:26 +0000 (14:36 +0000)]
misched: Recompute priority queue when DFSResults are updated.

This was found by MSVC10's STL debug mode on a test from the test suite. Sadly
std::is_heap isn't standard so there is no way to assert this without writing
our own heap verify, which looks like overkill to me.

llvm-svn: 168885

11 years ago[msan] Basic handling of inline asm.
Evgeniy Stepanov [Thu, 29 Nov 2012 14:32:03 +0000 (14:32 +0000)]
[msan] Basic handling of inline asm.

llvm-svn: 168884

11 years agoTeach the legalizer how to handle operands for VSELECT nodes
Justin Holewinski [Thu, 29 Nov 2012 14:26:28 +0000 (14:26 +0000)]
Teach the legalizer how to handle operands for VSELECT nodes

If we need to split the operand of a VSELECT, it must be the mask operand. We
split the entire VSELECT operand with EXTRACT_SUBVECTOR.

llvm-svn: 168883

11 years agoAllow targets to prefer TypeSplitVector over TypePromoteInteger when computing the...
Justin Holewinski [Thu, 29 Nov 2012 14:26:24 +0000 (14:26 +0000)]
Allow targets to prefer TypeSplitVector over TypePromoteInteger when computing the legalization method for vectors

For some targets, it is desirable to prefer scalarizing <N x i1> instead of promoting to a larger legal type, such as <N x i32>.

llvm-svn: 168882

11 years ago[msan] Propagate shadow through (x<0) and (x>=0) comparisons.
Evgeniy Stepanov [Thu, 29 Nov 2012 14:25:47 +0000 (14:25 +0000)]
[msan] Propagate shadow through (x<0) and (x>=0) comparisons.

This is a special case of signed relational comparison where result
only depends on the sign of x.

llvm-svn: 168881

11 years ago[msan] Fix shadow & origin store & load alignment.
Evgeniy Stepanov [Thu, 29 Nov 2012 14:05:53 +0000 (14:05 +0000)]
[msan] Fix shadow & origin store & load alignment.

This change ensures that shadow memory accesses have the same alignment
as corresponding app memory accesses.

llvm-svn: 168880

11 years ago[msan] Optimize getOriginPtr.
Evgeniy Stepanov [Thu, 29 Nov 2012 13:43:05 +0000 (13:43 +0000)]
[msan] Optimize getOriginPtr.

Rewrite getOriginPtr in a way that lets subsequent optimizations factor out
the common part of Shadow and Origin address calculation. Improves perf by
up to 5%.

llvm-svn: 168879

11 years ago[msan] Fix a few compilation warnings.
Evgeniy Stepanov [Thu, 29 Nov 2012 13:12:03 +0000 (13:12 +0000)]
[msan] Fix a few compilation warnings.

llvm-svn: 168878

11 years ago[msan] Add a test for r168873.
Evgeniy Stepanov [Thu, 29 Nov 2012 13:11:09 +0000 (13:11 +0000)]
[msan] Add a test for r168873.

llvm-svn: 168877

11 years ago[msan] Transform memcpy and memset to library calls.
Evgeniy Stepanov [Thu, 29 Nov 2012 12:49:04 +0000 (12:49 +0000)]
[msan] Transform memcpy and memset to library calls.

This was already done for memmove, where it is required for correctness.
This change improves performance by avoiding copyingthe same memory twice.
Also, the library functions are given __msan_ prefix to prevent instcombine
pass from converting them back to intrinsics.

llvm-svn: 168876

11 years agoI changed hasAVX() to hasFp256() and hasAVX2() to hasInt256() in X86IselLowering...
Elena Demikhovsky [Thu, 29 Nov 2012 12:44:59 +0000 (12:44 +0000)]
I changed hasAVX() to hasFp256() and hasAVX2() to hasInt256() in X86IselLowering.cpp.
The logic was not changed, only names.

llvm-svn: 168875

11 years ago[msan] Update tests (broken in r168873).
Evgeniy Stepanov [Thu, 29 Nov 2012 12:43:56 +0000 (12:43 +0000)]
[msan] Update tests (broken in r168873).

llvm-svn: 168874

11 years ago[msan] Make sure that report callbacks do not get merged.
Evgeniy Stepanov [Thu, 29 Nov 2012 12:30:18 +0000 (12:30 +0000)]
[msan] Make sure that report callbacks do not get merged.

llvm-svn: 168873

11 years ago[asan] disable BuiltinLongJmpTest on Android
Kostya Serebryany [Thu, 29 Nov 2012 12:18:48 +0000 (12:18 +0000)]
[asan] disable BuiltinLongJmpTest on Android

llvm-svn: 168872

11 years agoDocumentation: use correct highlighter
Dmitri Gribenko [Thu, 29 Nov 2012 12:00:32 +0000 (12:00 +0000)]
Documentation: use correct highlighter

llvm-svn: 168871

11 years agoASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Remove i128 stuff. Conditi...
NAKAMURA Takumi [Thu, 29 Nov 2012 10:22:40 +0000 (10:22 +0000)]
ASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Remove i128 stuff. Conditioning-out in macro argument was not accepted on MS cl.exe.

llvm-svn: 168867

11 years agoInitial commit of MemorySanitizer.
Evgeniy Stepanov [Thu, 29 Nov 2012 09:57:20 +0000 (09:57 +0000)]
Initial commit of MemorySanitizer.

Compiler pass only.

llvm-svn: 168866

11 years agoASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Suppress i128 according...
NAKAMURA Takumi [Thu, 29 Nov 2012 09:57:11 +0000 (09:57 +0000)]
ASTTests/StmtPrinterTest/StmtPrinter.TestMSIntegerLiteral: Suppress i128 according to r168856, for now.

I think "i128", that I conditioned out, could be completely removed.
MS Compiler doesn't accept i128. We can assume no one would use i128.

llvm-svn: 168865

11 years ago[asan/tsan] initialize the asan/tsan callbacks in runOnFunction as opposed to doIniti...
Kostya Serebryany [Thu, 29 Nov 2012 09:54:21 +0000 (09:54 +0000)]
[asan/tsan] initialize the asan/tsan callbacks in runOnFunction as opposed to doInitialization. This is required to allow the upcoming changes in PassManager behavior

llvm-svn: 168864

11 years ago[asan] enable BuiltinLongJmpTest
Kostya Serebryany [Thu, 29 Nov 2012 09:02:14 +0000 (09:02 +0000)]
[asan] enable BuiltinLongJmpTest

llvm-svn: 168863

11 years ago[-cxx-abi microsoft] Also spill the argument-back-references context when mangling...
Timur Iskhodzhanov [Thu, 29 Nov 2012 08:58:47 +0000 (08:58 +0000)]
[-cxx-abi microsoft] Also spill the argument-back-references context when mangling templates

llvm-svn: 168862

11 years ago[asan] when checking the noreturn attribute on the call, also check it on the callee
Kostya Serebryany [Thu, 29 Nov 2012 08:57:20 +0000 (08:57 +0000)]
[asan] when checking the noreturn attribute on the call, also check it on the callee

llvm-svn: 168861

11 years agoubsan: Don't assume that Clang provides __int128 unless it advertises that it does.
Richard Smith [Thu, 29 Nov 2012 05:59:30 +0000 (05:59 +0000)]
ubsan: Don't assume that Clang provides __int128 unless it advertises that it does.

llvm-svn: 168857

11 years agoReject uses of __int128 on platforms that don't support it. Also move the ugly
Richard Smith [Thu, 29 Nov 2012 05:41:51 +0000 (05:41 +0000)]
Reject uses of __int128 on platforms that don't support it. Also move the ugly
'getPointerWidth(0) >= 64' test to be a method on TargetInfo, ready to be
properly cleaned up.

llvm-svn: 168856

11 years agoFix sentence construction-o.
Nico Weber [Thu, 29 Nov 2012 05:29:23 +0000 (05:29 +0000)]
Fix sentence construction-o.

llvm-svn: 168855

11 years agoCleaned up a couple of comments.
Preston Briggs [Thu, 29 Nov 2012 04:30:52 +0000 (04:30 +0000)]
Cleaned up a couple of comments.

llvm-svn: 168854

11 years agoRemove 'noreturn' attribute from friend declaration. This attribute will be
Richard Smith [Thu, 29 Nov 2012 04:30:50 +0000 (04:30 +0000)]
Remove 'noreturn' attribute from friend declaration. This attribute will be
inherited from the previous out-of-class declaration, and attributes on friend
function declarations are ill-formed in C++11.

llvm-svn: 168853

11 years agoUse MCPhysReg for RegisterClassInfo allocation orders.
Jakob Stoklund Olesen [Thu, 29 Nov 2012 03:34:17 +0000 (03:34 +0000)]
Use MCPhysReg for RegisterClassInfo allocation orders.

This saves a bit of memory.

llvm-svn: 168852

11 years agoFix crash-on-invalid. <rdar://problem/12765391>.
Eli Friedman [Thu, 29 Nov 2012 03:13:49 +0000 (03:13 +0000)]
Fix crash-on-invalid.  <rdar://problem/12765391>.

llvm-svn: 168851

11 years agoAdd an MCPhysReg typedef to replace naked uint16_t.
Jakob Stoklund Olesen [Thu, 29 Nov 2012 02:39:28 +0000 (02:39 +0000)]
Add an MCPhysReg typedef to replace naked uint16_t.

Use this type for arrays of physical registers.

llvm-svn: 168850

11 years agoInstruction::isAssociative() returns true for fmul/fadd if they are tagged "unsafe...
Shuxin Yang [Thu, 29 Nov 2012 01:47:31 +0000 (01:47 +0000)]
Instruction::isAssociative() returns true for fmul/fadd if they are tagged "unsafe" mode.

Approved by: Eli and Michael.

llvm-svn: 168848

11 years agoThe declaration of a special member can require overload resolution to be
Richard Smith [Thu, 29 Nov 2012 01:34:07 +0000 (01:34 +0000)]
The declaration of a special member can require overload resolution to be
performed, to determine whether that special member is deleted or constexpr.
That overload resolution process can in turn trigger the instantiation of a
template, which can do anything, including triggering the declaration of that
very same special member function. When this happens, do not try to recursively
declare the special member -- that's impossible. Instead, only try to realise
the truth. There is no special member.

llvm-svn: 168847

11 years agoChange SValBuilder::getConditionType() to return BoolTy in C++. Fixes <rdar://proble...
Ted Kremenek [Thu, 29 Nov 2012 01:03:10 +0000 (01:03 +0000)]
Change SValBuilder::getConditionType() to return BoolTy in C++.  Fixes <rdar://problem/12772656>.

llvm-svn: 168846

11 years ago<rdar://problem/12445557>
Greg Clayton [Thu, 29 Nov 2012 00:53:06 +0000 (00:53 +0000)]
<rdar://problem/12445557>

Make stack frames fix up their line table entries when the target has source remappings. Also rearranged how the m_sc.target_sp was filled in so it can be used during the StackFrame::GetSymbolContext(...) function.

llvm-svn: 168845

11 years agoDon't return decorated (i.e., const or pointer)
Sean Callanan [Thu, 29 Nov 2012 00:50:56 +0000 (00:50 +0000)]
Don't return decorated (i.e., const or pointer)
versions of UnknownAnyTy for ObjectiveC value types.
<unknown type>* makes no sense and can cause the
parser to behave very oddly.

<rdar://problem/12518999>

llvm-svn: 168844

11 years agoCorrectly handle IntegralToBool casts in C++ in the static analyzer. Fixes <rdar...
Ted Kremenek [Thu, 29 Nov 2012 00:50:20 +0000 (00:50 +0000)]
Correctly handle IntegralToBool casts in C++ in the static analyzer.  Fixes <rdar://problem/12759044>.

llvm-svn: 168843

11 years ago[driver] -mkernel implies -mstrict-align; don't add the redundant option.
Chad Rosier [Thu, 29 Nov 2012 00:42:06 +0000 (00:42 +0000)]
[driver] -mkernel implies -mstrict-align; don't add the redundant option.
rdar://12771737

llvm-svn: 168841

11 years agoAdd an example of using the target.process.extra-startup-command to turn on debugserv...
Jim Ingham [Thu, 29 Nov 2012 00:41:12 +0000 (00:41 +0000)]
Add an example of using the target.process.extra-startup-command to turn on debugserver logging since
we always forget how to do this...

llvm-svn: 168840

11 years agoTighten up how we acquire the underlying frame in the SBFrame methods. We were getting
Jim Ingham [Thu, 29 Nov 2012 00:26:19 +0000 (00:26 +0000)]
Tighten up how we acquire the underlying frame in the SBFrame methods.  We were getting
the frame and then getting the run lock.  Which means that our frame could have gotten
invalidated by stopping between the time we got the frame and assured the the target was
stopped.  Now we get the run lock first, and THEN resolve the underlying frame object.

<rdar://problem/12621607>

llvm-svn: 168838

11 years agoAvoid rewriting instructions twice.
Jakob Stoklund Olesen [Thu, 29 Nov 2012 00:26:11 +0000 (00:26 +0000)]
Avoid rewriting instructions twice.

This could cause miscompilations in targets where sub-register
composition is not always idempotent (ARM).

<rdar://problem/12758887>

llvm-svn: 168837

11 years agoRename __lambda to __lambda_node (apply r164404 from libcxxabi)
Daniel Malea [Thu, 29 Nov 2012 00:05:50 +0000 (00:05 +0000)]
Rename __lambda to __lambda_node (apply r164404 from libcxxabi)
- fixes gcc 4.6 build problems
- resolves open bugzilla http://llvm.org/bugs/show_bug.cgi?id=13889

llvm-svn: 168835

11 years agoCorrect the label for the com.apple.debugserver.posix plist.
Jason Molenda [Thu, 29 Nov 2012 00:01:49 +0000 (00:01 +0000)]
Correct the label for the com.apple.debugserver.posix plist.
<rdar://problem/12769073>

llvm-svn: 168834

11 years agoIssue a fatal error if the line doesn't have a regular expression.
Nick Lewycky [Thu, 29 Nov 2012 00:01:38 +0000 (00:01 +0000)]
Issue a fatal error if the line doesn't have a regular expression.

Also a couple not-user-visible changes; using empty() instead of size(), and
make inSection() not insert NULL Regex*'s into StringMap when doing a lookup.

llvm-svn: 168833

11 years agoWhen combining consecutive stores allow loads in between the stores, if the loads...
Nadav Rotem [Thu, 29 Nov 2012 00:00:08 +0000 (00:00 +0000)]
When combining consecutive stores allow loads in between the stores, if the loads do not alias.

llvm-svn: 168832

11 years agoLinux buildbot fix: detect swig tool from PATH in shell script (before searching...
Daniel Malea [Wed, 28 Nov 2012 23:49:11 +0000 (23:49 +0000)]
Linux buildbot fix: detect swig tool from PATH in shell script (before searching hardcoded directories)

llvm-svn: 168831

11 years agoWhen we delete a dead basic block, see if any of its successors are dead and
Bill Wendling [Wed, 28 Nov 2012 23:23:48 +0000 (23:23 +0000)]
When we delete a dead basic block, see if any of its successors are dead and
delete those as well.

llvm-svn: 168829

11 years agoAdd 'class' keyword to friend definition (to fix gcc 4.6 build)
Daniel Malea [Wed, 28 Nov 2012 23:20:22 +0000 (23:20 +0000)]
Add 'class' keyword to friend definition (to fix gcc 4.6 build)

llvm-svn: 168827

11 years agoImplement C++11 [dcl.attr.grammar] p4: If an attribute-specifier-seq appertains to...
Michael Han [Wed, 28 Nov 2012 23:17:40 +0000 (23:17 +0000)]
Implement C++11 [dcl.attr.grammar] p4: If an attribute-specifier-seq appertains to a friend declaration, that declaration shall be a definition.

llvm-svn: 168826

11 years agoobjective-C blocks: Make sure that identical logic is used
Fariborz Jahanian [Wed, 28 Nov 2012 23:12:17 +0000 (23:12 +0000)]
objective-C blocks: Make sure that identical logic is used
in deciding a copy/dispose field is needed in a byref structure
and when generating the copy/dispose helpers. In certain
cases, these fields were being added but no copy/dispose was
being generated. This was uncovered in ARC, but not in MRR.
// rdar://12759433

llvm-svn: 168825

11 years agoPer C++11 [except.spec]p2, rvalue references are not permitted in exception specifica...
Richard Smith [Wed, 28 Nov 2012 22:52:42 +0000 (22:52 +0000)]
Per C++11 [except.spec]p2, rvalue references are not permitted in exception specifications.

llvm-svn: 168824

11 years agoPR14388: An array or function type in an exception specification should be
Richard Smith [Wed, 28 Nov 2012 22:33:28 +0000 (22:33 +0000)]
PR14388: An array or function type in an exception specification should be
decayed to a pointer type. Patch by WenHan Gu, with a little tweaking and
additional testcases by me.

llvm-svn: 168822

11 years agoABI: comments from Eli on r168820.
Manman Ren [Wed, 28 Nov 2012 22:29:41 +0000 (22:29 +0000)]
ABI: comments from Eli on r168820.

rdar://12723368

llvm-svn: 168821

11 years agoABI: modify CreateCoercedLoad and CreateCoercedStore to not use load or store of
Manman Ren [Wed, 28 Nov 2012 22:08:52 +0000 (22:08 +0000)]
ABI: modify CreateCoercedLoad and CreateCoercedStore to not use load or store of
the original parameter or return type.

Since we do not accurately represent the data fields of a union, we should not
directly load or store a union type.

As an exmple, if we have i8,i8, i32, i32 as one field type and i32,i32 as
another field type, the first field type will be chosen to represent the union.
If we load with the union's type, the 3rd byte and the 4th byte will be skipped.

rdar://12723368

llvm-svn: 168820

11 years agoPR13098: If we're instantiating an overloaded binary operator and we could
Richard Smith [Wed, 28 Nov 2012 21:47:39 +0000 (21:47 +0000)]
PR13098: If we're instantiating an overloaded binary operator and we could
determine which member function would be the callee from within the template
definition, don't pass that function as a "non-member function" to
CreateOverloadedBinOp. Instead, just rely on it to select the member function
for itself.

llvm-svn: 168818

11 years agoDocumentation: improve formatting and remove unneeded empty lines.
Dmitri Gribenko [Wed, 28 Nov 2012 21:40:54 +0000 (21:40 +0000)]
Documentation: improve formatting and remove unneeded empty lines.

llvm-svn: 168817

11 years agoWhoops, fixed bad merge
Michael Ilseman [Wed, 28 Nov 2012 21:21:18 +0000 (21:21 +0000)]
Whoops, fixed bad merge

llvm-svn: 168816

11 years agoFixed bad test case
Michael Ilseman [Wed, 28 Nov 2012 21:19:52 +0000 (21:19 +0000)]
Fixed bad test case

llvm-svn: 168815

11 years agoFast-math: IRBuilder test for creating instructions with fast-math flags
Michael Ilseman [Wed, 28 Nov 2012 21:17:34 +0000 (21:17 +0000)]
Fast-math: IRBuilder test for creating instructions with fast-math flags

llvm-svn: 168814

11 years agoFast-math: Extend IRBuilder to have settable FastMathFlags to create instructions...
Michael Ilseman [Wed, 28 Nov 2012 21:16:19 +0000 (21:16 +0000)]
Fast-math: Extend IRBuilder to have settable FastMathFlags to create instructions with

Also extended IRBuilder's documentation to mention the convenience state for DefaultFPMathTag and FastMathFlags that can be set.

llvm-svn: 168812

11 years agoFast-math comments and convenience method
Michael Ilseman [Wed, 28 Nov 2012 21:11:25 +0000 (21:11 +0000)]
Fast-math comments and convenience method

llvm-svn: 168811

11 years agoDefine signed const-ext immediate operands and their predicates.
Jyotsna Verma [Wed, 28 Nov 2012 20:58:14 +0000 (20:58 +0000)]
Define signed const-ext immediate operands and their predicates.

llvm-svn: 168810

11 years agoARM: Implement CanLowerReturn so large vectors get expanded into sret.
Benjamin Kramer [Wed, 28 Nov 2012 20:55:10 +0000 (20:55 +0000)]
ARM: Implement CanLowerReturn so large vectors get expanded into sret.

Fixes 14337.

llvm-svn: 168809

11 years agoCleanup - remove declarations of unimplemented functions.
Jim Ingham [Wed, 28 Nov 2012 20:09:03 +0000 (20:09 +0000)]
Cleanup - remove declarations of unimplemented functions.

llvm-svn: 168807

11 years agoMake the LiveRegMatrix analysis available to targets.
Jakob Stoklund Olesen [Wed, 28 Nov 2012 19:13:06 +0000 (19:13 +0000)]
Make the LiveRegMatrix analysis available to targets.

No functional change, just moved header files.

Targets can inject custom passes between register allocation and
rewriting. This makes it possible to tweak the register allocation
before rewriting, using the full global interference checking available
from LiveRegMatrix.

llvm-svn: 168806

11 years ago[analyzer] scan-build: Don't forget to close our temp file for Clang's output.
Jordan Rose [Wed, 28 Nov 2012 19:12:44 +0000 (19:12 +0000)]
[analyzer] scan-build: Don't forget to close our temp file for Clang's output.

Also, minor whitespace/indentation fixes.

Patch by Peeter Joot!

llvm-svn: 168805

11 years ago[analyzer] scan-build: Treat '.C' files as C++.
Jordan Rose [Wed, 28 Nov 2012 19:12:29 +0000 (19:12 +0000)]
[analyzer] scan-build: Treat '.C' files as C++.

Part of PR14443.

llvm-svn: 168804

11 years agoAdd backreference matching capabilities to Support/Regex, with
Eli Bendersky [Wed, 28 Nov 2012 19:00:02 +0000 (19:00 +0000)]
Add backreference matching capabilities to Support/Regex, with
appropriate unit tests. This change in itself is not expected to
affect any functionality at this point, but it will serve as a
stepping stone to improve FileCheck's variable matching capabilities.

Luckily, our regex implementation already supports backreferences,
although a bit of hacking is required to enable it. It supports both
Basic Regular Expressions (BREs) and Extended Regular Expressions
(EREs), without supporting backrefs for EREs, following POSIX strictly
in this respect. And EREs is what we actually use (rightly). This is
contrary to many implementations (including the default on Linux) of
POSIX regexes, that do allow backrefs in EREs.

Adding backref support to our EREs is a very simple change in the
regcomp parsing code. I fail to think of significant cases where it
would clash with existing things, and can bring more versatility to
the regexes we write. There's always the danger of a backref in a
specially crafted regex causing exponential matching times, but since
we mainly use them for testing purposes I don't think it's a big
problem. [it can also be placed behind a flag specific to FileCheck,
if needed].

For more details, see:

* http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html
* http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/156878.html

llvm-svn: 168802

11 years agoMCJIT depends on JIT.
Benjamin Kramer [Wed, 28 Nov 2012 18:35:35 +0000 (18:35 +0000)]
MCJIT depends on JIT.

Unbreaks the CMake shared library build. This is nasty and should be fixed
eventually.

llvm-svn: 168800

11 years agoFix initial frame state on powerpc64.
Ulrich Weigand [Wed, 28 Nov 2012 18:21:03 +0000 (18:21 +0000)]
Fix initial frame state on powerpc64.

The createPPCMCAsmInfo routine used PPC::R1 as the initial frame
pointer register, but on PPC64 the 32-bit R1 register does not
have a corresponding DWARF number, causing invalid CIE initial
frame state to be emitted.  Fix by using PPC::X1 instead.

llvm-svn: 168799

11 years agoRefactor -fsanitize, -f*-sanitizer arguments parsing. Provide a more careful diagnost...
Alexey Samsonov [Wed, 28 Nov 2012 17:34:24 +0000 (17:34 +0000)]
Refactor -fsanitize, -f*-sanitizer arguments parsing. Provide a more careful diagnostic for invalid sets of sanitizers

llvm-svn: 168794

11 years ago[asan] add DISABLED_BuiltinLongJmpTest
Kostya Serebryany [Wed, 28 Nov 2012 15:01:23 +0000 (15:01 +0000)]
[asan] add DISABLED_BuiltinLongJmpTest

llvm-svn: 168793