1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

63846 Commits

Author SHA1 Message Date
John McCall
0c3659857d Provide an explicit specialization of SmallVector at N=0 which does
not require its type argument to be complete if no members are
actually used.

llvm-svn: 112106
2010-08-25 23:11:24 +00:00
Chris Lattner
36e90f42f3 add a specialization for the MVT form of getTypeAction, since it is
trivial.

llvm-svn: 112105
2010-08-25 23:05:45 +00:00
Chris Lattner
ef3055ca05 remove some llvmcontext arguments that are now dead post-refactoring.
llvm-svn: 112104
2010-08-25 23:00:45 +00:00
Chris Lattner
fe7c4ec039 Change handling of illegal vector types to widen when possible instead of
expanding: e.g. <2 x float> -> <4 x float> instead of -> 2 floats.  This
affects two places in the code: handling cross block values and handling
function return and arguments.  Since vectors are already widened by 
legalizetypes, this gives us much better code and unblocks x86-64 abi
and SPU abi work.

For example, this (which is a silly example of a cross-block value):
define <4 x float> @test2(<4 x float> %A) nounwind {
 %B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
 %C = fadd <2 x float> %B, %B
  br label %BB
BB:
 %D = fadd <2 x float> %C, %C
 %E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
 ret <4 x float> %E
}

Now compiles into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 addps %xmm0, %xmm0
 ret

previously it compiled into:

_test2:                                 ## @test2
## BB#0:
 addps %xmm0, %xmm0
 pshufd $1, %xmm0, %xmm1
                                        ## kill: XMM0<def> XMM0<kill> XMM0<def>
 insertps $0, %xmm0, %xmm0
 insertps $16, %xmm1, %xmm0
 addps %xmm0, %xmm0
 ret

This implements rdar://8230384

llvm-svn: 112101
2010-08-25 22:49:25 +00:00
Chris Lattner
56bc3bc1af tidy up
llvm-svn: 112099
2010-08-25 22:45:53 +00:00
Dan Gohman
d19a0a49d1 Remap metadata attached to instructions when remapping individual
instructions, not when remapping modules.

llvm-svn: 112091
2010-08-25 21:36:50 +00:00
Bruno Cardoso Lopes
28f3261dbd Revert this for now, PUNPCKLDQ dont operate on v4f32
llvm-svn: 112090
2010-08-25 21:26:37 +00:00
Daniel Dunbar
1a881a3eca X86: Fix misencode of RI64mi8. This fixes OpenSSL / x86_64-apple-darwin10 / clang -O3.
llvm-svn: 112089
2010-08-25 21:11:02 +00:00
Devang Patel
3abb5dbc91 Fix comment.
llvm-svn: 112086
2010-08-25 20:41:24 +00:00
Devang Patel
25b17ca1c3 Remove dead argument.
llvm-svn: 112085
2010-08-25 20:39:26 +00:00
Jim Grosbach
eab4de864e Add some statistics for PEI register scavenging
llvm-svn: 112084
2010-08-25 20:34:28 +00:00
Dan Gohman
59afcdfc07 Add a FIXME comment.
llvm-svn: 112083
2010-08-25 20:23:38 +00:00
Dan Gohman
ff4a68ffa1 Fix the bitcode reader to clear out function-specific state
from MDValueList between each function, now that the bitcode
writer is reusing the index space for function-local metadata.

llvm-svn: 112082
2010-08-25 20:22:53 +00:00
Dan Gohman
bd785974b0 Fix a bug found by inspection.
llvm-svn: 112081
2010-08-25 20:20:21 +00:00
Dan Gohman
9bb1e88e8f Add a comment.
llvm-svn: 112080
2010-08-25 20:17:19 +00:00
Benjamin Kramer
ebee78319c MCELF: Use precomputed symbol indices, patch by Roman Divacky.
llvm-svn: 112079
2010-08-25 20:09:43 +00:00
Eric Christopher
6263463ccb Fix header define to reflect the name of the file.
Patch by Adam Treat!

llvm-svn: 112077
2010-08-25 19:28:39 +00:00
Michael J. Spencer
052ffacb48 MC: Fix inconsistant naming in COFF object writer. Patch by Cameron Esfahani.
llvm-svn: 112076
2010-08-25 19:27:27 +00:00
Jim Grosbach
50dbbda454 Don't override the var from the enclosing scope.
When doing copy/paste/modify, it's apparently rather important to remember
the 'modify' bit...

llvm-svn: 112075
2010-08-25 19:11:34 +00:00
Chris Lattner
84423f212d zap dead code
llvm-svn: 112073
2010-08-25 19:00:00 +00:00
Devang Patel
05becf3ac5 DIGlobalVariable can be used to encode debug info for globals that are directly folded into a constant by FE.
llvm-svn: 112072
2010-08-25 18:52:02 +00:00
Dan Gohman
6300d80566 lto_codegen_set_gcc_path was removed.
llvm-svn: 112069
2010-08-25 18:37:04 +00:00
Dan Gohman
1c0c6f568f Fix a few missing entries in lto.exports.
llvm-svn: 112068
2010-08-25 18:22:12 +00:00
Benjamin Kramer
4eb0e8bb2c Remove dead recursive function. Yay for clang -Wunused-function.
llvm-svn: 112060
2010-08-25 17:27:58 +00:00
Dan Gohman
3052a8bec0 Clear FunctionLocalMDs in purgeFunction along with the rest of the
function-specific state.

llvm-svn: 112058
2010-08-25 17:11:16 +00:00
Dan Gohman
7938d90097 Fix whitespace.
llvm-svn: 112056
2010-08-25 17:09:50 +00:00
Dan Gohman
c78f53e0af Eliminate an unnecessary cast.
llvm-svn: 112055
2010-08-25 17:09:03 +00:00
Daniel Dunbar
9b7c2ce591 ARM/Thumb2: Fix a misselect in getARMCmp, when attempting to adjust a signed
comparison that would overflow.
 - The other under/overflow cases can't actually happen because the immediates
   which would trigger them are legal (so we don't enter this code), but
   adjusted the style to make it clear the transform is always valid.

llvm-svn: 112053
2010-08-25 16:58:05 +00:00
Eric Christopher
d0404930db Regenerate.
llvm-svn: 112042
2010-08-25 08:45:06 +00:00
Eric Christopher
4bbe60e009 Remove getsect checks, the result is unused and is broken anyhow.
Fixes PR7967.

Owen: You added these, any reason?
llvm-svn: 112041
2010-08-25 08:44:54 +00:00
Eric Christopher
1bf07e75ac Do type checks before we bother to do everything else.
llvm-svn: 112039
2010-08-25 08:43:57 +00:00
Eric Christopher
f9155e9642 Add another basic test cribbed from the x86 fast-isel tests.
llvm-svn: 112036
2010-08-25 07:57:29 +00:00
Eric Christopher
0dddfc66d6 Run this on thumb and arm.
llvm-svn: 112035
2010-08-25 07:53:15 +00:00
Anton Korobeynikov
1544f79e36 Fix nasty mingw32 bug, which e.g. prevented llvm-gcc bootstrap there.
Mark _alloca call as clobberring EFLAGS, otherwise some DCE might remove
other flags-clobberring stuff (e.g. cmp instructions) occuring after
_alloca call.

llvm-svn: 112034
2010-08-25 07:50:11 +00:00
Eric Christopher
1645ee458a Make this testcase actually executed with fast-isel on arm.
llvm-svn: 112033
2010-08-25 07:47:00 +00:00
Eric Christopher
9e3831d7a9 Reorganize load mechanisms. Handle types in a little less fixed way.
Fix some todos.  No functional change.

llvm-svn: 112031
2010-08-25 07:23:49 +00:00
Eric Christopher
4a0b108f33 Apparently this is needed for llvm-link to link.
Untested.

llvm-svn: 112029
2010-08-25 06:45:22 +00:00
Eric Christopher
7637f43217 Allow strict subclasses of register classes, this way we can handle
ARM instructions with:

foo GPR, rGPR

which happens a lot.

llvm-svn: 112025
2010-08-25 04:58:56 +00:00
Daniel Dunbar
ff2830f285 buildbot/valgrind: Ignore leaks in /usr/bin/as.
llvm-svn: 112022
2010-08-25 03:40:20 +00:00
Bruno Cardoso Lopes
af72dd7362 PUNPCKLDQ should also be used for v4f32
llvm-svn: 112020
2010-08-25 02:55:40 +00:00
Bruno Cardoso Lopes
33aa4f7d1c teach lowering to get target specific nodes for pshufd, emulating the same isel behavior for now, so we can pass all vector shuffle tests
llvm-svn: 112017
2010-08-25 02:35:37 +00:00
Bruno Cardoso Lopes
c51b6e98c7 Convert test to use filecheck and make it more specific
llvm-svn: 112016
2010-08-25 01:47:16 +00:00
Owen Anderson
e0cdfa265a In the default address space, any GEP off of null results in a trap value if you try to load it. Thus,
any load in the default address space that completes implies that the base value that it GEP'd from
was not null.

llvm-svn: 112015
2010-08-25 01:16:47 +00:00
Eric Christopher
70a1a20101 Split out register class subclassing to a separate function and clean up
accordingly.  No functional change.

llvm-svn: 112008
2010-08-25 00:41:18 +00:00
Eric Christopher
109fe5d8f8 Fix comment.
llvm-svn: 111996
2010-08-24 23:21:59 +00:00
Dan Gohman
6e1e480f13 Don't include the is-function-local bit in the FoldingSetNodeID
for MDNodes, since this information is effectively implied by
the operands. This allow allows the code to avoid doing a
recursive is-it-really-function-local check in some cases.

llvm-svn: 111995
2010-08-24 23:21:12 +00:00
Chris Lattner
29cbd8d71c split the vector case of getCopyFromParts out to its own function,
no functionality change.

llvm-svn: 111994
2010-08-24 23:20:40 +00:00
Dan Gohman
8d2ed57538 Use Bits.data() instead of &Bits[0].
llvm-svn: 111993
2010-08-24 23:16:53 +00:00
Chris Lattner
ba2d0c8cca split the vector case out of getCopyToParts into its own function. No
functionality change.

llvm-svn: 111990
2010-08-24 23:10:06 +00:00
Chris Lattner
6246ba23da tidy up, reduce indentation
llvm-svn: 111982
2010-08-24 22:43:11 +00:00