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

101878 Commits

Author SHA1 Message Date
Jim Grosbach
37ea71d1c7 Fix spelling. Sigh.
llvm-svn: 205605
2014-04-04 02:14:38 +00:00
Jim Grosbach
8f614ea1a4 ARM: Range based for-loop over block predecessors.
No functional change.

llvm-svn: 205604
2014-04-04 02:11:03 +00:00
Jim Grosbach
afaa05bdd9 Add iterator_ranges for block pred/succ.
llvm-svn: 205603
2014-04-04 02:10:59 +00:00
Jim Grosbach
ba2a01b6d7 ARM: Use range-based for loops in frame lowering.
No functional change.

llvm-svn: 205602
2014-04-04 02:10:55 +00:00
Quentin Colombet
5e74b12918 [RegAllocGreedy][Last Chance Recoloring] Emit diagnostics when last chance
recoloring cut-offs are encountered and register allocation failed.

This is related to PR18747

Patch by MAYUR PANDEY <mayur.p@samsung.com>.

llvm-svn: 205601
2014-04-04 02:05:21 +00:00
Quentin Colombet
419aeb287d Revert r205599, the commit was not intended to have so many changes
llvm-svn: 205600
2014-04-04 02:02:49 +00:00
Quentin Colombet
b4d3858ea5 [RegAllocGreedy][Last Chance Recoloring] Emit diagnostics when last chance
recoloring cut-offs are hit.

This is related to PR18747.

Patch by MAYUR PANDEY <mayur.p@samsung.com>

llvm-svn: 205599
2014-04-04 01:58:57 +00:00
Saleem Abdulrasool
800a9fc29c ARM: fix test case missed in previous roundup
This should hopefully bring the last MSVC buildbot back to green!

llvm-svn: 205596
2014-04-04 01:19:56 +00:00
Saleem Abdulrasool
c448b35de7 MIPS: remove vim swap file
llvm-svn: 205595
2014-04-04 01:19:54 +00:00
Rafael Espindola
1908f85f3f Add an assert that this is only used with .o files.
I am not sure how to get a relocation in a .dylib, but this function would
return the wrong value if passed one.

llvm-svn: 205592
2014-04-04 00:31:12 +00:00
Rafael Espindola
c4dd200975 Implement getRelocationAddress for MachO and ET_REL elf files.
With that, fix the symbolizer to work with any ELF file.

llvm-svn: 205588
2014-04-03 23:54:35 +00:00
Rafael Espindola
1f708ccc84 Implement macho relocation iterators with section number + relocation number.
This will make it possible to implement getRelocationAddress.

llvm-svn: 205587
2014-04-03 23:51:28 +00:00
Saleem Abdulrasool
e5bf2f858c ARM: yet another round of ARM test clean ups
llvm-svn: 205586
2014-04-03 23:47:24 +00:00
Jim Grosbach
7c096ae6e1 Tidy up. Space before ':' in range-based for loops.
llvm-svn: 205585
2014-04-03 23:43:26 +00:00
Jim Grosbach
0813a7bbeb Tidy up. 80 columns.
llvm-svn: 205584
2014-04-03 23:43:22 +00:00
Jim Grosbach
7c9088c82d Tidy up. Trailing whitespace.
llvm-svn: 205583
2014-04-03 23:43:18 +00:00
Jim Grosbach
a1594fa87a Fix typo.
llvm-svn: 205582
2014-04-03 23:43:12 +00:00
Rafael Espindola
f7b4f58be9 Fix llvm-objdump crash.
llvm-svn: 205581
2014-04-03 23:20:02 +00:00
Rafael Espindola
0ab1b9941a Remove section_rel_empty. Just compare begin() and end() instead.
llvm-svn: 205577
2014-04-03 22:42:22 +00:00
Rafael Espindola
44e832f9f7 Reuse existing variable.
llvm-svn: 205572
2014-04-03 21:48:41 +00:00
Eli Bendersky
dacc8f8c1e Optimize away unnecessary address casts.
Removes unnecessary casts from non-generic address spaces to the generic address
space for certain code patterns.

Patch by Jingyue Wu.

llvm-svn: 205571
2014-04-03 21:18:25 +00:00
Lang Hames
9b407b8dd3 [ARM64] Teach the ARM64DeadRegisterDefinition pass to respect implicit-defs.
When rematerializing through truncates, the coalescer may produce instructions
with dead defs, but live implicit-defs of subregs:
E.g.
  %X1<def,dead> = MOVi64imm 2, %W1<imp-def>; %X1:GPR64, %W1:GPR32

These instructions are live, and their definitions should not be rewritten.

Fixes <rdar://problem/16492408>

llvm-svn: 205565
2014-04-03 20:51:08 +00:00
NAKAMURA Takumi
c03e23ba37 unconditional-branch.ll is broken for targeting x86_64-cygming. Add an explicit triple for now.
llvm-svn: 205563
2014-04-03 20:40:37 +00:00
Tom Stellard
981d7d5d7e R600: Correct opcode for BFE_INT
Acording to AMD documentation, the correct opcode for
BFE_INT is 0x5, not 0x4

Fixes Arithm/Absdiff.Mat/3 OpenCV test

Patch by: Bruno Jiménez

llvm-svn: 205562
2014-04-03 20:19:29 +00:00
Tom Stellard
76577a21a1 R600/SI: Lower 64-bit immediates using REG_SEQUENCE
llvm-svn: 205561
2014-04-03 20:19:27 +00:00
NAKAMURA Takumi
6b459245d4 Revert r205551, "Attempt to XFAIL this on mingw and cygwin hosts." It didn't fail on cygming.
That said, it emits errors to the stderr (with exit(0));

  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_DIR32
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_DIR32
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_DIR32

llvm-svn: 205560
2014-04-03 20:08:02 +00:00
NAKAMURA Takumi
f31bebc8bc llvm/test/CodeGen/X86/peephole-multiple-folds.ll: Relax expressions to satisfy win32.
llvm-svn: 205559
2014-04-03 20:07:51 +00:00
Eric Christopher
0a7be2dde8 Attempt to XFAIL this on mingw and cygwin hosts. The line table on
these is very much off and is more than just the branch
from this bug incorrect:

Address            Line   Column File   ISA Discriminator Flags
------------------ ------ ------ ------ --- ------------- -------------
0x30830a0100000002      3      0      1   0             0  is_stmt
0x30830a0100000008      3      0      1   0             0  is_stmt end_sequence

llvm-svn: 205551
2014-04-03 18:23:52 +00:00
Eli Bendersky
be453afe99 Fix PR19270 - type mismatch caused by invalid optimization.
Patch by Jingyue Wu.

llvm-svn: 205547
2014-04-03 17:51:58 +00:00
Eric Christopher
d2d8ada4b1 Loosen up check so that we can pass on platforms that generate
slightly more verbose than needed line tables, e.g.:

Address            Line   Column File   ISA Discriminator Flags
------------------ ------ ------ ------ --- ------------- -------------
0x0000000000000000      1      0      1   0             0  is_stmt
0x0000000000000000      1      0      1   0             0  is_stmt prologue_end
0x0000000000000010      2      0      1   0             0  is_stmt
0x0000000000000018      4      0      1   0             0  is_stmt

these should probably be looked at, but it isn't affecting the correctness
of the testcase.

llvm-svn: 205546
2014-04-03 17:40:08 +00:00
Saleem Abdulrasool
859dccec1f ARM: update even more tests
More updating of tests to be explicit about the target triple rather than
relying on the default target triple supporting ARM mode.

Indicate to lit that object emission is not yet available for Windows on ARM.

llvm-svn: 205545
2014-04-03 17:35:22 +00:00
Dmitri Gribenko
2268927ed1 ArrayRef: use std::vector::data() now that we are building in C++11 mode
llvm-svn: 205542
2014-04-03 16:29:11 +00:00
Saleem Abdulrasool
53e8c5a4af ARM: fixup more tests to specify the target more explicitly
This changes the tests that were targeting ARM EABI to explicitly specify the
environment rather than relying on the default.  This breaks with the new
Windows on ARM support when running the tests on Windows where the default
environment is no longer EABI.

Take the opportunity to avoid a pointless redirect (helps when trying to debug
with providing a command line invocation which can be copy and pasted) and
removing a few greps in favour of FileCheck.

llvm-svn: 205541
2014-04-03 16:01:44 +00:00
Tim Northover
daeb0caa3e ARM: tell LLVM about zext properties of ldrexb/ldrexh
Implementing this via ComputeMaskedBits has two advantages:
  + It actually works. DAGISel doesn't deal with the chains properly
    in the previous pattern-based solution, so they never trigger.
  + The information can be used in other DAG combines, as well as the
    trivial "get rid of truncs". For example if the trunc is in a
    different basic block.

rdar://problem/16227836

llvm-svn: 205540
2014-04-03 15:10:35 +00:00
Daniel Sanders
f87426a6f5 [mips] Add negative tests confirm that supported ISA's don't allow instructions added in later ISA's
Summary:
test/MC/Mips/<isa1>/invalid-<isa2>.s
    Test that <isa1> does not support <isa2>'s instructions.
test/MC/Mips/<isa1>/invalid-<isa2>-xfail.s
    Things that should be invalid but currently aren't. Will XPASS if any
    become invalid.

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

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

llvm-svn: 205538
2014-04-03 14:14:22 +00:00
Daniel Sanders
a6bc64ce8a [mips] Implement ehb, ssnop, and pause in assembler
Summary: Add negative tests for pause

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

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

llvm-svn: 205537
2014-04-03 13:21:51 +00:00
Tim Northover
d8ab3a6d2f ARM: skip cmpxchg failure barrier if ordering is monotonic.
The terminal barrier of a cmpxchg expansion will be either Acquire or
SequentiallyConsistent. In either case it can be skipped if the
operation has Monotonic requirements on failure.

rdar://problem/15996804

llvm-svn: 205535
2014-04-03 13:06:54 +00:00
Zoran Jovanovic
712fef1943 Implementation of 16-bit microMIPS instructions MFHI and MFLO.
Differential Revision: http://llvm-reviews.chandlerc.com/D3141

llvm-svn: 205532
2014-04-03 12:47:34 +00:00
Daniel Sanders
baa1451096 [mips] Add initial (experimental) MIPS-IV support.
Summary:
Adds the 'mips4' processor and a simple test of the ELF e_flags.

Patch by David Chisnall
His work was sponsored by: DARPA, AFRL

I made one small change to the testcase so that it uses
mips64-unknown-linux instead of mips4-unknown-linux.

This patch indirectly adds FeatureCondMov to FeatureMips64. This is ok
because it's supposed to be there anyway and it turns out that
FeatureCondMov is not a predicate of any instructions at the moment
(this is a bug that hasn't been noticed because there are no targets
without the conditional move instructions yet).

CC: theraven

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

llvm-svn: 205530
2014-04-03 12:13:36 +00:00
Eric Christopher
7bc582d828 Fix for PR 19261:
llc doesn't generate nodes for unconditional fall-through branches for targets
without FastISel implementation (X86 has it, but can be disabled by
"-fast-isel=false") in SelectionDAGBuilder::visitBr().

So for line 4 in the following testcase

1: void foo(int i){
2:   switch(i){
3:   default:
4:     break;
5:   }
6:   return;
7: }

there is no corresponding line in .debug_line section, and a debugger
cannot set a breakpoint at line 4.

Fix this by always emitting a branch when we're not optimizing and add a
testcase to ensure that there's code on every line we'd want to break.

Patch by Daniil Fukalov.

llvm-svn: 205529
2014-04-03 12:11:51 +00:00
Zoran Jovanovic
7a3bf4ed5a MicroMIPS specific little endian fixup data byte ordering.
Differential Revision: http://llvm-reviews.chandlerc.com/D3245

llvm-svn: 205528
2014-04-03 12:01:01 +00:00
Tim Northover
fa95942ab3 ARM: expand atomic ldrex/strex loops in IR
The previous situation where ATOMIC_LOAD_WHATEVER nodes were expanded
at MachineInstr emission time had grown to be extremely large and
involved, to account for the subtly different code needed for the
various flavours (8/16/32/64 bit, cmpxchg/add/minmax).

Moving this transformation into the IR clears up the code
substantially, and makes future optimisations much easier:

1. an atomicrmw followed by using the *new* value can be more
   efficient. As an IR pass, simple CSE could handle this
   efficiently.
2. Making use of cmpxchg success/failure orderings only has to be done
   in one (simpler) place.
3. The common "cmpxchg; did we store?" idiom can be exposed to
   optimisation.

I intend to gradually improve this situation within the ARM backend
and make sure there are no hidden issues before moving the code out
into CodeGen to be shared with (at least ARM64/AArch64, though I think
PPC & Mips could benefit too).

llvm-svn: 205525
2014-04-03 11:44:58 +00:00
Stepan Dyatkovskiy
d535cd7ed5 PR19320:
The trouble as in ARMAsmParser, in ParseInstruction method. It assumes that ARM::R12 + 1 == ARM::SP.
It is wrong, since ARM::<Register> codes are generated by tablegen and actually could be any random numbers.

llvm-svn: 205524
2014-04-03 11:29:15 +00:00
Silviu Baranga
e6ece696a8 [ARM] When generating a vpaddl node the input lane type is not always the type of the
add operation since extract_vector_elt can perform an extend operation. Get the input lane
type from the vector on which we're performing the vpaddl operation on and extend or
truncate it to the output type of the original add node.

llvm-svn: 205523
2014-04-03 10:44:27 +00:00
Sasa Stankovic
fd4cd957f3 [mips] Extend MipsMCExpr class to handle %higher(sym1 - sym2 + const) and
%highest(sym1 - sym2 + const) relocations. Remove "ABS_" from VK_Mips_HI
and VK_Mips_LO enums in MipsMCExpr, to be consistent with VK_Mips_HIGHER
and VK_Mips_HIGHEST.

This change also deletes test file test/MC/Mips/higher_highest.ll and moves
its CHECK's to the new test file test/MC/Mips/higher-highest-addressing.s.
The deleted file tests that R_MIPS_HIGHER and R_MIPS_HIGHEST relocations are
emitted in the .o file. Since it uses -force-mips-long-branch option, it was
created when MipsLongBranch's implementation was emitting R_MIPS_HIGHER and
R_MIPS_HIGHEST relocations in the .o file. It was disabled when MipsLongBranch
started to directly calculate offsets.

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

llvm-svn: 205522
2014-04-03 10:37:45 +00:00
Tim Northover
acf65ac2c1 ARM64: add regression test for r205519.
llvm-svn: 205520
2014-04-03 09:36:05 +00:00
Tim Northover
49892dbaff ARM64: always use i64 for the RHS of shift operations
Switching between i32 and i64 based on the LHS type is a good idea in
theory, but pre-legalisation uses i64 regardless of our choice,
leading to potential ISel errors.

Should fix PR19294.

llvm-svn: 205519
2014-04-03 09:26:16 +00:00
Oliver Stannard
4de3ae25ad ARM: Use __STACK_LIMIT symbol for segmented stacks
We cannot use STACK_LIMIT, as it is not reserved for the compiler
by the C spec.

llvm-svn: 205516
2014-04-03 08:45:16 +00:00
Andrew Trick
026bb067a9 Stack map docs. Remove some stray markup.
llvm-svn: 205515
2014-04-03 07:08:21 +00:00
Tim Northover
14ff8399f5 ARM64: don't generate __sincos_stret calls unless on MachO
This should fix PR19314.

llvm-svn: 205514
2014-04-03 07:06:13 +00:00