Chris Lattner
4a8f6d97ff
Implement the isLoadFromStackSlot interface
...
llvm-svn: 23387
2005-09-19 05:23:44 +00:00
Chris Lattner
45d4ddd903
Implement hook for ppc
...
llvm-svn: 23374
2005-09-17 01:03:26 +00:00
Chris Lattner
aa57457e20
disable this for now
...
llvm-svn: 23366
2005-09-15 21:44:00 +00:00
Chris Lattner
cd5eeef9ee
Give all operands names
...
llvm-svn: 23357
2005-09-14 21:11:13 +00:00
Chris Lattner
54139f0b83
give all operands names
...
llvm-svn: 23356
2005-09-14 21:10:24 +00:00
Chris Lattner
3e8d9d8d08
Fix some issues exposed by more testing. XORIS had the wrong operands
...
specified. The various *imm operands defined by PPC are really all i32,
even though the actual immediate is restricted to a smaller value in it.
llvm-svn: 23352
2005-09-14 20:53:05 +00:00
Chris Lattner
b97354c974
Fix some bugs noticed by new checking code
...
llvm-svn: 23350
2005-09-14 18:18:39 +00:00
Chris Lattner
fa644b391f
fix a major regression from my patch this afternoon
...
llvm-svn: 23347
2005-09-14 06:06:45 +00:00
Chris Lattner
c7fb54af0b
we don't need this proto any longer
...
llvm-svn: 23342
2005-09-13 22:05:21 +00:00
Chris Lattner
ffab20ddeb
move the #include for the generated code into the isel class body so we
...
can use/define class methods
llvm-svn: 23339
2005-09-13 22:03:06 +00:00
Chris Lattner
16700b9beb
Change the arg lowering code to use copyfromreg from vregs associated
...
with incoming arguments instead of the pregs themselves. This fixes
the scheduler from causing problems by moving a copyfromreg for an argument
to after a select_cc node (now it can, and bad things won't happen).
llvm-svn: 23334
2005-09-13 19:33:40 +00:00
Chris Lattner
b56110ff54
This has been moved to the target-indep code
...
llvm-svn: 23333
2005-09-13 19:32:18 +00:00
Chris Lattner
00bfb7812d
This code is no longer needed, it is moved to the target-indep code
...
llvm-svn: 23332
2005-09-13 19:31:44 +00:00
Chris Lattner
075b4458cf
Majik numbers are bad
...
llvm-svn: 23330
2005-09-13 19:03:13 +00:00
Chris Lattner
766369cf45
Remove some dead vectors
...
llvm-svn: 23329
2005-09-13 18:47:49 +00:00
Chris Lattner
00e9278551
PowerPC cannot truncstore i1 natively
...
llvm-svn: 23304
2005-09-10 00:21:06 +00:00
Chris Lattner
ad8728e9a6
I forgot that we always spill fp values as 64-bits. Implement spill folding
...
for FP as well. This triggers a couple dozen times on 177.mesa (for example).
llvm-svn: 23299
2005-09-09 21:59:44 +00:00
Chris Lattner
da77012825
Fix a problem that Nate noticed, where spill code was not getting coallesced
...
with copies, leading to code like this:
lwz r4, 380(r1)
or r10, r4, r4 ;; Last use of r4
By teaching the PPC backend how to fold spills into copies, we now get this
code:
lwz r10, 380(r1)
wow. :)
This reduces a testcase nate sent me from 1505 instructions to 1484.
Note that this could handle FP values but doesn't currently, for reasons
mentioned in the patch
llvm-svn: 23298
2005-09-09 21:46:49 +00:00
Chris Lattner
c3959855af
code cleanup
...
llvm-svn: 23297
2005-09-09 20:51:08 +00:00
Chris Lattner
8d654c32cb
Teach the code generator that rlwimi is commutable if the rotate amount
...
is zero. This lets the register allocator elide some copies in some cases.
This implements CodeGen/PowerPC/rlwimi-commute.ll
llvm-svn: 23292
2005-09-09 18:17:41 +00:00
Chris Lattner
e8cc191dd6
Introduce two new concepts:
...
1. Add support for defining Pattern's, which can match expressions when there
is no instruction that directly implements something. Instructions usually
implicitly define patterns.
2. Add support for defining SDNodeXForm's, which are node transformations.
This seperates the concept of a node xform out from the existing predicate
support.
Using this new stuff, we add a few instruction patterns, one for testing, and
two for OR/XOR by an arbitrary immediate.
llvm-svn: 23286
2005-09-09 00:39:56 +00:00
Chris Lattner
a3a924efdd
whitespace/comment changes, no functionality diffs
...
llvm-svn: 23283
2005-09-08 23:17:26 +00:00
Chris Lattner
ca093b4f92
Add a bunch of stuff needed for node type inference. Move 'BLR' down with
...
the rest of the instructions, add comment markers to seperate portions of
the file into logical parts
llvm-svn: 23277
2005-09-08 19:50:41 +00:00
Chris Lattner
7d0a6e4db4
add patterns for x?oris?
...
llvm-svn: 23268
2005-09-08 17:40:49 +00:00
Chris Lattner
c23c950d73
add patterns to the addi/addis/mulli etc instructions. Define predicates
...
for matching signed 16-bit and shifted 16-bit ppc immediates
llvm-svn: 23267
2005-09-08 17:33:10 +00:00
Chris Lattner
f0d65ab5d3
Add patterns for some new instructions, allowing the use of the ineg fragment.
...
llvm-svn: 23266
2005-09-08 17:01:54 +00:00
Chris Lattner
1f7f2544fc
ignore generated files
...
llvm-svn: 23263
2005-09-07 23:47:44 +00:00
Chris Lattner
1769be4699
Remove some cases handled by the generated portion of the isel
...
llvm-svn: 23262
2005-09-07 23:45:15 +00:00
Chris Lattner
617b26ddd7
On non-apple systems, when using -march=ppc32, do not print:
...
'' is not a recognized processor for this target (ignoring processor)
Default to "generic" instead of "" for the default CPU.
llvm-svn: 23257
2005-09-07 05:45:33 +00:00
Chris Lattner
4c5e794a9c
Print:
...
'' is not a recognized processor for this target (ignoring processor)
instead of:
is not a recognized processor for this target (ignoring processor)
llvm-svn: 23256
2005-09-07 05:44:14 +00:00
Nate Begeman
718cae4eba
Implement i64<->fp using the fctidz/fcfid instructions on PowerPC when we
...
are allowed to generate 64-bit-only PowerPC instructions for 32 bit hosts,
such as the PowerPC 970.
This speeds up 189.lucas from 81.99 to 32.64 seconds.
llvm-svn: 23250
2005-09-06 22:03:27 +00:00
Andrew Lenharth
6f61810447
Fix up the AssertXext problem, as well as adding it at calls
...
llvm-svn: 23246
2005-09-06 17:00:23 +00:00
Nate Begeman
a94912c555
Add note about future optimization noted in the ppc compiler writer's guide
...
llvm-svn: 23245
2005-09-06 15:30:48 +00:00
Nate Begeman
f1994fa030
Add accessor for 64bit flag, so that we can tell when it is safe to
...
generate the fun in-register fp<->long instructions.
llvm-svn: 23244
2005-09-06 15:30:12 +00:00
Andrew Lenharth
00a229859e
revert part of the last change, should fix regressions
...
llvm-svn: 23241
2005-09-04 06:12:19 +00:00
Chris Lattner
e9b488e262
explicitly specify an operands list for patterns with inputs (e.g. neg)
...
llvm-svn: 23240
2005-09-03 01:28:40 +00:00
Chris Lattner
dcb9830e25
include the dag isel fragment
...
llvm-svn: 23239
2005-09-03 01:17:22 +00:00
Chris Lattner
4186020e3b
ask for a dag isel
...
llvm-svn: 23238
2005-09-03 01:15:41 +00:00
Chris Lattner
cbfe5d4180
Change the isel to not break out of the big giant switch. Instead, the
...
switch should never be exited, so its bottom is now unreachable.
llvm-svn: 23234
2005-09-03 00:53:47 +00:00
Chris Lattner
47c5e11f36
rearrange logical ops to group them together more consistently.
...
Define the PatFrag class which can be used to define subpatterns to match
things with. Define 'not', and use it to define the patterns for andc,
nand, etc.
llvm-svn: 23233
2005-09-03 00:21:51 +00:00
Chris Lattner
a1a3e767e3
Add AND/OR/XOR
...
llvm-svn: 23232
2005-09-02 22:35:53 +00:00
Chris Lattner
0b07b6f9a1
Add some initial patterns to simple binary instructions, though they
...
currently don't do anything. This elides patterns for binary operators
that ping on the carry flag, since we don't model it yet.
This patch also removes PPC::SUB, because it is dead.
llvm-svn: 23230
2005-09-02 21:18:00 +00:00
Chris Lattner
e1a69ba1bd
turn on dag isel by default
...
llvm-svn: 23226
2005-09-02 19:53:54 +00:00
Jim Laskey
1f9c40400c
Add help support for -mcpu and -mattr.
...
llvm-svn: 23222
2005-09-02 19:27:43 +00:00
Andrew Lenharth
94da25ae50
Pull out Lowering in preperation for multiple ISels. Oh, and get rid of some stuff
...
llvm-svn: 23220
2005-09-02 18:46:02 +00:00
Chris Lattner
813a73e8e9
Decouple fsqrt from gpul optimizations, implementing fsqrt.ll.
...
Remove the -enable-gpopt option which is subsumed by feature flags.
llvm-svn: 23218
2005-09-02 18:33:05 +00:00
Jeff Cohen
930e81f03b
Fix VC++ build errors
...
llvm-svn: 23210
2005-09-02 02:51:42 +00:00
Chris Lattner
6f9e01aa94
Restore this patch now that the latent bug has been fixed
...
llvm-svn: 23209
2005-09-02 01:24:55 +00:00
Chris Lattner
a58ee78b78
Revert the previous patch which causes a mysterious regression in toast.
...
llvm-svn: 23207
2005-09-02 00:47:05 +00:00
Chris Lattner
70e3e44ec4
Handle any_extend like zext
...
llvm-svn: 23202
2005-09-02 00:16:09 +00:00