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

1298 Commits

Author SHA1 Message Date
Chris Lattner
c95c7c90c9 Expand add/sub into ADD_PARTS/SUB_PARTS instead of a non-existant libcall.
llvm-svn: 19715
2005-01-20 18:52:28 +00:00
Chris Lattner
c662697319 Add support for targets that pass args in registers to calls.
llvm-svn: 19703
2005-01-19 20:24:35 +00:00
Chris Lattner
277ac2be70 Fold single use token factor nodes into other token factor nodes.
llvm-svn: 19701
2005-01-19 19:10:54 +00:00
Chris Lattner
85e0771f79 Realize the individual pieces of an expanded copytoreg/store/load are
independent of each other.

llvm-svn: 19700
2005-01-19 18:02:17 +00:00
Chris Lattner
743a36c818 Implement a way of expanding shifts. This applies to targets that offer
select operations or to shifts that are by a constant.  This automatically
implements (with no special code) all of the special cases for shift by 32,
shift by < 32 and shift by > 32.

llvm-svn: 19679
2005-01-19 04:19:40 +00:00
Chris Lattner
0df1935505 Zero is cheaper than sign extend.
llvm-svn: 19675
2005-01-18 21:57:59 +00:00
Chris Lattner
4360871e16 Fix some fixmes (promoting bools for select and brcond), fix promotion
of zero and sign extends.

llvm-svn: 19671
2005-01-18 19:27:06 +00:00
Chris Lattner
ff086f3016 Teach legalize to promote copy(from|to)reg, instead of making the isel pass
do it.  This results in better code on X86 for floats (because if strict
precision is not required, we can elide some more expensive double -> float
conversions like the old isel did), and allows other targets to emit
CopyFromRegs that are not legal for arguments.

llvm-svn: 19668
2005-01-18 17:54:55 +00:00
Chris Lattner
891aa537f7 Teach legalize to promote SetCC results.
llvm-svn: 19657
2005-01-18 02:59:52 +00:00
Chris Lattner
95307053ec Allow setcc operations to have nonbool types.
llvm-svn: 19656
2005-01-18 02:52:03 +00:00
Chris Lattner
ec55e3e529 Implement legalize of call nodes.
llvm-svn: 19617
2005-01-16 19:46:48 +00:00
Chris Lattner
0eca430af1 Revamp supported ops. Instead of just being supported or not, we now keep
track of how to deal with it, and provide the target with a hook that they
can use to legalize arbitrary operations in arbitrary ways.

Implement custom lowering for a couple of ops, implement promotion for select
operations (which x86 needs).

llvm-svn: 19613
2005-01-16 07:29:19 +00:00
Chris Lattner
0f4f239899 Implement some more missing promotions.
llvm-svn: 19606
2005-01-16 05:06:12 +00:00
Chris Lattner
742b77f9af Clarify assertion.
llvm-svn: 19597
2005-01-16 02:23:34 +00:00
Chris Lattner
01e2ce8a4c Move some information into the TargetLowering object.
llvm-svn: 19583
2005-01-16 01:11:45 +00:00
Chris Lattner
0777f84d53 legalize a bunch of operations that I missed.
llvm-svn: 19580
2005-01-16 00:38:00 +00:00
Chris Lattner
8c4c81d6b3 Fix some serious bugs in promotion.
llvm-svn: 19578
2005-01-16 00:17:42 +00:00
Chris Lattner
df02c93d90 Implement promotion of a whole bunch more operators. I think that this is
basically everything.

llvm-svn: 19576
2005-01-15 22:16:26 +00:00
Chris Lattner
1ab9009270 Add support for legalizing FP_ROUND_INREG, SIGN_EXTEND_INREG, and
ZERO_EXTEND_INREG for targets that don't support them.

llvm-svn: 19573
2005-01-15 07:15:18 +00:00
Chris Lattner
fdd07b4092 Add support for promoting ADD/MUL.
Add support for new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
Realize that if we do any promotions, we need to iterate SelectionDAG
construction.

llvm-svn: 19569
2005-01-15 06:18:18 +00:00
Chris Lattner
94b8a3e50c Add intitial support for promoting some operators.
llvm-svn: 19565
2005-01-15 05:21:40 +00:00
Chris Lattner
2dfbc4fddd Adjust to CopyFromReg changes, implement deletion of truncating/extending
stores/loads.

llvm-svn: 19562
2005-01-14 22:38:01 +00:00
Chris Lattner
0974002024 Start implementing truncating stores and extending loads.
llvm-svn: 19559
2005-01-14 22:08:15 +00:00
Chris Lattner
7a8788c9ac Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.
llvm-svn: 19535
2005-01-13 20:50:02 +00:00
Chris Lattner
37a5de6eb0 Legalize new node, add assertion.
llvm-svn: 19527
2005-01-13 17:59:25 +00:00
Chris Lattner
1b3b24f116 Fix sign extend to long. When coming from sbyte, we used to generate:
movsbl 4(%esp), %eax
        movl %eax, %edx
        sarl $7, %edx

Now we generate:

        movsbl 4(%esp), %eax
        movl %eax, %edx
        sarl $31, %edx

Which is right.

llvm-svn: 19515
2005-01-12 18:19:52 +00:00
Reid Spencer
c8c50250a1 Shut up warnings with GCC 3.4.3 about uninitialized variables.
llvm-svn: 19512
2005-01-12 14:53:45 +00:00
Chris Lattner
8de5a27681 Squelch optimized warning.
llvm-svn: 19475
2005-01-11 17:46:49 +00:00
Chris Lattner
963af6652b Teach legalize to lower MEMSET/MEMCPY/MEMMOVE operations if the target
does not support them.

llvm-svn: 19465
2005-01-11 05:57:22 +00:00
Chris Lattner
5433d8de29 Lower to the correct functions. This fixes FreeBench/fourinarow
llvm-svn: 19436
2005-01-10 21:02:37 +00:00
Chris Lattner
d674d08230 Fix a bug legalizing call instructions (make sure to remember all result
values), and eliminate some switch statements.

llvm-svn: 19417
2005-01-09 19:43:23 +00:00
Chris Lattner
ac23355362 Fix a minor bug legalizing dynamic_stackalloc. This allows us to compile
std::__pad<wchar_t, std::char_traits<wchar_t> >::_S_pad(std::ios_base&, wchar_t, wchar_t*, wchar_t const*, int, int, bool)

from libstdc++

llvm-svn: 19416
2005-01-09 19:07:54 +00:00
Chris Lattner
b3e31c6def Teach legalize to deal with DYNAMIC_STACKALLOC (aka a dynamic llvm alloca)
llvm-svn: 19415
2005-01-09 19:03:49 +00:00
Chris Lattner
3b52b2f6c2 Tighten up assertions.
llvm-svn: 19397
2005-01-08 20:35:13 +00:00
Chris Lattner
a58b3f48ef Silence VS warnings.
llvm-svn: 19384
2005-01-08 19:52:31 +00:00
Chris Lattner
38545e9952 Implement handling of most long operators through libcalls.
Fix a bug legalizing "ret (Val,Val)"

llvm-svn: 19375
2005-01-08 19:27:05 +00:00
Chris Lattner
fd84495692 Add support for FP->INT conversions and back.
llvm-svn: 19369
2005-01-08 08:08:56 +00:00
Chris Lattner
e759d984cf Implement the 'store FPIMM, Ptr' -> 'store INTIMM, Ptr' optimization for
all targets.

llvm-svn: 19366
2005-01-08 06:25:56 +00:00
Chris Lattner
6f461f406e Add support for truncating integer casts from long.
llvm-svn: 19358
2005-01-07 22:37:48 +00:00
Chris Lattner
79ca9cdb7e Fix a bug in load expansion legalization and ret legalization. This fixes
CodeGen/Generic/select.ll:castconst.

llvm-svn: 19357
2005-01-07 22:28:47 +00:00
Chris Lattner
a834e96647 Legalize unconditional branches too
llvm-svn: 19356
2005-01-07 22:12:08 +00:00
Chris Lattner
3f2ce91a99 Implement support for long GEP indices on 32-bit archs and support for
int GEP indices on 64-bit archs.

llvm-svn: 19354
2005-01-07 21:56:57 +00:00
Chris Lattner
60e3842843 implement legalization of a bunch more operators.
llvm-svn: 19352
2005-01-07 21:45:56 +00:00
Chris Lattner
8c6c12da86 Fix another bug legalizing calls!
llvm-svn: 19350
2005-01-07 21:35:32 +00:00
Chris Lattner
d671aa053c Fix a bug legalizing calls
llvm-svn: 19348
2005-01-07 21:34:13 +00:00
Chris Lattner
3871313761 After legalizing a DAG, delete dead nodes to save space.
llvm-svn: 19346
2005-01-07 21:09:37 +00:00
Chris Lattner
39baa91b9a Teach legalize how to handle condbranches
llvm-svn: 19339
2005-01-07 08:19:42 +00:00
Chris Lattner
fd473edcd8 Initial implementation of the DAG legalization. This still has a long way
to go, but it does work for some non-trivial cases now.

llvm-svn: 19329
2005-01-07 07:47:09 +00:00