platform/upstream/llvm.git
11 years agoFix comment.
Tilmann Scheller [Fri, 27 Sep 2013 10:38:11 +0000 (10:38 +0000)]
Fix comment.

llvm-svn: 191505

11 years agoARM: Teach assembler to enforce constraint for Thumb2 LDRD (literal/immediate) destin...
Tilmann Scheller [Fri, 27 Sep 2013 10:30:18 +0000 (10:30 +0000)]
ARM: Teach assembler to enforce constraint for Thumb2 LDRD (literal/immediate) destination register operands.

LDRD<c> <Rt>, <Rt2>, <label>
LDRD<c> <Rt>, <Rt2>, [<Rn>{, #+/-<imm>}]
LDRD<c> <Rt>, <Rt2>, [<Rn>], #+/-<imm>
LDRD<c> <Rt>, <Rt2>, [<Rn>, #+/-<imm>]!

As specified in A8.8.72/A8.8.73 in the ARM ARM, the T1 encoding has a constraint which enforces that Rt != Rt2.

If this constraint is not met the result of executing the instruction will be unpredictable.

Fixes rdar://14479780.

llvm-svn: 191504

11 years ago[mips][msa] Tidy up
Daniel Sanders [Fri, 27 Sep 2013 10:25:41 +0000 (10:25 +0000)]
[mips][msa] Tidy up

lowerMSABinaryIntr, lowerMSABinaryImmIntr, lowerMSABranchIntr,
and lowerMSAUnaryIntr were trivially small functions. Inlined them into
their callers.

lowerMSASplat now takes its callers SDLoc instead of making a new one.

No functional change.

llvm-svn: 191503

11 years agoCreate directory for OpenMP runtime
Jim Cownie [Fri, 27 Sep 2013 10:09:23 +0000 (10:09 +0000)]
Create directory for OpenMP runtime

llvm-svn: 191500

11 years ago[mips][msa] MSA requires FR=1 mode (64-bit FPU register file). Report fatal error...
Daniel Sanders [Fri, 27 Sep 2013 10:08:31 +0000 (10:08 +0000)]
[mips][msa] MSA requires FR=1 mode (64-bit FPU register file). Report fatal error when using it in FR=0 mode.

llvm-svn: 191498

11 years agoCorrectly indent with tabs when whitespace starts from the column not divisible by...
Alexander Kornienko [Fri, 27 Sep 2013 09:45:40 +0000 (09:45 +0000)]
Correctly indent with tabs when whitespace starts from the column not divisible by TabWidth.

Summary:
The width of the first inserted tab character depends on the initial
column, so we need to handle the first tab in a special manner.

Reviewers: klimek, djasper

Reviewed By: klimek

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

llvm-svn: 191497

11 years ago[mips][msa] Expand all truncstores and loadexts for MSA as well as DSP
Daniel Sanders [Fri, 27 Sep 2013 09:44:59 +0000 (09:44 +0000)]
[mips][msa] Expand all truncstores and loadexts for MSA as well as DSP

llvm-svn: 191496

11 years ago[mips][msa] Added missing check in performSRACombine
Daniel Sanders [Fri, 27 Sep 2013 09:25:29 +0000 (09:25 +0000)]
[mips][msa] Added missing check in performSRACombine

Reviewers: jacksprat, dsanders

Reviewed By: dsanders

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

llvm-svn: 191495

11 years agoclang-format: Improve formatting of functions with multiple trailing tokens.
Daniel Jasper [Fri, 27 Sep 2013 08:29:16 +0000 (08:29 +0000)]
clang-format: Improve formatting of functions with multiple trailing tokens.

Before:
  void SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaa) override
  final;

After:
  void SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaa,
                    aaaaaaaaaaaaaaaaaaaaaaaaaa) override final;

llvm-svn: 191494

11 years agoAST: Handle multidimensional arrays inside of __uuidof()
David Majnemer [Fri, 27 Sep 2013 07:57:34 +0000 (07:57 +0000)]
AST: Handle multidimensional arrays inside of __uuidof()

We previously handled one-dimensional arrays but didn't consider the
general case.  The fix is simple: keep going through subsequent
dimensions until we get to the base element.

llvm-svn: 191493

11 years agoclang-format: Fix formatting bug with comment in weird place.
Daniel Jasper [Fri, 27 Sep 2013 07:49:08 +0000 (07:49 +0000)]
clang-format: Fix formatting bug with comment in weird place.

Before:
  template <typename T>
  // T should be one of {A, B}.
      void f() {}

After:
  template <typename T>
  // T should be one of {A, B}.
  void f() {}

llvm-svn: 191492

11 years agoFirst check in. Modified a comment.
Puyan Lotfi [Fri, 27 Sep 2013 07:36:10 +0000 (07:36 +0000)]
First check in. Modified a comment.

llvm-svn: 191491

11 years agoPut HasAVX512 predicate on some patterns to properly disable them when AVX512 isn...
Craig Topper [Fri, 27 Sep 2013 07:20:47 +0000 (07:20 +0000)]
Put HasAVX512 predicate on some patterns to properly disable them when AVX512 isn't enabled. Currently it works simply because the SSE and AVX version of the same patterns are checked first in the DAG isel table.

llvm-svn: 191490

11 years agoSwitch HasAVX to UseAVX in one spot to ensure that AVX512 form of VINSERTPS is used...
Craig Topper [Fri, 27 Sep 2013 07:16:24 +0000 (07:16 +0000)]
Switch HasAVX to UseAVX in one spot to ensure that AVX512 form of VINSERTPS is used in AVX512 mode.

llvm-svn: 191489

11 years agoRemoval some duplicate patterns.
Craig Topper [Fri, 27 Sep 2013 07:11:17 +0000 (07:11 +0000)]
Removal some duplicate patterns.

llvm-svn: 191488

11 years agoAST: Handle qualified array types in typeid() expressions
David Majnemer [Fri, 27 Sep 2013 07:04:31 +0000 (07:04 +0000)]
AST: Handle qualified array types in typeid() expressions

The intent of getTypeOperand() was to yield an unqualified type.
However QualType::getUnqualifiedType() does not strip away qualifiers on
arrays.

N.B.  This worked fine when typeid() was applied to an expression
because we would inject as implicit cast to the unqualified array type
in the AST.

llvm-svn: 191487

11 years agoAdd -fno-unsigned-char and ignore it. We already support -fno-signed-char, add
Nick Lewycky [Fri, 27 Sep 2013 05:06:31 +0000 (05:06 +0000)]
Add -fno-unsigned-char and ignore it. We already support -fno-signed-char, add
both flags to the driver test.

llvm-svn: 191486

11 years agoNumericLiteralParser::ParseNumberStartingWithZero(): Try to appease MSC16's miscompil...
NAKAMURA Takumi [Fri, 27 Sep 2013 04:42:28 +0000 (04:42 +0000)]
NumericLiteralParser::ParseNumberStartingWithZero(): Try to appease MSC16's miscompilation.

Investigating yet. It seems msc16 miscompiles s[1] to be folded.

llvm-svn: 191485

11 years agoSema: Respect -fdelayed-template-parsing when parsing constexpr functions
David Majnemer [Fri, 27 Sep 2013 04:14:12 +0000 (04:14 +0000)]
Sema: Respect -fdelayed-template-parsing when parsing constexpr functions

Functions declared as constexpr must have their parsing delayed in
-fdelayed-template-parsing mode so as not to upset later template
instantiation.

N.B. My reading of the standard makes it seem like delayed template
parsing is at odds with constexpr.  We may want to make refinements in
other places in clang to make constexpr play nicer with this feature.

This fixes PR17334.

llvm-svn: 191484

11 years agoRemove some stray underscores from copyright block. Fix first line length to match...
Craig Topper [Fri, 27 Sep 2013 03:57:18 +0000 (03:57 +0000)]
Remove some stray underscores from copyright block. Fix first line length to match length of the one after the copyright block.

llvm-svn: 191483

11 years agotsan: support allocator_may_return_null flag
Dmitry Vyukov [Fri, 27 Sep 2013 02:31:23 +0000 (02:31 +0000)]
tsan: support allocator_may_return_null flag
Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=29

llvm-svn: 191482

11 years agoFixing Intel format of the vshufpd instruction.
Yunzhong Gao [Fri, 27 Sep 2013 01:44:23 +0000 (01:44 +0000)]
Fixing Intel format of the vshufpd instruction.
Phabricator code review is located at: http://llvm-reviews.chandlerc.com/D1759

llvm-svn: 191481

11 years agoRevert "llvm-objdump: Dump COFF import table if -private-headers option is given."
Rui Ueyama [Fri, 27 Sep 2013 01:29:36 +0000 (01:29 +0000)]
Revert "llvm-objdump: Dump COFF import table if -private-headers option is given."

This reverts commit r191472 because it's failing on BE machine.

llvm-svn: 191480

11 years agoRevert "[PECOFF] Add a test for the import table."
Rui Ueyama [Fri, 27 Sep 2013 01:26:53 +0000 (01:26 +0000)]
Revert "[PECOFF] Add a test for the import table."

This reverts r191469 because the original patch this one depends on (r191472)
was reverted.

llvm-svn: 191479

11 years agoFactor the code that was eliminating redundant breakpoint locations and moving
Jim Ingham [Fri, 27 Sep 2013 01:16:58 +0000 (01:16 +0000)]
Factor the code that was eliminating redundant breakpoint locations and moving
line breakpoints past the prologue of functions so it can be shared between the
file & line breakpoint resolver, and the source pattern breakpoint resolver,
and then share it.

llvm-svn: 191478

11 years agoDWARF says line number 0 is a valid line number - used to indicate a source line...
Jim Ingham [Fri, 27 Sep 2013 01:15:46 +0000 (01:15 +0000)]
DWARF says line number 0 is a valid line number - used to indicate a source line that should
not have breakpoints set on it inserted into code that does have a valid line number.  So allow
that line number, and the ThreadPlanStepRange should just continue stepping over 0 line ranges
as if they had the same line number as whatever we were previously stepping through.

llvm-svn: 191477

11 years agoRemove unnecessary checks for thread_plan_sp (we check for this at the top of the...
Jim Ingham [Fri, 27 Sep 2013 01:13:01 +0000 (01:13 +0000)]
Remove unnecessary checks for thread_plan_sp (we check for this at the top of the function.)

llvm-svn: 191476

11 years ago[PECOFF] Add a test for the import table.
Rui Ueyama [Fri, 27 Sep 2013 00:56:37 +0000 (00:56 +0000)]
[PECOFF] Add a test for the import table.

llvm-svn: 191475

11 years agoFix another -Wnon-pod-varargs error in r191472.
Rui Ueyama [Fri, 27 Sep 2013 00:53:07 +0000 (00:53 +0000)]
Fix another -Wnon-pod-varargs error in r191472.

llvm-svn: 191474

11 years agoFix -Wnon-pod-varargs error in r191472.
Rui Ueyama [Fri, 27 Sep 2013 00:20:53 +0000 (00:20 +0000)]
Fix -Wnon-pod-varargs error in r191472.

llvm-svn: 191473

11 years agollvm-objdump: Dump COFF import table if -private-headers option is given.
Rui Ueyama [Fri, 27 Sep 2013 00:07:01 +0000 (00:07 +0000)]
llvm-objdump: Dump COFF import table if -private-headers option is given.

This is a patch to add capability to llvm-objdump to dump COFF Import Table
entries, so that we can write tests for LLD checking Import Table contents.

llvm-objdump did not print anything but just file name if the format is COFF
and -private-headers option is given. This is a patch adds capability for
dumping DLL Import Table, which is specific to the COFF format.

In this patch I defined a new iterator to iterate over import table entries.
Also added a few functions to COFFObjectFile.cpp to access fields of the entry.

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

llvm-svn: 191472

11 years agoMCParser/Debug info: Accept line number 0 as a legitimate value, since
Adrian Prantl [Thu, 26 Sep 2013 23:37:11 +0000 (23:37 +0000)]
MCParser/Debug info: Accept line number 0 as a legitimate value, since
CFE produces it to indicate artificial locations.
c.f.: DWARF standard, Table 6.2:
line -- An unsigned integer indicating a source line number. Lines are numbered beginning at 1. The compiler may emit the value 0 in cases where an instruction cannot be attributed to any source line.

llvm-svn: 191471

11 years agoMark 32/64-bit tests as expected fail after root causing and referencing bugzilla.
Matt Kopec [Thu, 26 Sep 2013 23:30:59 +0000 (23:30 +0000)]
Mark 32/64-bit tests as expected fail after root causing and referencing bugzilla.
Fix TestFrames.py error to check against a None pc value.

llvm-svn: 191470

11 years ago[PECOFF] Enable input file logging if /debug is given.
Rui Ueyama [Thu, 26 Sep 2013 22:46:04 +0000 (22:46 +0000)]
[PECOFF] Enable input file logging if /debug is given.

llvm-svn: 191469

11 years agoObjectiveC migrator: Donlt annotate NS_RETURNS_INNER_POINTER
Fariborz Jahanian [Thu, 26 Sep 2013 22:43:41 +0000 (22:43 +0000)]
ObjectiveC migrator: Donlt annotate NS_RETURNS_INNER_POINTER
on class methods, as it makes no sense. // rdar://15069200

llvm-svn: 191468

11 years ago[ELF] Add COPY relocations.
Michael J. Spencer [Thu, 26 Sep 2013 22:09:16 +0000 (22:09 +0000)]
[ELF] Add COPY relocations.

llvm-svn: 191467

11 years ago[Core] Add type and size to SharedLibraryAtom.
Michael J. Spencer [Thu, 26 Sep 2013 22:08:43 +0000 (22:08 +0000)]
[Core] Add type and size to SharedLibraryAtom.

llvm-svn: 191466

11 years agoObjectiveC migrator: function pointer is not an
Fariborz Jahanian [Thu, 26 Sep 2013 21:43:47 +0000 (21:43 +0000)]
ObjectiveC migrator: function pointer is not an
inner pointer for annotation to
objc_returns_inner_pointer purposes.
// rdar://15044991

llvm-svn: 191465

11 years agoDebug info: Fix a crash when trying to construct a type with redundant
Adrian Prantl [Thu, 26 Sep 2013 21:35:50 +0000 (21:35 +0000)]
Debug info: Fix a crash when trying to construct a type with redundant
ownership qualifiers.
Fixes rdar://problem/14990656.

llvm-svn: 191463

11 years agoRemove an unused variable - thanks to Nick Lewycky for pointing this out!
Faisal Vali [Thu, 26 Sep 2013 21:32:23 +0000 (21:32 +0000)]
Remove an unused variable - thanks to Nick Lewycky for pointing this out!

llvm-svn: 191462

11 years ago[mips][msa] Direct Object Emission for 3RF instructions.
Jack Carter [Thu, 26 Sep 2013 21:31:43 +0000 (21:31 +0000)]
[mips][msa] Direct Object Emission for 3RF instructions.

Patch by Matheus Almeida

llvm-svn: 191461

11 years ago[mips][msa] Updates encoding of 3RF instructions to match the latest revision of...
Jack Carter [Thu, 26 Sep 2013 21:18:57 +0000 (21:18 +0000)]
[mips][msa] Updates encoding of 3RF instructions to match the latest revision of the MSA spec (1.06).

This does not affect any of the existing output.

Patch by Matheus Almeida

llvm-svn: 191460

11 years agoFix error recovery when a return type correction includes a new name specifier.
Kaelyn Uhrain [Thu, 26 Sep 2013 21:13:05 +0000 (21:13 +0000)]
Fix error recovery when a return type correction includes a new name specifier.

llvm-svn: 191459

11 years agoFix up fallout from r187156.
Bob Wilson [Thu, 26 Sep 2013 21:00:51 +0000 (21:00 +0000)]
Fix up fallout from r187156.

The previous change caused the driver to translate -Wa,-L to the
-msave-temp-labels option for cc1as, but cc1as did not accept that option.
This patch follows the same approach used for similar options (-relax-all,
-noexecstack) in the previous patch.

llvm-svn: 191458

11 years agoFix the thread jump test case for 32-bit inferiors. A jump was going back to a functi...
Matt Kopec [Thu, 26 Sep 2013 20:54:17 +0000 (20:54 +0000)]
Fix the thread jump test case for 32-bit inferiors. A jump was going back to a function call using a source line number. However, the parameters being passed to the function were setup before the instruction we jumped to. In other words, the source line was associated with assembly after the function parameters had been setup for the function to be called.

llvm-svn: 191457

11 years agomissed one Close () call in 191446 overload fix for Posix only code.
Carlo Kok [Thu, 26 Sep 2013 20:22:28 +0000 (20:22 +0000)]
missed one Close () call in 191446 overload fix for Posix only code.

llvm-svn: 191455

11 years agoFix the command name in the syntax text for _regexp-list
Ben Langmuir [Thu, 26 Sep 2013 20:00:01 +0000 (20:00 +0000)]
Fix the command name in the syntax text for _regexp-list

llvm-svn: 191454

11 years agoImplement a rudimentary form of generic lambdas.
Faisal Vali [Thu, 26 Sep 2013 19:54:12 +0000 (19:54 +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
  - generic lambdas within template functions and nested
    within other generic lambdas
  - conversion operator for captureless lambdas
  - ensuring all visitors are generic lambda aware
  (Although I have gotten some useful feedback on my patches of the above and will be incorporating that as I submit those patches for commit)

As an example of what compiles through this commit:

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.

This patch has been reviewed by Doug and Richard.  Minor changes (non-functionality affecting) have been made since both of them formally looked at it, but the changes involve removal of supernumerary return type deduction changes (since they are now redundant, with richard having committed a recent patch to address return type deduction for C++11 lambdas using C++14 semantics).

Some implementation notes:

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

  - 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 SemaType.cpp::ConvertDeclSpecToType may use it to immediately
    generate a template-parameter-type when 'auto' is parsed in a generic
    lambda parameter context.  (i.e we do NOT use AutoType deduced to
    a template parameter type - Richard seemed ok with this approach).
    We encode that this template type was generated from an auto by simply
    adding $auto to the name which can be used for better diagnostics if needed.

  - 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.

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

There is obviously more work to be done, and both Richard (weakly) and Doug (strongly)
have requested that LambdaExpr be removed form the CXXRecordDecl LambdaDefinitionaData
in a future patch which is forthcoming.

A greatful thanks to all reviewers including Eli Friedman, James Dennett,
and especially the two gracious wizards (Richard Smith and Doug Gregor)
who spent hours providing feedback (in person in Chicago and on the mailing lists).
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: 191453

11 years agoFix a couple of typos in the help text for disassemble
Ben Langmuir [Thu, 26 Sep 2013 19:53:03 +0000 (19:53 +0000)]
Fix a couple of typos in the help text for disassemble

llvm-svn: 191452

11 years agoclang-modernize: Fixing a few left over cpp11-migrate references
Edwin Vane [Thu, 26 Sep 2013 19:26:58 +0000 (19:26 +0000)]
clang-modernize: Fixing a few left over cpp11-migrate references

Build files for unit tests hadn't been updated yet.

llvm-svn: 191451

11 years agoFix a bug in the typo correction replacement location.
Kaelyn Uhrain [Thu, 26 Sep 2013 19:10:34 +0000 (19:10 +0000)]
Fix a bug in the typo correction replacement location.

I noticed the wrong text was being replaced with the correction while
working on expanding the "namespace-aware" typo correction to include
classes.

llvm-svn: 191450

11 years agoTeach typo correction to look inside of classes like it does namespaces.
Kaelyn Uhrain [Thu, 26 Sep 2013 19:10:29 +0000 (19:10 +0000)]
Teach typo correction to look inside of classes like it does namespaces.

Unlike with namespaces, searching inside of classes requires also
checking the access to correction candidates (i.e. don't suggest a
correction to a private class member for a correction occurring outside
that class and its methods or friends).

Included is a small (one line) fix for a bug, that was uncovered while
cleaning up the unit tests, where the decls from a TypoCorrection candidate
were preserved in new TypoCorrection candidates that are derived (copied)
from the old TypoCorrection--notably when creating a new candidate by
changing the NestedNameSpecifier associated with the base idenitifer.

llvm-svn: 191449

11 years agoclang-modernize: Reset LoopConvert's TU tracking info per TU
Edwin Vane [Thu, 26 Sep 2013 19:10:04 +0000 (19:10 +0000)]
clang-modernize: Reset LoopConvert's TU tracking info per TU

The LoopConvert transform makes use of data structures it builds up over
the course of transforming a TU. Until now, these data structures
weren't being cleared out before the next TU was being processed.

Fixes PR17253.

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

llvm-svn: 191448

11 years agoOn Windows MapViewOfFile requires the offset to be aligned on the system dwAllocation...
Carlo Kok [Thu, 26 Sep 2013 18:52:08 +0000 (18:52 +0000)]
On Windows MapViewOfFile requires the offset to be aligned on the system dwAllocationGranularity

llvm-svn: 191447

11 years agoOn windows a socket and file descriptor aren't the same kind of handle, pass the...
Carlo Kok [Thu, 26 Sep 2013 18:49:53 +0000 (18:49 +0000)]
On windows a socket and file descriptor aren't the same kind of handle, pass the type to Close so it uses the right api to close it.

llvm-svn: 191446

11 years agotsan: fix scanf interceptor
Dmitry Vyukov [Thu, 26 Sep 2013 18:38:54 +0000 (18:38 +0000)]
tsan: fix scanf interceptor

llvm-svn: 191445

11 years agoAdd macro test from N3781.
Richard Smith [Thu, 26 Sep 2013 18:15:22 +0000 (18:15 +0000)]
Add macro test from N3781.

llvm-svn: 191444

11 years agoPer updates to D3781, allow underscore under ' in a pp-number, and allow ' in a ...
Richard Smith [Thu, 26 Sep 2013 18:13:20 +0000 (18:13 +0000)]
Per updates to D3781, allow underscore under ' in a pp-number, and allow ' in a #line directive.

llvm-svn: 191443

11 years agoclang-cl: Add /FI (forced include) as an alias for -include
Reid Kleckner [Thu, 26 Sep 2013 17:41:14 +0000 (17:41 +0000)]
clang-cl: Add /FI (forced include) as an alias for -include

Patch by Jeff Muizelaar, with added test case.

llvm-svn: 191442

11 years agoFix PR 17372: Emitting PLD for stack address for ARM Thumb2
Weiming Zhao [Thu, 26 Sep 2013 17:25:10 +0000 (17:25 +0000)]
Fix PR 17372: Emitting PLD for stack address for ARM Thumb2

t2PLDi12, t2PLDi8, t2PLDs was omitted in Thumb2InstrInfo.
This patch fixes it.

llvm-svn: 191441

11 years ago[PowerPC] Fix PR17354: Generate nop after local calls for PIC code.
Bill Schmidt [Thu, 26 Sep 2013 17:09:28 +0000 (17:09 +0000)]
[PowerPC] Fix PR17354: Generate nop after local calls for PIC code.

When generating code for shared libraries, even local calls may be
intercepted, so we need a nop after the call for the linker to fix up the
TOC.  Test case adapted from the one provided in PR17354.

llvm-svn: 191440

11 years ago[driver] Ignore -fno-var-tracking; it's a GCC option we don't support.
Jordan Rose [Thu, 26 Sep 2013 17:03:34 +0000 (17:03 +0000)]
[driver] Ignore -fno-var-tracking; it's a GCC option we don't support.

-fvar-tracking (which IIUC is on by default in GCC) will still generate
an error.

llvm-svn: 191439

11 years agoRevert r191393 since it caused pr17380.
Andrea Di Biagio [Thu, 26 Sep 2013 16:54:01 +0000 (16:54 +0000)]
Revert r191393 since it caused pr17380.

llvm-svn: 191438

11 years agoRemove fno_builtin_strcat and fno_builtin_strcpy.
Rafael Espindola [Thu, 26 Sep 2013 16:45:27 +0000 (16:45 +0000)]
Remove fno_builtin_strcat and fno_builtin_strcpy.

They are already handled by the generic fno_bultin_, which also
avoids unused warnings.

llvm-svn: 191437

11 years agoMark an impossible path as unreachable to pacify GCC.
Benjamin Kramer [Thu, 26 Sep 2013 16:36:08 +0000 (16:36 +0000)]
Mark an impossible path as unreachable to pacify GCC.

llvm-svn: 191436

11 years agoRemove -fbuiltin-strcat and -fbuiltin-strcpy.
Rafael Espindola [Thu, 26 Sep 2013 16:21:53 +0000 (16:21 +0000)]
Remove -fbuiltin-strcat and -fbuiltin-strcpy.

These options don't exist in gcc and clang was not handling them.

llvm-svn: 191435

11 years agoIgnore unknown -fno-builtin-*.
Rafael Espindola [Thu, 26 Sep 2013 16:15:40 +0000 (16:15 +0000)]
Ignore unknown -fno-builtin-*.

This matches gcc's behavior.

llvm-svn: 191434

11 years agoRemove unused parameter.
Rafael Espindola [Thu, 26 Sep 2013 15:52:26 +0000 (15:52 +0000)]
Remove unused parameter.

llvm-svn: 191433

11 years ago[Sparc] Implements exception handling in SPARC with DwarfCFI.
Venkatraman Govindaraju [Thu, 26 Sep 2013 15:11:00 +0000 (15:11 +0000)]
[Sparc] Implements exception handling in SPARC with DwarfCFI.

llvm-svn: 191432

11 years agoImplements parsing and emitting of .cfi_window_save in MC.
Venkatraman Govindaraju [Thu, 26 Sep 2013 14:49:40 +0000 (14:49 +0000)]
Implements parsing and emitting of .cfi_window_save in MC.

llvm-svn: 191431

11 years agoFix the partial backtrace in a recursive inferior compiled with -fomit-frame-pointer.
Ashok Thirumurthi [Thu, 26 Sep 2013 14:35:59 +0000 (14:35 +0000)]
Fix the partial backtrace in a recursive inferior compiled with -fomit-frame-pointer.

- Removes the block in UnwindLLDB::AddOneMoreFrame that tests for a bad stack setup,
since it is neither correct (tests the FP GPR), complete (doesn't consider multi-frame
cycles), nor reachable (the construction of RegisterContextLLDB will fail in the case
where either of the two (why just two?) previous frames have the same canonical frame
address as the frame that we propose adding to the stack).

llvm-svn: 191430

11 years agoIgnore some -f options that are supported by gcc.
Rafael Espindola [Thu, 26 Sep 2013 13:10:14 +0000 (13:10 +0000)]
Ignore some -f options that are supported by gcc.

It is possible that we should say some of these are unsupported, but this is
not any worse than the old behavior of ignoring all unknown -f options.

llvm-svn: 191429

11 years ago[ARM] Use the load-acquire/store-release instructions optimally in AArch32.
Amara Emerson [Thu, 26 Sep 2013 12:22:36 +0000 (12:22 +0000)]
[ARM] Use the load-acquire/store-release instructions optimally in AArch32.

Patch by Artyom Skrobov.

llvm-svn: 191428

11 years agoRemove tabs.
Benjamin Kramer [Thu, 26 Sep 2013 12:16:47 +0000 (12:16 +0000)]
Remove tabs.

llvm-svn: 191427

11 years agoPPC: Allow partial fills in writeNopData()
David Majnemer [Thu, 26 Sep 2013 09:18:48 +0000 (09:18 +0000)]
PPC: Allow partial fills in writeNopData()

When asked to pad an irregular number of bytes, we should fill with
zeros.  This is consistent with the behavior specified in the AIX
Assembler Language Reference as well as other LLVM and binutils
assemblers.

N.B. There is a small deviation from binutils' PPC assembler:
when handling pads which are greater than 4 bytes but not mod 4,
binutils will not emit any NOP sequences at all and only use zeros.
This may or may not be a bug but there is no excellent rationale as to
why that behavior is important to emulate.  If that behavior is needed,
we can change writeNopData() to behave in the same way.

This fixes PR17352.

llvm-svn: 191426

11 years agoAdd links to cross-compilation docs from getting started
Renato Golin [Thu, 26 Sep 2013 08:57:07 +0000 (08:57 +0000)]
Add links to cross-compilation docs from getting started

llvm-svn: 191425

11 years agoFix buildbot breakage.
Richard Smith [Thu, 26 Sep 2013 05:57:03 +0000 (05:57 +0000)]
Fix buildbot breakage.

llvm-svn: 191424

11 years agoAdded temp flag -misched-bench for staging in default changes.
Andrew Trick [Thu, 26 Sep 2013 05:53:35 +0000 (05:53 +0000)]
Added temp flag -misched-bench for staging in default changes.

llvm-svn: 191423

11 years agowhitespace
Andrew Trick [Thu, 26 Sep 2013 05:53:31 +0000 (05:53 +0000)]
whitespace

llvm-svn: 191422

11 years agoPPC: Do not introduce ISD nodes for fctid and fctiw
David Majnemer [Thu, 26 Sep 2013 05:22:11 +0000 (05:22 +0000)]
PPC: Do not introduce ISD nodes for fctid and fctiw

llvm-svn: 191421

11 years agoReplace a bool with an enum for clarity, based on review comment from James Dennett.
Richard Smith [Thu, 26 Sep 2013 04:19:11 +0000 (04:19 +0000)]
Replace a bool with an enum for clarity, based on review comment from James Dennett.

llvm-svn: 191420

11 years agoPPC: Add support for fctid and fctiw
David Majnemer [Thu, 26 Sep 2013 04:11:24 +0000 (04:11 +0000)]
PPC: Add support for fctid and fctiw

Encodings were checked against the Power ISA documents and double
checked against binutils.

This fixes PR17350.

llvm-svn: 191419

11 years agoIf a partial specialization of a member template is declared within a class
Richard Smith [Thu, 26 Sep 2013 03:49:48 +0000 (03:49 +0000)]
If a partial specialization of a member template is declared within a class
template and defined outside it, don't instantiate it twice when instantiating
the surrounding class template specialization. That would cause us to reject
the code because we think two partial specializations instantiated to produce
the same signature.

llvm-svn: 191418

11 years agoImplement C++1y digit separator proposal (' as a digit separator). This is not
Richard Smith [Thu, 26 Sep 2013 03:33:06 +0000 (03:33 +0000)]
Implement C++1y digit separator proposal (' as a digit separator). This is not
yet approved by full committee, but was unanimously supported by EWG.

llvm-svn: 191417

11 years ago[OPENMP] Improved variable lookup procedure for threadprivate variables.
Alexey Bataev [Thu, 26 Sep 2013 03:24:06 +0000 (03:24 +0000)]
[OPENMP] Improved variable lookup procedure for threadprivate variables.

llvm-svn: 191416

11 years ago[mips][msa] Direct Object Emission for 3R instructions.
Jack Carter [Thu, 26 Sep 2013 00:09:46 +0000 (00:09 +0000)]
[mips][msa] Direct Object Emission for 3R instructions.

This is the first set of instructions with a ".b" modifier thus we need to add the required code to disassemble a MSA128B register class.

Patch by Matheus Almeida

llvm-svn: 191415

11 years ago[mips][msa] Updates encoding of 3R instructions to match the latest revision of the...
Jack Carter [Thu, 26 Sep 2013 00:02:44 +0000 (00:02 +0000)]
[mips][msa] Updates encoding of 3R instructions to match the latest revision of the MSA spec (1.06).

Internal changes only.

Patch by Matheus Almeida

llvm-svn: 191414

11 years ago[mips][msa] Direct Object Emission for 2RF instructions.
Jack Carter [Wed, 25 Sep 2013 23:56:25 +0000 (23:56 +0000)]
[mips][msa] Direct Object Emission for 2RF instructions.

Patch by Matheus Almeida

llvm-svn: 191413

11 years ago[mips][msa] Direct Object Emission support for the MSA instruction set.
Jack Carter [Wed, 25 Sep 2013 23:50:44 +0000 (23:50 +0000)]
[mips][msa] Direct Object Emission support for the MSA instruction set.

In more detail, this patch adds the ability to parse, encode and decode MSA registers ($w0-$w31). The format of 2RF instructions (MipsMSAInstrFormat.td) was updated so that we could attach a test case to this patch i.e., the test case parses, encodes and decodes 2 MSA instructions. Following patches will add the remainder of the instructions.

Note that DecodeMSA128BRegisterClass is missing from MipsDisassembler.td because it's not yet required at this stage and having it would cause a compiler warning (unused function).

Patch by Matheus Almeida

llvm-svn: 191412

11 years ago[mips][msa] Updates encoding of 2RF instructions to match the latest revision of...
Jack Carter [Wed, 25 Sep 2013 23:42:03 +0000 (23:42 +0000)]
[mips][msa] Updates encoding of 2RF instructions to match the latest revision of the MSA spec (1.06).

This only changes internal encodings and doesn't affect output.

Patch by Matheus Almeida

llvm-svn: 191411

11 years agoFix PR 17368: disable vector mul distribution for square of add/sub for ARM
Weiming Zhao [Wed, 25 Sep 2013 23:12:06 +0000 (23:12 +0000)]
Fix PR 17368: disable vector mul distribution for square of add/sub for ARM

Generally, it is desirable to distribute (a + b) * c to a*c + b*c for
ARM with VMLx forwarding, where a, b and c are vectors.
However, for (a + b)*(a + b), distribution will result in one extra
instruction.
With distribution:
  x = a + b (add)
  y = a * x (mul)
  z = y + b * y (mla)

Without distribution:
  x = a + b (add)
  z = x * x (mul)

This patch checks if a mul is a square of add/sub. If yes, skip
distribution.

llvm-svn: 191410

11 years agoAdd gnu pubsections as options to llvm-dwarfdump.
Eric Christopher [Wed, 25 Sep 2013 23:02:44 +0000 (23:02 +0000)]
Add gnu pubsections as options to llvm-dwarfdump.

Argument spelling feedback welcome.

llvm-svn: 191409

11 years agoDump the normal dwarf pubtypes section as well.
Eric Christopher [Wed, 25 Sep 2013 23:02:41 +0000 (23:02 +0000)]
Dump the normal dwarf pubtypes section as well.

llvm-svn: 191408

11 years agoUnify pubsection/gnu pubsection printing.
Eric Christopher [Wed, 25 Sep 2013 23:02:36 +0000 (23:02 +0000)]
Unify pubsection/gnu pubsection printing.

llvm-svn: 191407

11 years agoProvide inline definitions of _Unwind_GetIP etc. for ARM in unwind.h
Hans Wennborg [Wed, 25 Sep 2013 22:34:03 +0000 (22:34 +0000)]
Provide inline definitions of _Unwind_GetIP etc. for ARM in unwind.h

These symbols were showing up as undefined when trying to link programs on
Android. We should match libgcc's behaviour and provide inline definitions
of these on ARM.

It seems unwind.h on ARM/Darwin doesn't provide inline definitions, so we
just declare them for that platform.

llvm-svn: 191406

11 years agoRemove unused param from MicrosoftMangle::mangleCallingConvention()
Reid Kleckner [Wed, 25 Sep 2013 22:28:52 +0000 (22:28 +0000)]
Remove unused param from MicrosoftMangle::mangleCallingConvention()

llvm-svn: 191405

11 years agoUpdate NumTypeBits on Type to match the actual number of used bits.
Mark Lacey [Wed, 25 Sep 2013 22:25:21 +0000 (22:25 +0000)]
Update NumTypeBits on Type to match the actual number of used bits.

llvm-svn: 191404

11 years ago[ELF] Fix use after free.
Michael J. Spencer [Wed, 25 Sep 2013 22:12:14 +0000 (22:12 +0000)]
[ELF] Fix use after free.

llvm-svn: 191403

11 years agoTest commit. Removed trailing whitespace.
Josh Magee [Wed, 25 Sep 2013 22:07:48 +0000 (22:07 +0000)]
Test commit.  Removed trailing whitespace.

llvm-svn: 191402

11 years agoSlight formatting change for pubnames/pubtypes output.
Eric Christopher [Wed, 25 Sep 2013 21:17:37 +0000 (21:17 +0000)]
Slight formatting change for pubnames/pubtypes output.

llvm-svn: 191401