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

5914 Commits

Author SHA1 Message Date
Evan Cheng
45496b349f Custom lower bit_convert i64 -> f64 into FMDRR. This is now happening with legalizetypes.
llvm-svn: 58714
2008-11-04 19:57:48 +00:00
Duncan Sands
58ebf09772 Fix PR3011: LegalizeTypes support for scalarizing
SELECT_CC.

llvm-svn: 58706
2008-11-04 17:31:08 +00:00
Dan Gohman
0ba8aad1af The ANDMask node folds to a constant, and isn't the node that needs to
have its node id set. The new and and shift nodes are the nodes that need
the IDs. This fixes PR2982.

llvm-svn: 58655
2008-11-03 23:43:55 +00:00
Devang Patel
c959b4dbd3 Ignore conditions that are outside the loop.
llvm-svn: 58631
2008-11-03 19:38:07 +00:00
Devang Patel
78b7de25d1 Turn floating point IVs into integer IVs where possible.
This allows SCEV users to effectively calculate trip count.
LSR later on transforms back integer IVs to floating point IVs
later on to avoid int-to-float casts inside the loop.

llvm-svn: 58625
2008-11-03 18:32:19 +00:00
Dan Gohman
edf3dc97c2 Change how extended types are represented in MVTs. Instead of fiddling
bits, use a union of a SimpleValueType enum and a regular Type*.

This increases the size of MVT on 64-bit hosts from 32 bits to 64 bits.
In most cases, this doesn't add significant overhead. There are places
in codegen that use arrays of MVTs, so these are now larger, but
they're small in common cases.

This eliminates restrictions on the size of integer types and vector
types that can be represented in codegen. As the included testcase
demonstrates, it's now possible to codegen very large add operations.
There are still some complications with using very large types. PR2880
is still open so they can't be used as return values on normal targets,
there are no libcalls defined for very large integers so operations
like multiply and divide aren't supported.

This also introduces a minimal tablgen Type library, capable of
handling IntegerType and VectorType. This will allow parts of
TableGen that don't depend on using SimpleValueType values to handle
arbitrary integer and vector types.

llvm-svn: 58623
2008-11-03 17:56:27 +00:00
Anton Korobeynikov
4b194f9aac Testcase for recent llvm-gcc fix
llvm-svn: 58611
2008-11-03 14:43:31 +00:00
Duncan Sands
a9047944bc Make VAARG work with x86 long double (which is
10 bytes long, but is passed in 12/16 bytes).

llvm-svn: 58608
2008-11-03 11:51:11 +00:00
Nick Lewycky
cc1b7622a5 Don't crash analyzing certain quadratics (addrec of {X,+,Y,+,1}).
We're still waiting on code that actually analyzes them properly.

llvm-svn: 58592
2008-11-03 02:43:49 +00:00
Nick Lewycky
49abbde699 Changes from Duncan's review:
* merge two weak functions by making them both alias a third non-weak fn
 * don't reimplement CallSite::hasArgument
 * whitelist the safe linkage types

llvm-svn: 58568
2008-11-02 16:46:26 +00:00
Anton Korobeynikov
e0b6dc8753 Testcase for PR2691
llvm-svn: 58567
2008-11-02 16:46:17 +00:00
Nick Lewycky
15a23d029c Add a new MergeFunctions pass. It finds identical functions and merges them.
This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.

llvm-svn: 58557
2008-11-02 05:52:50 +00:00
Nick Lewycky
bcadcbb1ec Fix demanded bits analysis with srem by negative number. Based on a patch
by Richard Osborne.

llvm-svn: 58555
2008-11-02 02:41:50 +00:00
Dan Gohman
1f1ebc5389 Fix this recently moved code to use the correct type. CI is now a
ConstantInt, and SI is the original cast instruction. This fixes
PR2996.

llvm-svn: 58549
2008-11-02 00:17:33 +00:00
Anton Korobeynikov
f3b4466215 Testcase for PR2613
llvm-svn: 58537
2008-10-31 20:10:49 +00:00
Duncan Sands
d2500010a3 Add a bunch of libcalls for ppcf128 that were somehow
completely forgotten about when writing LegalizeTypes.

llvm-svn: 58508
2008-10-31 14:06:52 +00:00
Dan Gohman
481e1fd0a6 Use MOVSSmr instead of EXTRACTPSmr in the case of extracting
vector element 0 for a store, as it's smaller and faster.

llvm-svn: 58483
2008-10-31 00:57:24 +00:00
Duncan Sands
44a5a9b4ea Testcase for PR2987.
llvm-svn: 58459
2008-10-30 21:13:11 +00:00
Dan Gohman
50061675c5 Canonicalize sext(i1) to i1?-1:0, and update various instcombine
optimizations accordingly.

llvm-svn: 58457
2008-10-30 20:40:10 +00:00
Duncan Sands
1903629c49 Testcase for PR2986.
llvm-svn: 58456
2008-10-30 20:34:30 +00:00
Daniel Dunbar
097da598fb Add InlineCost class for represent the estimated cost of inlining a
function.
 - This explicitly models the costs for functions which should
   "always" or "never" be inlined. This fixes bugs where such costs
   were not previously respected.

llvm-svn: 58450
2008-10-30 19:26:59 +00:00
Scott Michel
5b588212d8 Resolve bug 2947: vararg-marked functions must spill registers R3-R79 to stack
so that va_start/va_arg/et.al. will walk arguments correctly for Cell SPU.

N.B.: Because neither clang nor llvm-gcc-4.2 can be built for CellSPU, this is
still unexorcised code.

llvm-svn: 58415
2008-10-30 01:51:48 +00:00
Chris Lattner
a99dc2692a add testcase for PR2964
llvm-svn: 58393
2008-10-29 18:42:22 +00:00
Duncan Sands
c5e736bb1b Testcase for PR2917.
llvm-svn: 58389
2008-10-29 18:06:20 +00:00
Chris Lattner
4af91a146a Fix PR2967 by not deleting volatile load/stores that occur before unreachable.
I don't really see this as being needed, but there is little harm from doing
it.

llvm-svn: 58385
2008-10-29 17:46:26 +00:00
Duncan Sands
caffd6f944 Make the declaration of bzero match size_t on
x86-64-linux.

llvm-svn: 58383
2008-10-29 15:57:37 +00:00
Duncan Sands
fd032c5bef Fix PR2977: LegalizeTypes support for expanding
VAARG.

llvm-svn: 58379
2008-10-29 14:25:28 +00:00
Evan Cheng
6125b9e097 - More pre-split fixes: spill slot live interval computation bug; restore point bug.
- If a def is spilt, remember its spill index to allow its reuse.

llvm-svn: 58375
2008-10-29 08:39:34 +00:00
Dan Gohman
3ceee36545 (A & sext(C)) | (B & ~sext(C) -> C ? A : B
llvm-svn: 58351
2008-10-28 22:38:57 +00:00
Duncan Sands
a64641fbd2 Fix darwin ppc llvm-gcc build breakage: intercept
ppcf128 to i32 conversion and expand it into a code
sequence like in LegalizeDAG.  This needs custom
ppc lowering of FP_ROUND_INREG, so turn that on and
make it work with LegalizeTypes.  Probably PPC should
simply custom lower the original conversion.

llvm-svn: 58329
2008-10-28 15:00:32 +00:00
Duncan Sands
da35d6f7d6 Turn off LegalizeTypes for this test for the
moment, while waiting for a proper solution.

llvm-svn: 58324
2008-10-28 09:55:04 +00:00
Duncan Sands
ce82e0aa82 Fix a testcase provided by Bill in which the node
id could end up being wrong mostly because of
forgetting to remap new nodes that morphed into
processed nodes through CSE.

llvm-svn: 58323
2008-10-28 09:38:36 +00:00
Chris Lattner
63e92876e0 Fix a nasty miscompilation of 176.gcc on linux/x86 where we synthesized
a memset using 16-byte XMM stores, but where the stack realignment code
didn't work.  Until it does (PR2962) disable use of xmm regs in memcpy
and memset formation for linux and other targets with insufficiently
aligned stacks.

This is part of PR2888

llvm-svn: 58317
2008-10-28 05:49:35 +00:00
Evan Cheng
9bbf76a1e9 Avoid putting a split past the end of the live range; always shrink wrap live interval in the barrier mbb.
llvm-svn: 58309
2008-10-28 00:47:49 +00:00
Evan Cheng
056ef89e68 Remove val# defined by a remat'ed def that is now dead.
llvm-svn: 58294
2008-10-27 23:21:01 +00:00
Chris Lattner
3722193550 rename vec_spat -> vec_splat, pointed out by duncan
llvm-svn: 58260
2008-10-27 18:28:24 +00:00
Duncan Sands
a6bbc047d5 Turn on LegalizeTypes, the new type legalization
codegen infrastructure, by default.  Please report
any breakage to the mailing lists.

llvm-svn: 58232
2008-10-27 08:42:46 +00:00
Evan Cheng
3bcbccf563 For now, don't split live intervals around x87 stack register barriers. FpGET_ST0_80 must be right after a call instruction (and ADJCALLSTACKUP) so we need to find a way to prevent reload of x87 registers between them.
llvm-svn: 58230
2008-10-27 07:14:50 +00:00
Chris Lattner
a57ac16183 no need to print output
llvm-svn: 58228
2008-10-27 06:56:35 +00:00
Chris Lattner
9737bef5a1 remove eh output from this test.
llvm-svn: 58196
2008-10-26 18:53:07 +00:00
Evan Cheng
8a7f04e7c2 Do not shrink wrap live interval in a mbb if it's livein any of its successor blocks. The mbb can be revisited again after all of the successors are processed.
llvm-svn: 58184
2008-10-26 07:49:03 +00:00
Evan Cheng
db1c135283 Handle cases where there aren't uses in the barrier mbb.
llvm-svn: 58174
2008-10-25 23:49:39 +00:00
Gordon Henriksen
e5b0182e94 Related to PR2911, reject as invalid non-pointer GC roots.
llvm-svn: 58143
2008-10-25 16:28:35 +00:00
Evan Cheng
0c78ace7dc If val# def is ~0U, meaning it's defined by a PHI, and it's previously split, spill before the barrier because it's impossible to determine if all the defs are spilled in the same spill slot.
llvm-svn: 58129
2008-10-25 00:52:41 +00:00
Dale Johannesen
834f23dbed Be kind to non-x86 hosts.
llvm-svn: 58113
2008-10-24 21:20:25 +00:00
Duncan Sands
4b148a29ef Fix translateX86CC: if SetCCOpcode is SETULE and
LHS is a foldable load, then LHS and RHS are swapped
and SetCCOpcode is changed to SETUGT.  But the later
code is expecting operands to be the wrong way round
for SETUGT, but they are not in this case, resulting
in an inverted compare.  The solution is to move the
load normalization before the correction for SETUGT.
This bug was tickled by LegalizeTypes which happened
to legalize the testcase slightly differently to
LegalizeDAG.

llvm-svn: 58092
2008-10-24 13:03:10 +00:00
Nick Lewycky
44356e13da Don't try to create a mask when we don't need one. Fixes a crash.
llvm-svn: 58075
2008-10-24 06:14:27 +00:00
Evan Cheng
a7a0aabf99 Avoid splitting an interval multiple times; avoid splitting re-materializable val# (for now).
llvm-svn: 58068
2008-10-24 02:05:00 +00:00
Chris Lattner
493cae1ca3 make this test not depend on how the system header defines memset.
llvm-svn: 58016
2008-10-23 00:24:51 +00:00
Gordon Henriksen
16e190fb8b [PR2886] Ignore stderr from ocamlc since it prints unresolvable warnings on some platforms.
llvm-svn: 57976
2008-10-22 12:41:54 +00:00