Commit Graph

100352 Commits

Author SHA1 Message Date
Craig Topper
ce3db3cdb2 Add PS prefix to some classes I missed in r201538.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201551 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 08:24:22 +00:00
Craig Topper
17e2af6928 Add a bunch of OpSize32 tags to 64-bit mode only instructions to match their 32-bit mode counterparts for cases where there is also a OpSize16 instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201550 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 08:18:29 +00:00
Elena Demikhovsky
2e58f4605d AVX-512: Fixed size of mask registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201546 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 07:52:26 +00:00
Jiangning Liu
47f6b173f5 Fix a typo about lowering AArch64 va_copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201541 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 02:37:42 +00:00
Craig Topper
7d2bb38164 Add an x86 prefix encoding for instructions that would decode to a different instruction with 0xf2/f3/66 were in front of them, but don't themselves have a prefix. For now this doesn't change any bbehavior, but plan to use it to fix some bugs in the disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201538 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 00:21:49 +00:00
Duncan P. N. Exon Smith
ddc5a010a4 PGO: llvm-profdata: tool for merging profiles
Introducing llvm-profdata, a tool for merging profile data generated by
PGO instrumentation in clang.

- The name indicates a file extension of <name>.profdata.  Eventually
  profile data output by clang should be changed to that extension.

- llvm-profdata merges two profiles.  However, the name is more general,
  since it will likely pick up more tasks (such as summarizing a single
  profile).

- llvm-profdata parses the current text-based format, but will be
  updated once we settle on a binary format.

<rdar://problem/15949645>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201535 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 23:22:49 +00:00
Kevin Enderby
4959a2d878 Fix the arm assembler so that this malformed instruction:
ldrd r6, r7 [r2, #15]
simply gives an error and does not triggers an assertion.

As Jim points out, the diagnostic is really strange here,
but fixing that would be more complicated. The missing
comma results in the parser expecting a construct like r2[2],
which is the vector index thing the error message is talking
about. That's not what the user intended, though, and there's
nothing else in the instruction that looks at all like a vector.
Yet more fallout from not having a real parser here and trying
to do context-free generic matching for addressing modes.

rdar://15097243


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201531 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 21:45:27 +00:00
Anders Waldenborg
1410f7ffc6 Add support for assigning to . in AsmParser.
This is implemented by handling assignments to the '.' pseudo symbol
as ".org" directives.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201530 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 20:48:32 +00:00
Craig Topper
3457506fb9 Fix diassembler handling of rex.b when mod=00/01/10 and bbb=101. Mod=00 should ignore the base register entirely. Mod=01/10 should treat this as R13 plus displacment. Fixes PR18860.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201507 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 10:03:43 +00:00
Elena Demikhovsky
e139a1e0e4 AVX-512: implemented zext fron i1 to i16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201502 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 07:29:33 +00:00
Gerolf Hoflehner
3bc859466b fix for null VectorizedValue assertion in the SLP Vectorizer (in function vectorizeTree()). radar://16064178
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201501 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 03:06:16 +00:00
Saleem Abdulrasool
62cb90e8c6 MCAsmParser: add some mixed argument tests
Add some tests to explicitly validate handling of comma and non-comma separated
arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201500 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 00:40:22 +00:00
Saleem Abdulrasool
696002f3b4 MCAsmParser: better handling for named arguments
Until this point only macro definition with named parameters were parsed but the
names were ignored.  This adds support for using that information for named
parameter instantiation.

In order to support the full semantics of the keyword arguments, the arguments
are no longer lazily initialised since the keyword arguments can be specified
out of order and partially if they are defaulted.  Prepopulate the arguments
with the default value for any defaulted parameters, and then parse the
specified arguments.

This simplies some of the handling of the arguments in the inner loop since
empty arguments simply increment the parameter index and move on.

Note that keyword and positional arguments cannot be mixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201499 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-17 00:40:17 +00:00
Mark Seaborn
09d1d540c8 Use 16 byte stack alignment for NaCl on ARM
NaCl's ARM ABI uses 16 byte stack alignment, so set that in
ARMSubtarget.cpp.

Using 16 byte alignment exposes an issue in code generation in which a
varargs function leaves a 4 byte gap between the values of r1-r3 saved
to the stack and the following arguments that were passed on the
stack.  (Previously, this code only needed to support 4 byte and 8
byte alignment.)

With this issue, llc generated:

varargs_func:
        sub     sp, sp, #16
        push    {lr}
        sub     sp, sp, #12
        add     r0, sp, #16   // Should be 20
        stm     r0, {r1, r2, r3}
        ldr     r0, .LCPI0_0  // Address of va_list
        add     r1, sp, #16
        str     r1, [r0]
        bl      external_func

Fix the bug by checking for "Align > 4".  Also simplify the code by
using OffsetToAlignment(), and update comments.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201497 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 18:59:48 +00:00
Arnold Schwaighofer
2ced33808e SCEVExpander: Try hard not to create derived induction variables in other loops
During LSR of one loop we can run into a situation where we have to expand the
start of a recurrence of a loop induction variable in this loop. This start
value is a value derived of the induction variable of a preceeding loop. SCEV
has cannonicalized this value to a different recurrence than the recurrence of
the preceeding loop's induction variable (the type and/or step direction) has
changed). When we come to instantiate this SCEV we created a second induction
variable in this preceeding loop.  This patch tries to base such derived
induction variables of the preceeding loop's induction variable.

This helps twolf on arm and seems to help scimark2 on x86.

Reapply with a fix for the case of a value derived from a pointer.

radar://15970709

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201496 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 15:49:50 +00:00
Rafael Espindola
56d34914b2 Remove dead code, we already require cmake 2.8.8.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201495 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 14:36:26 +00:00
Rafael Espindola
2a8437fa6a Remove unnecessary typename.
Thanks to Elena Demikhovsky for noticing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201494 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 14:12:35 +00:00
Nico Rieck
1800766f5a Fix more broken CHECK lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201493 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 13:28:39 +00:00
Nico Rieck
c15d3a82ae Add extra CHECK prefix to tests with explicit prefix
These tests mistakenly assume that CHECK is still available even if an
explicit prefix is specified.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201492 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 13:28:15 +00:00
Nico Rieck
da39cf486a Actually call FileCheck in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201491 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 13:27:39 +00:00
NAKAMURA Takumi
a938c51444 llvmbuild: Exclude disabled targets from LLVMExports.cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201490 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 12:14:24 +00:00
NAKAMURA Takumi
789f722abd LLVMExports.cmake: Add System libs $(LIBS) to LLVMSupport, corresponding to r201077.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201489 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 12:14:13 +00:00
NAKAMURA Takumi
88fae4e86f LLVMExports.cmake: Exclude gtest since they are not installed.
FIXME: gtest might be included if external project could refer to the build tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201488 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 12:14:03 +00:00
Elena Demikhovsky
f280c65b32 AVX-512: simpyfied BUILD_VECTOR for masks; fixed cmp/test sequence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201487 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 11:34:23 +00:00
Gerolf Hoflehner
8e810aeec3 fixed typo in comment as my test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201486 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 10:43:25 +00:00
Eric Christopher
0cefb0ecbc Add a DIELoc class to cover the DW_FORM_exprloc set of expressions
alongside DIEBlock and replace uses accordingly. Use DW_FORM_exprloc
in DWARF4 and later code. Update testcases.

Adding a DIELoc instead of using extra forms inside DIEBlock so
that we can keep location expressions separate from other uses. No
direct use at the moment, however, it's not a lot of code and
using a separately named class keeps it somewhat more obvious
what's going on in various locations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201481 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 08:46:55 +00:00
Nico Rieck
268e96a8a6 Fix broken CHECK lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201479 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 07:31:05 +00:00
Saleem Abdulrasool
5a39da0a6f MCAsmParser: relax declaration parsing
The Linux kernel defines empty macros for compatibility with ARM UAL syntax.
The comma after the name is optional, and if present can be safely lexed.  This
improves compatibility with the GNU assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201474 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 04:56:31 +00:00
Saleem Abdulrasool
1edea19210 ARM IAS: (partially) support .arch_extension directive
This adds a partial implementation of the .arch_extension directive to the
integrated ARM assembler.  There are a number of limitations to this
implementation arising from the target backend support rather than the
implementation itself.  Namely, iWMMXT (v1 and v2), Maverick, and XScale support
is not present in the ARM backend.  Currently, there is no check for A-class
only (needed for virt), and no ARMv6k detection (needed for os and sec).  The
remainder of the extensions are fully supported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201471 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 00:16:41 +00:00
David Blaikie
132a287941 DebugInfo: Deduplicate entries in the fission address table
This broke in r185459 while TLS support was being generalized to handle
non-symbol TLS representations.

I thought about/tried having an enum rather than a bool to track the
TLS-ness of the address table entry, but namespaces and naming seemed
more hassle than it was worth for only one caller that needed to specify
this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201469 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 19:34:03 +00:00
David Blaikie
16413fa2f9 DwarfDebug: Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201467 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 18:33:11 +00:00
Arnold Schwaighofer
a9db46bf3e Revert "SCEVExpander: Try hard not to create derived induction variables in other loops"
This reverts commit r201465. It broke an arm bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201466 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 18:16:56 +00:00
Arnold Schwaighofer
e672548602 SCEVExpander: Try hard not to create derived induction variables in other loops
During LSR of one loop we can run into a situation where we have to expand the
start of a recurrence of a loop induction variable in this loop. This start
value is a value derived of the induction variable of a preceeding loop. SCEV
has cannonicalized this value to a different recurrence than the recurrence of
the preceeding loop's induction variable (the type and/or step direction) has
changed). When we come to instantiate this SCEV we created a second induction
variable in this preceeding loop.  This patch tries to base such derived
induction variables of the preceeding loop's induction variable.

This helps twolf on arm and seems to help scimark2 on x86.

radar://15970709

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201465 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 17:11:56 +00:00
Nico Rieck
4b3ec1763c Cleanup docs about lit substitutions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201464 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 08:35:56 +00:00
Craig Topper
0877c6575a Add opcode extension forms of MOV8ri/MOV16ri/MOV32ri.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201463 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 07:29:18 +00:00
Nico Rieck
b556a706f6 Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201461 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 06:02:36 +00:00
Lang Hames
76554f3418 Remove tautological test line (unsigneds are always >=0).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201451 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 00:45:14 +00:00
David Blaikie
a666f9d3a5 Remove unnecessary typename introduced in r201440.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201450 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-15 00:34:43 +00:00
David Blaikie
4b45137a4f DebugInfo: Implement DW_AT_stmt_list for type units
Type units will share the statement list of their defining compile unit.
This is a tradeoff that reduces .o debug info size at the cost of some
linked debug info size (since the contents of those string tables won't
be deduplicated along with the type unit) which seems right for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201445 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 23:58:13 +00:00
David Blaikie
ff1677e9c5 DwarfUnit: Remove unnecessarily explicit/out of line virtual dtors.
These types have an out of line virtual function each (emitHeader at
least) so they won't have weak vtables - no need for more than that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201444 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 22:50:59 +00:00
Rafael Espindola
fa4ff8ab29 Hopefully fix the build with gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201443 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 22:48:49 +00:00
David Blaikie
906c8deb9e DwarfUnit: Remove unnecessary (void)t; that was previously used to suppress -Wunused-member-variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201442 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 22:47:55 +00:00
David Blaikie
705991f2fc DwarfUnit: Refactor out DW_AT_stmt_list creation into common function for fission and non-fission cases
This probably also addresses the FIXME in the fission case regarding
multiple compile units, though I haven't tested that.

This code still confuses me (the literal zero offset makes little sense,
the limitations surrounding asm output I'm not sure about either - but
perhaps we should just always emit one line table? Or should we not rely
on .loc/.file even in assembly so we can produce the same output between
asm and object output?) but this maintains the existing functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201441 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 22:41:51 +00:00
Rafael Espindola
d4762e88fd Add extern template instantiations of llvm::Calculate.
This should be a small build time improvement in general and fixes
the build on OS X with -DBUILD_SHARED_LIBS=ON.

The issue is that not all users are including GenericDomTreeConstruction.h,
causing undefined references when ld64 managed to hide the
linkonce_odr symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201440 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 22:36:16 +00:00
Quentin Colombet
038600b42e [CodeGenPrepare][AddressingModeMatcher] Give up on type promotion if the
transformation does not bring any immediate benefits and introduce an illegal
operation. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201439 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 22:23:22 +00:00
Tom Stellard
5f80594797 TargetLowering: n * r where n > 2 should be an illegal addressing mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201433 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 21:10:34 +00:00
Howard Hinnant
3b0acd4ef4 Remove myself as owner of libc++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201432 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 21:09:01 +00:00
Eli Bendersky
2220abe879 Remove unused #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201430 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 20:15:56 +00:00
David Blaikie
c4e1b13b08 DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded
Recommitting r201380 (reverted in r201389)
Recommitting r201351 and r201355 (reverted in r201351 and r201355)

We weren't emitting the an empty (header only) line table when the line
table was empty - this made the DWARF invalid (the compile unit would
point to the zero-size debug_lines section where there should've been an
empty line table but there was nothing at all). Fix that, and as a
consequence this works around/addresses PR18809.

Also, we emit a non-empty line table to workaround a darwin linker bug,
so XFAILing on darwin too.

Also, mark the test as 'REQUIRES: object-emission' because it does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201429 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 19:51:35 +00:00
Diego Novillo
837c54fa7b Support DWARF discriminators in object streamer.
Summary:
This adds support for emitting DWARF path discriminator values in
the object streamer. It also changes the DWARF dumper to show
discriminator values in the line table output.

Reviewers: echristo

CC: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201427 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14 19:27:53 +00:00