platform/upstream/llvm.git
10 years agoMove AArch64InstrInfo to AArch64Subtarget.
Eric Christopher [Tue, 10 Jun 2014 22:57:25 +0000 (22:57 +0000)]
Move AArch64InstrInfo to AArch64Subtarget.

llvm-svn: 210599

10 years agoRemove a method that was just replacing direct access to a member.
Eric Christopher [Tue, 10 Jun 2014 22:57:21 +0000 (22:57 +0000)]
Remove a method that was just replacing direct access to a member.

llvm-svn: 210598

10 years agolit: warn when passed invalid pathname
Hans Wennborg [Tue, 10 Jun 2014 22:51:58 +0000 (22:51 +0000)]
lit: warn when passed invalid pathname

It would previously say things like

  warning: input 'test/Frontend/foo.c' contained no tests

and have the user pull their hair trying to figure out what's wrong with that
file. This patch changes the message to the much clearer:

  warning: no such file or directory: 'test/Frontend/foo.c'

Differential Revision: http://reviews.llvm.org/D4097

llvm-svn: 210597

10 years agoRemove the use of TargetMachine from X86InstrInfo.
Eric Christopher [Tue, 10 Jun 2014 22:34:31 +0000 (22:34 +0000)]
Remove the use of TargetMachine from X86InstrInfo.

llvm-svn: 210596

10 years agoMove X86RegisterInfo away from using the TargetMachine and only
Eric Christopher [Tue, 10 Jun 2014 22:34:28 +0000 (22:34 +0000)]
Move X86RegisterInfo away from using the TargetMachine and only
using the subtarget.

llvm-svn: 210595

10 years agoAdded gdb-remote test to verify M memory write.
Todd Fiala [Tue, 10 Jun 2014 22:15:56 +0000 (22:15 +0000)]
Added gdb-remote test to verify M memory write.

llvm-svn: 210594

10 years ago*Really* fix DOS newlines introduced in r210330
Reid Kleckner [Tue, 10 Jun 2014 21:35:24 +0000 (21:35 +0000)]
*Really* fix DOS newlines introduced in r210330

r210369 didn't quite catch all of them.

llvm-svn: 210593

10 years agoRemove duplicated code
Ed Maste [Tue, 10 Jun 2014 21:33:43 +0000 (21:33 +0000)]
Remove duplicated code

We preivously had two copies of ::BytesAvailable with only trivial
differences between them, and fixes have been applied to only one of
them.

Instead of duplicating the whole function, hide the FD_SET differences
behind a macro.  This leaves only one small __APPLE__-specific #if
block, and fixes ^C on non-__APPLE__ platforms.

llvm-svn: 210592

10 years agoMark a few functions noexcept.
Rafael Espindola [Tue, 10 Jun 2014 21:26:47 +0000 (21:26 +0000)]
Mark a few functions noexcept.

This reduces the difference between std::error_code and llvm::error_code.

llvm-svn: 210591

10 years agoMark a few functions noexcept.
Rafael Espindola [Tue, 10 Jun 2014 21:26:18 +0000 (21:26 +0000)]
Mark a few functions noexcept.

llvm-svn: 210590

10 years agoUse the TargetMachine on the DAG or the MachineFunction instead
Eric Christopher [Tue, 10 Jun 2014 21:25:13 +0000 (21:25 +0000)]
Use the TargetMachine on the DAG or the MachineFunction instead
of using the cached TargetMachine.

llvm-svn: 210589

10 years agoR600/SI: Emit an error when attempting to spill VGPRs v4
Tom Stellard [Tue, 10 Jun 2014 21:20:41 +0000 (21:20 +0000)]
R600/SI: Emit an error when attempting to spill VGPRs v4

I can't get VGPR spilling to work reliable, so for now just emit
an error when the register allocator tries to spill VGPRs.

v2:
  - Fix build
v3:
  - Added crash fix when spilling SPGRs
v4:
  - Use V_MOV_B32 as a dummy instruction instead of S_NOP

Patch by: Darren Powell

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

llvm-svn: 210588

10 years agoR600/SI: Fix a crash when spilling SGPRs
Tom Stellard [Tue, 10 Jun 2014 21:20:38 +0000 (21:20 +0000)]
R600/SI: Fix a crash when spilling SGPRs

We need to make sure only one new instruction is added when spilling
otherwise the register allocator may crash.

This fixes a crash in the game Antichamber.

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

llvm-svn: 210587

10 years agoTry to fix clang-hexagon-elf failure by requiring x86 support for this test.
Bob Wilson [Tue, 10 Jun 2014 21:15:17 +0000 (21:15 +0000)]
Try to fix clang-hexagon-elf failure by requiring x86 support for this test.

llvm-svn: 210586

10 years agoPR19992: alignof is permitted on an array of unknown bound.
Richard Smith [Tue, 10 Jun 2014 21:11:26 +0000 (21:11 +0000)]
PR19992: alignof is permitted on an array of unknown bound.

llvm-svn: 210585

10 years agoFix crash with x86_64-pc-win32-macho target. <rdar://problem/17235840>
Bob Wilson [Tue, 10 Jun 2014 21:07:12 +0000 (21:07 +0000)]
Fix crash with x86_64-pc-win32-macho target. <rdar://problem/17235840>

The changes in r204978 broke win32-macho targets. There were checks added for
MSVC and Itanium environments as special cases, and win32-macho needs to be
treated the same way.

llvm-svn: 210584

10 years agoRemove a redundant conditional when caching typo failures.
Kaelyn Takata [Tue, 10 Jun 2014 21:03:49 +0000 (21:03 +0000)]
Remove a redundant conditional when caching typo failures.

No functionality change.

llvm-svn: 210583

10 years agoDo not predefine __EXCEPTIONS in clang-cl (PR19977)
Hans Wennborg [Tue, 10 Jun 2014 20:46:38 +0000 (20:46 +0000)]
Do not predefine __EXCEPTIONS in clang-cl (PR19977)

Patch by Ehsan Akhgari! (Test tweak by me.)

Differential Revision: http://reviews.llvm.org/D4065

llvm-svn: 210582

10 years agoAdd a LLVM_NOEXCEPT to Compiler.h.
Rafael Espindola [Tue, 10 Jun 2014 20:45:52 +0000 (20:45 +0000)]
Add a LLVM_NOEXCEPT to Compiler.h.

This will be needed for the switch to std::error_code.

llvm-svn: 210581

10 years agoWe already have a reference to the TargetMachine, use that.
Eric Christopher [Tue, 10 Jun 2014 20:39:39 +0000 (20:39 +0000)]
We already have a reference to the TargetMachine, use that.

llvm-svn: 210580

10 years agoHave isInTailCallPosition take the DAG so that we can use the
Eric Christopher [Tue, 10 Jun 2014 20:39:38 +0000 (20:39 +0000)]
Have isInTailCallPosition take the DAG so that we can use the
version of TargetLowering/Machine from there on the way to avoiding
TargetMachine in TargetLowering.

llvm-svn: 210579

10 years agoReorder includes to be sorted.
Eric Christopher [Tue, 10 Jun 2014 20:39:35 +0000 (20:39 +0000)]
Reorder includes to be sorted.

llvm-svn: 210578

10 years agofixes duplicate header installation
David Fang [Tue, 10 Jun 2014 20:26:54 +0000 (20:26 +0000)]
fixes duplicate header installation
http://llvm.org/bugs/show_bug.cgi?id=18681
Patch by Ryuta Suzuki <oroppas gmail com>

llvm-svn: 210577

10 years agowww: Fix grammar.
Tobias Grosser [Tue, 10 Jun 2014 20:18:16 +0000 (20:18 +0000)]
www: Fix grammar.

Reported-by: Jules Gagnon-Marchand <jules_gagnonm@hotmail.com>
llvm-svn: 210576

10 years agoRearrange the CHECK lines in this test to make failure more obvious.
Reid Kleckner [Tue, 10 Jun 2014 20:16:47 +0000 (20:16 +0000)]
Rearrange the CHECK lines in this test to make failure more obvious.

llvm-svn: 210575

10 years agoRevert "Patch by Ray Donnelly to print register names instead of numbers."
Reid Kleckner [Tue, 10 Jun 2014 20:16:36 +0000 (20:16 +0000)]
Revert "Patch by Ray Donnelly to print register names instead of numbers."

This reverts commit r206683.

The code was confusing SEH register numbers with DWARF register numbers.
The test case it was committed with was obviously incorrect.  The
disassembler was roundtripping '.seh_pushreg %rsi' as '.seh_pushreg
%rbp', and other exciting things.

Noticed by Vadim Chugunov.

llvm-svn: 210574

10 years agoAdded gdb-remote tests around $qSupported.
Todd Fiala [Tue, 10 Jun 2014 20:16:31 +0000 (20:16 +0000)]
Added gdb-remote tests around $qSupported.

Right now it just checks that qSupported returns at least
one recognized gdb stub feature.

llvm-svn: 210573

10 years agoFix error in tablegen when either operand of !if is an empty list.
Matt Arsenault [Tue, 10 Jun 2014 20:10:08 +0000 (20:10 +0000)]
Fix error in tablegen when either operand of !if is an empty list.

!if([Something], []) would error with "No type for list".

llvm-svn: 210572

10 years agoFix typos.
Eric Christopher [Tue, 10 Jun 2014 20:07:29 +0000 (20:07 +0000)]
Fix typos.

llvm-svn: 210571

10 years agoFix mangling of __uuidof after two levels of template instantiation
Reid Kleckner [Tue, 10 Jun 2014 20:06:25 +0000 (20:06 +0000)]
Fix mangling of __uuidof after two levels of template instantiation

llvm-svn: 210570

10 years agoR600: Use BCNT_INT for evergreen
Matt Arsenault [Tue, 10 Jun 2014 19:18:28 +0000 (19:18 +0000)]
R600: Use BCNT_INT for evergreen

llvm-svn: 210569

10 years agoR600/SI: Implement i64 ctpop
Matt Arsenault [Tue, 10 Jun 2014 19:18:24 +0000 (19:18 +0000)]
R600/SI: Implement i64 ctpop

llvm-svn: 210568

10 years agoR600/SI: Use bcnt instruction for ctpop
Matt Arsenault [Tue, 10 Jun 2014 19:18:21 +0000 (19:18 +0000)]
R600/SI: Use bcnt instruction for ctpop

llvm-svn: 210567

10 years agoUse an enum class now that they are available.
Rafael Espindola [Tue, 10 Jun 2014 19:08:21 +0000 (19:08 +0000)]
Use an enum class now that they are available.

llvm-svn: 210566

10 years agoObjective-C. Don't ignore availability attribute when
Fariborz Jahanian [Tue, 10 Jun 2014 19:02:48 +0000 (19:02 +0000)]
Objective-C. Don't ignore availability attribute when
doing Objective-C subscript access. // rdar://16842487
PR19682.

llvm-svn: 210565

10 years agoR600: Handle fcopysign
Matt Arsenault [Tue, 10 Jun 2014 19:00:20 +0000 (19:00 +0000)]
R600: Handle fcopysign

llvm-svn: 210564

10 years agoR600/SI: Handle sign_extend and zero_extend to i64 with patterns.
Matt Arsenault [Tue, 10 Jun 2014 18:54:59 +0000 (18:54 +0000)]
R600/SI: Handle sign_extend and zero_extend to i64 with patterns.

llvm-svn: 210563

10 years agoMark assign to be constepr only in c++14; can't have constexpr fns that return void...
Marshall Clow [Tue, 10 Jun 2014 18:52:57 +0000 (18:52 +0000)]
Mark assign to be constepr only in c++14; can't have constexpr fns that return void in C++11

llvm-svn: 210562

10 years agoMake the helper routines in string really be constexpr. This required a bit of refaco...
Marshall Clow [Tue, 10 Jun 2014 18:51:55 +0000 (18:51 +0000)]
Make the helper routines in string really be constexpr. This required a bit of refacoring in algorithm as well. Give them better names while we're at it. All of these are internal rotines; no visible functionality change.

llvm-svn: 210561

10 years agoA bunch of the char.traits tests were using unicode literals. #ifdef those bits out...
Marshall Clow [Tue, 10 Jun 2014 18:46:59 +0000 (18:46 +0000)]
A bunch of the char.traits tests were using unicode literals. #ifdef those bits out on c++03, since it doesn't support u"" and U "" style strings.

llvm-svn: 210560

10 years agoAdd a FIXME.
Eric Christopher [Tue, 10 Jun 2014 18:31:18 +0000 (18:31 +0000)]
Add a FIXME.

llvm-svn: 210559

10 years agoUpdate Arcanist config to point to reviews.llvm.org
David Blaikie [Tue, 10 Jun 2014 18:29:36 +0000 (18:29 +0000)]
Update Arcanist config to point to reviews.llvm.org

llvm-svn: 210558

10 years agoMove AArch64SelectionDAGInfo down to the subtarget.
Eric Christopher [Tue, 10 Jun 2014 18:21:53 +0000 (18:21 +0000)]
Move AArch64SelectionDAGInfo down to the subtarget.

llvm-svn: 210557

10 years ago[FastISel] Collect statistics about failing intrinsic calls.
Juergen Ributzka [Tue, 10 Jun 2014 18:17:00 +0000 (18:17 +0000)]
[FastISel] Collect statistics about failing intrinsic calls.

Add more instruction-specific statistics about failing intrinsic calls during
FastISel.

llvm-svn: 210556

10 years agoRemove the cached little endian variable. We can get it easily off
Eric Christopher [Tue, 10 Jun 2014 18:11:20 +0000 (18:11 +0000)]
Remove the cached little endian variable. We can get it easily off
of the DataLayout.

llvm-svn: 210555

10 years agoHave AArch64SelectionDAGInfo take a DataLayout parameter rather
Eric Christopher [Tue, 10 Jun 2014 18:06:28 +0000 (18:06 +0000)]
Have AArch64SelectionDAGInfo take a DataLayout parameter rather
than a TargetMachine.

llvm-svn: 210554

10 years agoRemove caching of the subtarget for AArch64SelectionDAGInfo.
Eric Christopher [Tue, 10 Jun 2014 18:06:25 +0000 (18:06 +0000)]
Remove caching of the subtarget for AArch64SelectionDAGInfo.

llvm-svn: 210553

10 years agoMove DataLayout onto the AArch64 subtarget.
Eric Christopher [Tue, 10 Jun 2014 18:06:23 +0000 (18:06 +0000)]
Move DataLayout onto the AArch64 subtarget.

llvm-svn: 210552

10 years agoTest commit, wraps some lines to fit in 80 columns.
Zachary Turner [Tue, 10 Jun 2014 18:03:04 +0000 (18:03 +0000)]
Test commit, wraps some lines to fit in 80 columns.

llvm-svn: 210551

10 years agoDon't inherit dll attributes to deleted methods (PR19988)
Hans Wennborg [Tue, 10 Jun 2014 17:53:23 +0000 (17:53 +0000)]
Don't inherit dll attributes to deleted methods (PR19988)

We would previously end up with an error when instantiating the
following template:

  template <typename> struct __declspec(dllimport) S {
    void foo() = delete;
  };
  S<int> s;

error: attribute 'dllimport' cannot be applied to a deleted function
llvm-svn: 210550

10 years agoMove AArch64FrameLowering into the subtarget.
Eric Christopher [Tue, 10 Jun 2014 17:44:12 +0000 (17:44 +0000)]
Move AArch64FrameLowering into the subtarget.

llvm-svn: 210549

10 years agoRemove the uses of AArch64TargetMachine and AArch64Subtarget from
Eric Christopher [Tue, 10 Jun 2014 17:33:39 +0000 (17:33 +0000)]
Remove the uses of AArch64TargetMachine and AArch64Subtarget from
AArch64FrameLowering.

llvm-svn: 210548

10 years agoObjective-C IRGen. Patch to generate a weak symbol reference when
Fariborz Jahanian [Tue, 10 Jun 2014 17:08:04 +0000 (17:08 +0000)]
Objective-C IRGen. Patch to generate a weak symbol reference when
'super' dispatches a class method in category for OBJC_METACLASS.
This is when class is a weak_import class.
// rdar://16529125

llvm-svn: 210547

10 years agoDo Materialize Floating Point in Mips Fast-Isel
Reed Kotler [Tue, 10 Jun 2014 16:45:44 +0000 (16:45 +0000)]
Do Materialize Floating Point in Mips Fast-Isel

Summary:
Implement materialize of floating point literals in Mips Fast-Isel

Reopened version of D3659

Test Plan: simplestorefp1.ll

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D4071

llvm-svn: 210546

10 years ago[X86] Improved target combine rules for selecting horizontal add/sub.
Andrea Di Biagio [Tue, 10 Jun 2014 16:42:57 +0000 (16:42 +0000)]
[X86] Improved target combine rules for selecting horizontal add/sub.

This patch slightly changes the algorithm introduced at revision 210477
to fix a problem where the algorithm was producing incorrect code for
the VEX.256 encoded versions of horizontal add/sub.

For these cases, we now try to split the two 256-bit vectors into
128-bit chunks before emitting horizontal add/sub dag nodes.

Added a new test case into haddsub-2.ll.

llvm-svn: 210545

10 years agoHexagon: Expand i1 SELECT_CC
Tom Stellard [Tue, 10 Jun 2014 16:42:41 +0000 (16:42 +0000)]
Hexagon: Expand i1 SELECT_CC

il is legal for Hexagon, so I should have marked this as Expand for
SELECT_CC when I removed setOperationAction(ISD::SELECT_CC, MVT::Other,
Expand); in r210541.

llvm-svn: 210544

10 years ago[X86] AVX512: Add vmovntdqa
Adam Nemet [Tue, 10 Jun 2014 16:39:53 +0000 (16:39 +0000)]
[X86] AVX512: Add vmovntdqa

Along with the corresponding intrinsic and tests.

llvm-svn: 210543

10 years agoFix a bug in the Thumb1 ARM Load/Store optimizer
Renato Golin [Tue, 10 Jun 2014 16:39:21 +0000 (16:39 +0000)]
Fix a bug in the Thumb1 ARM Load/Store optimizer

Previously, the basic block was searched for future uses of the base register,
and if necessary any writeback to the base register was reset using a SUB
instruction (e.g. before calling a function) just before such a use. However,
this step happened *before* the merged LDM/STM instruction was built. So if
there was (e.g.) a function call directly after the not-yet-formed LDM/STM,
the pass would first insert a SUB instruction to reset the base register,
and then (at the same location, incorrectly) insert the LDM/STM itself.

This patch fixes PR19972. Patch by Moritz Roth.

llvm-svn: 210542

10 years agoSelectionDAG: Don't use MVT::Other to determine legality of ISD::SELECT_CC
Tom Stellard [Tue, 10 Jun 2014 16:01:29 +0000 (16:01 +0000)]
SelectionDAG: Don't use MVT::Other to determine legality of ISD::SELECT_CC

The SelectionDAG bad a special case for ISD::SELECT_CC, where it would
allow targets to specify:

setOperationAction(ISD::SELECT_CC, MVT::Other, Expand);

to indicate that they wanted to expand ISD::SELECT_CC for all types.
This wasn't applied correctly everywhere, and it makes writing new
DAG patterns with ISD::SELECT_CC difficult.

llvm-svn: 210541

10 years agoSelectionDAG: Enable (and (setcc x), (setcc y)) -> (setcc (and x, y)) for vectors
Tom Stellard [Tue, 10 Jun 2014 16:01:25 +0000 (16:01 +0000)]
SelectionDAG: Enable (and (setcc x), (setcc y)) -> (setcc (and x, y)) for vectors

This prevents a future commit from regressing:

test/CodeGen/R600/setcc-equivalent.ll

llvm-svn: 210540

10 years agoSelectionDAG: Expand SELECT_CC to SELECT + SETCC
Tom Stellard [Tue, 10 Jun 2014 16:01:22 +0000 (16:01 +0000)]
SelectionDAG: Expand SELECT_CC to SELECT + SETCC

This consolidates code from the Hexagon, R600, and XCore targets.

No functionality change intended.

llvm-svn: 210539

10 years agoTest delinearization of 2D diagonal matrix
Tobias Grosser [Tue, 10 Jun 2014 14:48:17 +0000 (14:48 +0000)]
Test delinearization of 2D diagonal matrix

llvm-svn: 210538

10 years agoclang-format: [JS] Treat dict literals similar to objc method exprs.
Daniel Jasper [Tue, 10 Jun 2014 14:44:02 +0000 (14:44 +0000)]
clang-format: [JS] Treat dict literals similar to objc method exprs.

Before:
  return {
    link:
        function() {
          f();  //
        }
        };
  return {
    a: a,
    link: function() {
      f();  //
    }
  }

After:
  return {
    link: function() {
      f();  //
    }
  };
  return {
    a: a,
    link: function() {
      f();  //
    }
  };

llvm-svn: 210537

10 years ago[PPC64LE] Recognize shufflevector patterns for little endian
Bill Schmidt [Tue, 10 Jun 2014 14:35:01 +0000 (14:35 +0000)]
[PPC64LE] Recognize shufflevector patterns for little endian

Various masks on shufflevector instructions are recognizable as
specific PowerPC instructions (vector pack, vector merge, etc.).
There is existing code in PPCISelLowering.cpp to recognize the correct
patterns for big endian code.  The masks for these instructions are
different for little endian code due to the big-endian numbering
employed by these instructions.  This patch adds the recognition code
for little endian.

I've added a new test case test/CodeGen/PowerPC/vec_shuffle_le.ll for
this.  The existing recognizer test (vec_shuffle.ll) is unnecessarily
verbose and difficult to read, so I felt it was better to add a new
test rather than modify the old one.

llvm-svn: 210536

10 years ago[AArch64] Emit .ident compiler version attribute.
Chad Rosier [Tue, 10 Jun 2014 14:32:08 +0000 (14:32 +0000)]
[AArch64] Emit .ident compiler version attribute.
Patch by Ana Pazos<apazos@codeaurora.org>!

llvm-svn: 210535

10 years agoAdd detection of OS X relocatable SDK to compiler-rt as a lit.util function
Alexander Potapenko [Tue, 10 Jun 2014 14:22:00 +0000 (14:22 +0000)]
Add detection of OS X relocatable SDK to compiler-rt as a lit.util function

Clang's lit cfg already detects the currently selected SDK via
"xcrun --show-sdk-path". The same thing should be done for compiler-rt tests,
to make them work on recent OS X versions. Instead of duplicating the detection
code, this patch extracts the detection function into a lit.util method.

Patch by Kuba Brecka (kuba.brecka@gmail.com),
reviewed at http://reviews.llvm.org/D4072

llvm-svn: 210534

10 years ago[sanitizer] Relax sanity checks in ioctl decoding.
Evgeniy Stepanov [Tue, 10 Jun 2014 13:54:15 +0000 (13:54 +0000)]
[sanitizer] Relax sanity checks in ioctl decoding.

Standard KVM ioctls don't pass currect ioctl_decode().

llvm-svn: 210533

10 years ago[ReaderWriter] Simplify initialization of class fields.
Simon Atanasyan [Tue, 10 Jun 2014 13:43:24 +0000 (13:43 +0000)]
[ReaderWriter] Simplify initialization of class fields.

No functional changes.

llvm-svn: 210532

10 years ago[ELF] Fix typo in the type name of the range-based loop item.
Simon Atanasyan [Tue, 10 Jun 2014 13:43:19 +0000 (13:43 +0000)]
[ELF] Fix typo in the type name of the range-based loop item.

No functional changes.

llvm-svn: 210531

10 years ago[ELF] Fix the bug -- LLD crashes if the --whole-archive option
Simon Atanasyan [Tue, 10 Jun 2014 13:43:13 +0000 (13:43 +0000)]
[ELF] Fix the bug -- LLD crashes if the --whole-archive option
is around non-archive.

llvm-svn: 210530

10 years agoclang-format: Increase penalty for wrapping array subscript expressions
Daniel Jasper [Tue, 10 Jun 2014 13:27:57 +0000 (13:27 +0000)]
clang-format: Increase penalty for wrapping array subscript expressions

Before:
  aaaaaaaaaaa aaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaa[0].aaaaaaa
                                    [0].aaaaaaaaaaaaaaaaaaaaaa();

After:
  aaaaaaaaaaa aaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaa[0]
                                    .aaaaaaa[0]
                                    .aaaaaaaaaaaaaaaaaaaaaa();

llvm-svn: 210529

10 years agoCondition codes AL and NV are invalid in the aliases that use
Artyom Skrobov [Tue, 10 Jun 2014 13:11:35 +0000 (13:11 +0000)]
Condition codes AL and NV are invalid in the aliases that use
inverted condition codes (CINC, CINV, CNEG, CSET, and CSETM).

Matching aliases based on "immediate classes", when disassembling,
wasn't previously supported, hence adding MCOperandPredicate
into class Operand, and implementing the support for it
in AsmWriterEmitter.

The parsing for those aliases was already custom, so just adding
the missing condition into AArch64AsmParser::parseCondCode.

llvm-svn: 210528

10 years agoRefactoring in AsmWriterEmitter::EmitPrintAliasInstruction()
Artyom Skrobov [Tue, 10 Jun 2014 12:47:23 +0000 (12:47 +0000)]
Refactoring in AsmWriterEmitter::EmitPrintAliasInstruction()

llvm-svn: 210527

10 years agoAnonymous definitions in foreach blocks triggered a 'def already exists'
Artyom Skrobov [Tue, 10 Jun 2014 12:41:14 +0000 (12:41 +0000)]
Anonymous definitions in foreach blocks triggered a 'def already exists'

llvm-svn: 210526

10 years agoAArch64: disallow x30 & x29 as the destination for indirect tail calls
Tim Northover [Tue, 10 Jun 2014 10:50:24 +0000 (10:50 +0000)]
AArch64: disallow x30 & x29 as the destination for indirect tail calls

As Ana Pazos pointed out, these have to be restored to their incoming values
before a function returns; i.e. before the tail call. So they can't be used
correctly as the destination register.

llvm-svn: 210525

10 years agoRevert "X86: elide comparisons after cmpxchg instructions."
Tim Northover [Tue, 10 Jun 2014 10:50:11 +0000 (10:50 +0000)]
Revert "X86: elide comparisons after cmpxchg instructions."

This reverts commit r210523. It was committed prematurely without waiting for
review.

llvm-svn: 210524

10 years agoX86: elide comparisons after cmpxchg instructions.
Tim Northover [Tue, 10 Jun 2014 10:49:07 +0000 (10:49 +0000)]
X86: elide comparisons after cmpxchg instructions.

The C++ and C semantics of the compare_and_swap operations actually
require us to return a boolean "success" value. In LLVM terms this
means a second comparison of the output of "cmpxchg" against the input
desired value.

However, x86's "cmpxchg" instruction sets all flags for the comparison
formed, so we can skip any secondary comparison. (N.b. this isn't true
for cmpxchg8b/16b, which only set ZF).

rdar://problem/13201607

llvm-svn: 210523

10 years agoclang-format: Fix enum formatting with specific comment.
Daniel Jasper [Tue, 10 Jun 2014 10:42:26 +0000 (10:42 +0000)]
clang-format: Fix enum formatting with specific comment.

Before:
  enum Fruit {  //
    APPLE,
    PEAR };

After:
  enum Fruit {  //
    APPLE,
    PEAR
  };

llvm-svn: 210522

10 years agoProspective build fix following clang r210518
Alp Toker [Tue, 10 Jun 2014 09:58:45 +0000 (09:58 +0000)]
Prospective build fix following clang r210518

llvm-svn: 210521

10 years agoAArch64: teach FastISel how to handle offset FrameIndices
Tim Northover [Tue, 10 Jun 2014 09:52:44 +0000 (09:52 +0000)]
AArch64: teach FastISel how to handle offset FrameIndices

Previously we were abandonning the attempt, leading to some combination of
extra work (when selection of a load/store fails completely) and inferior code
(when this leads to a real memcpy call instead of inlining).

rdar://problem/17187463

llvm-svn: 210520

10 years agoAArch64: make FastISel memcpy emission more robust.
Tim Northover [Tue, 10 Jun 2014 09:52:40 +0000 (09:52 +0000)]
AArch64: make FastISel memcpy emission more robust.

We were hitting an assert if FastISel couldn't create the load or store we
requested. Currently this happens for large frame-local addresses, though
CodeGen could be improved there.

rdar://problem/17187463

llvm-svn: 210519

10 years agoImprove diagnostic mapping terminology
Alp Toker [Tue, 10 Jun 2014 09:31:37 +0000 (09:31 +0000)]
Improve diagnostic mapping terminology

Diagnostic mappings are used to calculate the final severity of diagnostic
instances.

Detangle the implementation to reflect the terminology used in documentation
and bindings.

No change in functionality.

llvm-svn: 210518

10 years ago[asan] Disable a flaky test.
Evgeniy Stepanov [Tue, 10 Jun 2014 08:32:01 +0000 (08:32 +0000)]
[asan] Disable a flaky test.

llvm-svn: 210517

10 years agoDelete X86JITInfo in the subtarget destructor.
Eric Christopher [Tue, 10 Jun 2014 08:03:42 +0000 (08:03 +0000)]
Delete X86JITInfo in the subtarget destructor.

llvm-svn: 210516

10 years agoDon't suppress backend diagnostics in system headers
Alp Toker [Tue, 10 Jun 2014 07:03:25 +0000 (07:03 +0000)]
Don't suppress backend diagnostics in system headers

Doing so would be inconsistent with the common fallback case where backend
diagnostics without source locations are emitted unconditionally.

llvm-svn: 210515

10 years agoclang-format: Support variadic lambda captures.
Daniel Jasper [Tue, 10 Jun 2014 06:39:03 +0000 (06:39 +0000)]
clang-format: Support variadic lambda captures.

Before:
  return [ i, args... ]{};

After:
  return [i, args...] {};

llvm-svn: 210514

10 years agoclang-format: Handle multiline strings inside ternary expressions.
Daniel Jasper [Tue, 10 Jun 2014 06:27:23 +0000 (06:27 +0000)]
clang-format: Handle multiline strings inside ternary expressions.

With AlwaysSplitBeforeMultilineStrings, clang-format would not find any
valid solution.

llvm-svn: 210513

10 years agoShow -Wdate-time in system headers
Alp Toker [Tue, 10 Jun 2014 06:09:00 +0000 (06:09 +0000)]
Show -Wdate-time in system headers

Anyone enabling this warning would expect to hear about all occurrences
including those in system headers that can cause non-reproducible builds.

To achieve this, rework ShowInSystemHeader to remove broken unused mapping code
that didn't make sense with a simpler and correct scheme.

llvm-svn: 210512

10 years agoImplement -Wdate-time preprocessor warning
Alp Toker [Tue, 10 Jun 2014 06:08:51 +0000 (06:08 +0000)]
Implement -Wdate-time preprocessor warning

This GCC warning is useful for validating reproducible builds
and might help when tracking down issues with modules too.

llvm-svn: 210511

10 years agoImprove specificity in the diag-mapping2.c test
Alp Toker [Tue, 10 Jun 2014 06:08:41 +0000 (06:08 +0000)]
Improve specificity in the diag-mapping2.c test

Make sure grep catches the correct diagnostic, otherwise this test fails to
detect broken functionality.

llvm-svn: 210510

10 years ago[llvm-readobj][ELF] Factor out the code retrieve ELF symbol information
Simon Atanasyan [Tue, 10 Jun 2014 05:59:15 +0000 (05:59 +0000)]
[llvm-readobj][ELF] Factor out the code retrieve ELF symbol information
(section name, section index, full name) into the separate functions.

No functional changes.

llvm-svn: 210509

10 years agoSimplify code. No functional change.
Craig Topper [Tue, 10 Jun 2014 04:50:50 +0000 (04:50 +0000)]
Simplify code. No functional change.

llvm-svn: 210508

10 years agoSmallVectorTest.cpp: Use LLVM_DELETED_FUNCTION.
NAKAMURA Takumi [Tue, 10 Jun 2014 04:06:56 +0000 (04:06 +0000)]
SmallVectorTest.cpp: Use LLVM_DELETED_FUNCTION.

llvm-svn: 210507

10 years ago[mach-o] refactor mach-o output section selection to be table driven.
Nick Kledzik [Tue, 10 Jun 2014 01:50:00 +0000 (01:50 +0000)]
[mach-o] refactor mach-o output section selection to be table driven.

In -r mode the sections use the table used to parse .o files.  Otherwise
use final exectuable table.  No functionality change.

llvm-svn: 210506

10 years agoImprove checking for dynamic initializers of dllimport fields in template instantiation
Hans Wennborg [Tue, 10 Jun 2014 00:55:51 +0000 (00:55 +0000)]
Improve checking for dynamic initializers of dllimport fields in template instantiation

We would previously assert if the initializer was dependent. I also think that
checking isConstantInitializer is more correct here than checkInitIsICE.

llvm-svn: 210505

10 years ago[ConstantHoisting][X86] Improve the cost model for small constants with large types...
Juergen Ributzka [Tue, 10 Jun 2014 00:32:29 +0000 (00:32 +0000)]
[ConstantHoisting][X86] Improve the cost model for small constants with large types (i64 and above).

This improves the X86 cost model for small constants with large types. Before
this commit we would even hoist trivial constants such as i96 2.

This is related to <rdar://problem/17070936>

llvm-svn: 210504

10 years agoMake '-Werror=frame-larger-than=' and associated diagnostic pragmas GCC-compatible
Alp Toker [Mon, 9 Jun 2014 23:59:38 +0000 (23:59 +0000)]
Make '-Werror=frame-larger-than=' and associated diagnostic pragmas GCC-compatible

It turns out the trailing '=' really is part of the option name spelling and
treating it as such gets us compatible with GCC's -Werror= and pragmas.

(GCC doesn't appear to support any -Wno- form for this diagnostic but we do.)

llvm-svn: 210503

10 years ago[mach-o] parse multiple symbols on same address into aliases
Nick Kledzik [Mon, 9 Jun 2014 23:35:37 +0000 (23:35 +0000)]
[mach-o] parse multiple symbols on same address into aliases

llvm-svn: 210502

10 years agoReorder Value and User fields to save 8 bytes of padding on 64-bit
Reid Kleckner [Mon, 9 Jun 2014 23:32:20 +0000 (23:32 +0000)]
Reorder Value and User fields to save 8 bytes of padding on 64-bit

Reviewered by: rafael

Differential Revision: http://reviews.llvm.org/D4073

llvm-svn: 210501

10 years agoFixed damaged row in issues table; thanks to STL for the catch
Marshall Clow [Mon, 9 Jun 2014 23:27:27 +0000 (23:27 +0000)]
Fixed damaged row in issues table; thanks to STL for the catch

llvm-svn: 210500