1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

100205 Commits

Author SHA1 Message Date
Saleem Abdulrasool
31abfcc09f 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.

llvm-svn: 201499
2014-02-17 00:40:17 +00:00
Mark Seaborn
a1a8c0677a 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

llvm-svn: 201497
2014-02-16 18:59:48 +00:00
Arnold Schwaighofer
acef112e40 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

llvm-svn: 201496
2014-02-16 15:49:50 +00:00
Rafael Espindola
ed0a04d469 Remove dead code, we already require cmake 2.8.8.
llvm-svn: 201495
2014-02-16 14:36:26 +00:00
Rafael Espindola
cac01e61b4 Remove unnecessary typename.
Thanks to Elena Demikhovsky for noticing.

llvm-svn: 201494
2014-02-16 14:12:35 +00:00
Nico Rieck
f3b62a4af6 Fix more broken CHECK lines
llvm-svn: 201493
2014-02-16 13:28:39 +00:00
Nico Rieck
d0a9c18a2c 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.

llvm-svn: 201492
2014-02-16 13:28:15 +00:00
Nico Rieck
426e8aab2b Actually call FileCheck in tests
llvm-svn: 201491
2014-02-16 13:27:39 +00:00
NAKAMURA Takumi
41f0d5dd27 llvmbuild: Exclude disabled targets from LLVMExports.cmake.
llvm-svn: 201490
2014-02-16 12:14:24 +00:00
NAKAMURA Takumi
d860d1bec5 LLVMExports.cmake: Add System libs $(LIBS) to LLVMSupport, corresponding to r201077.
llvm-svn: 201489
2014-02-16 12:14:13 +00:00
NAKAMURA Takumi
2c11ee6a45 LLVMExports.cmake: Exclude gtest since they are not installed.
FIXME: gtest might be included if external project could refer to the build tree.
llvm-svn: 201488
2014-02-16 12:14:03 +00:00
Elena Demikhovsky
2cdad2b3d4 AVX-512: simpyfied BUILD_VECTOR for masks; fixed cmp/test sequence
llvm-svn: 201487
2014-02-16 11:34:23 +00:00
Gerolf Hoflehner
283b0694b1 fixed typo in comment as my test commit
llvm-svn: 201486
2014-02-16 10:43:25 +00:00
Eric Christopher
7ab56547e5 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.

llvm-svn: 201481
2014-02-16 08:46:55 +00:00
Nico Rieck
02b2fbee0d Fix broken CHECK lines
llvm-svn: 201479
2014-02-16 07:31:05 +00:00
Saleem Abdulrasool
1ab302ffd6 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.

llvm-svn: 201474
2014-02-16 04:56:31 +00:00
Saleem Abdulrasool
f0e7fa2121 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.

llvm-svn: 201471
2014-02-16 00:16:41 +00:00
David Blaikie
1b730f915c 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.

llvm-svn: 201469
2014-02-15 19:34:03 +00:00
David Blaikie
7fb08ed522 DwarfDebug: Remove dead code.
llvm-svn: 201467
2014-02-15 18:33:11 +00:00
Arnold Schwaighofer
3eaeb8d751 Revert "SCEVExpander: Try hard not to create derived induction variables in other loops"
This reverts commit r201465. It broke an arm bot.

llvm-svn: 201466
2014-02-15 18:16:56 +00:00
Arnold Schwaighofer
0703efa89f 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

llvm-svn: 201465
2014-02-15 17:11:56 +00:00
Nico Rieck
4165fe44e3 Cleanup docs about lit substitutions
llvm-svn: 201464
2014-02-15 08:35:56 +00:00
Craig Topper
17b586d7c5 Add opcode extension forms of MOV8ri/MOV16ri/MOV32ri.
llvm-svn: 201463
2014-02-15 07:29:18 +00:00
Nico Rieck
00a168e7e4 Fix typo
llvm-svn: 201461
2014-02-15 06:02:36 +00:00
Lang Hames
362156d263 Remove tautological test line (unsigneds are always >=0).
llvm-svn: 201451
2014-02-15 00:45:14 +00:00
David Blaikie
3f012781bf Remove unnecessary typename introduced in r201440.
llvm-svn: 201450
2014-02-15 00:34:43 +00:00
David Blaikie
e768e012a5 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.

llvm-svn: 201445
2014-02-14 23:58:13 +00:00
David Blaikie
f46c70c99a 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.

llvm-svn: 201444
2014-02-14 22:50:59 +00:00
Rafael Espindola
ea8d921ee3 Hopefully fix the build with gcc.
llvm-svn: 201443
2014-02-14 22:48:49 +00:00
David Blaikie
e8d7f7154a DwarfUnit: Remove unnecessary (void)t; that was previously used to suppress -Wunused-member-variable
llvm-svn: 201442
2014-02-14 22:47:55 +00:00
David Blaikie
6b8f9db18a 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.

llvm-svn: 201441
2014-02-14 22:41:51 +00:00
Rafael Espindola
eeb1bfdd35 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.

llvm-svn: 201440
2014-02-14 22:36:16 +00:00
Quentin Colombet
5700bbac29 [CodeGenPrepare][AddressingModeMatcher] Give up on type promotion if the
transformation does not bring any immediate benefits and introduce an illegal
operation. 

llvm-svn: 201439
2014-02-14 22:23:22 +00:00
Tom Stellard
a3a801780f TargetLowering: n * r where n > 2 should be an illegal addressing mode
llvm-svn: 201433
2014-02-14 21:10:34 +00:00
Howard Hinnant
a7223b7c4e Remove myself as owner of libc++
llvm-svn: 201432
2014-02-14 21:09:01 +00:00
Eli Bendersky
e87614988f Remove unused #include
llvm-svn: 201430
2014-02-14 20:15:56 +00:00
David Blaikie
807b799c56 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.

llvm-svn: 201429
2014-02-14 19:51:35 +00:00
Diego Novillo
eb4175295c 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

llvm-svn: 201427
2014-02-14 19:27:53 +00:00
Reed Kotler
22855ad786 This patch has two main functions:
1) Fix a specific bug when certain conversion functions are called in a program compiled as mips16 with hard float and
the program is linked as c++. There are two libraries that are reversed in the link order with gcc/g++ and clang/clang++ for
mips16 in this case and the proper stubs will then not be called. These stubs are normally handled in the Mips16HardFloat pass
but in this case we don't know at that time that we need to generate the stubs. This must all be handled later in code generation
and we have moved this functionality to MipsAsmPrinter. When linked as C (gcc or clang) the proper stubs are linked in from libc.

2) Set up the infrastructure to handle 90% of what is in the Mips16HardFloat pass in this new area of MipsAsmPrinter. This is a more
logical place to handle this and we have known for some time that we needed to move the code later and not implement it using
inline asm as we do now but it was not clear exactly where to do this and what mechanism should be used. Now it's clear to us
how to do this and this patch contains the infrastructure to move most of this to MipsAsmPrinter but the actual moving will be done
in a follow on patch. The same infrastructure is used to fix this current bug as described in #1. This change was requested by the list
during the original putback of the Mips16HardFloat pass but was not practical for us do at that time.

llvm-svn: 201426
2014-02-14 19:16:39 +00:00
Rafael Espindola
cd84fe8173 Trivial cleanup: reuse existing variable.
Extracted while trying to understand http://llvm-reviews.chandlerc.com/D1764.

Patch by Matt Arsenault.

llvm-svn: 201425
2014-02-14 19:02:01 +00:00
Artyom Skrobov
10498a713c Generate the DWARF stack frame decode operations in the function prologue for ARM/Thumb functions.
Patch by Keith Walker!

llvm-svn: 201423
2014-02-14 17:19:07 +00:00
Kevin Qin
fa58a631ae [AArch64 NEON] Fix a bug to avoid using floating type as condition type in lowering SELECT_CC.
llvm-svn: 201395
2014-02-14 09:41:15 +00:00
Eric Christopher
f9b747701e Revert "DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded"
This reverts commit r201380 for now while we investigate.

llvm-svn: 201389
2014-02-14 05:33:16 +00:00
NAKAMURA Takumi
ceba172c7f llvm/test/DebugInfo/empty.ll: Mark it as XFAIL:win32 lacking of line table.
llvm-svn: 201388
2014-02-14 05:26:49 +00:00
Jiangning Liu
5da69caef9 Enable AArch64 NEON by default.
llvm-svn: 201385
2014-02-14 04:38:09 +00:00
NAKAMURA Takumi
9852bda67d [PR18809] Remove XFAIL from DebugInfo/empty.ll.
I added it in r201211.

llvm-svn: 201383
2014-02-14 03:59:43 +00:00
Hao Liu
022a50cb21 [AArch64]Fix the assertion failure caused by "v1i1 SETCC" DAG node.
As v1i1 is illegal, the type legalizer tries to scalarize such node. But if the type operands of SETCC is legal, the scalarization algorithm will cause an assertion failure.

llvm-svn: 201381
2014-02-14 02:21:56 +00:00
David Blaikie
bb2e9f88c7 DebugInfo: Don't include the name of the CU file in the line table file list when it's unneeded
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.

llvm-svn: 201380
2014-02-14 01:57:59 +00:00
Eric Christopher
1c6b5fc6f2 Disable emission of aranges by default and add a command line
option to enable again that will be matched with a commit to enable
in clang.

llvm-svn: 201378
2014-02-14 01:26:55 +00:00
Juergen Ributzka
40016f4730 [X86] Don't mark movabsq as cheap-as-move - it isn't that cheap.
A simple register copy on X86 is just 3 bytes, whereas movabsq is a 10 byte
instruction. Marking movabsq as not beeing cheap will allow LICM to move it
out of the loop and it also prevents unnecessary rematerializations if the
value is needed in more than one register.

llvm-svn: 201377
2014-02-14 00:51:13 +00:00