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

19978 Commits

Author SHA1 Message Date
Chris Lattner
85884e9b8a Fix a crash viewing dags that have target nodes in them
llvm-svn: 23300
2005-09-09 22:35:03 +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
e7610bc599 Use continue in the use-processing loop to make it clear what the early exits
are, simplify logic, and cause things to not be nested as deeply.  This also
uses MRI->areAliases instead of an explicit loop.

No functionality change, just code cleanup.

llvm-svn: 23296
2005-09-09 20:29:51 +00:00
Nate Begeman
8422b3637e Last round of 2-node folds from SD.cpp. Will move on to 3 node ops such
as setcc and select next.

llvm-svn: 23295
2005-09-09 19:49:52 +00:00
Chris Lattner
fc17fe0e6d remove debugging code *slaps head*
llvm-svn: 23294
2005-09-09 19:19:20 +00:00
Chris Lattner
8d8506f8e2 When spilling a live range that is used multiple times by one instruction,
only add a reload live range once for the instruction.  This is one step
towards fixing a regalloc pessimization that Nate notice, but is later undone
by the spiller (so no code is changed).

llvm-svn: 23293
2005-09-09 19:17:47 +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
Jim Laskey
e92c64bfe7 Added targets to speed up build of llc.
llvm-svn: 23291
2005-09-09 17:50:20 +00:00
Chris Lattner
491dda08c5 New testcase, neither should require a register-register copy
llvm-svn: 23290
2005-09-09 17:48:57 +00:00
Chris Lattner
ada7ac14a1 add an accessor to provide more checking
llvm-svn: 23289
2005-09-09 01:15:01 +00:00
Chris Lattner
2490f8f606 use new accessors to simplify code. Add checking to make sure top-level instr
definitions are void

llvm-svn: 23288
2005-09-09 01:11:44 +00:00
Chris Lattner
2b656c6102 add some accessors
llvm-svn: 23287
2005-09-09 01:11:17 +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
334e21eb98 Fix incorrect comment
llvm-svn: 23285
2005-09-08 23:26:30 +00:00
Chris Lattner
a6d21c974c Implement a complete type inference system for dag patterns, based on the
constraints defined in the DAG node definitions in the .td files.  This
allows us to infer (and check!) the types for all nodes in the current
ppc .td file.  For example, instead of:

Inst pattern EQV:       (set GPRC:i32:$rT, (xor (xor GPRC:i32:$rA, GPRC:i32:$rB), (imm)<<Predicate_immAllOnes>>))

we now fully infer:

Inst pattern EQV:       (set:void GPRC:i32:$rT, (xor:i32 (xor:i32 GPRC:i32:$rA, GPRC:i32:$rB), (imm:i32)<<Predicate_immAllOnes>>))

from:  (set GPRC:$rT, (not (xor GPRC:$rA, GPRC:$rB)))
llvm-svn: 23284
2005-09-08 23:22:48 +00:00
Chris Lattner
a3a924efdd whitespace/comment changes, no functionality diffs
llvm-svn: 23283
2005-09-08 23:17:26 +00:00
Chris Lattner
e2fb8f3a77 Compute the value types that are natively supported by a target.
llvm-svn: 23282
2005-09-08 21:43:21 +00:00
Chris Lattner
152a72de2c Parse information about type constraints on SDNodes
llvm-svn: 23281
2005-09-08 21:27:15 +00:00
Chris Lattner
ef07fffe37 use node info in the one place we currently use it
llvm-svn: 23280
2005-09-08 21:04:46 +00:00
Chris Lattner
d9930002aa start parsing SDNode info records
llvm-svn: 23279
2005-09-08 21:03:01 +00:00
Nate Begeman
1675c67c62 Move yet more folds over to the dag combiner from sd.cpp
llvm-svn: 23278
2005-09-08 20:18:10 +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
515c19f56d Fix indentation
llvm-svn: 23276
2005-09-08 19:47:28 +00:00
Chris Lattner
b07d2cc2eb regenerate
llvm-svn: 23275
2005-09-08 18:48:47 +00:00
Chris Lattner
df9876cdb7 Add support for automatically created anonymous definitions.
This implements Regression/TableGen/AnonDefinitionOnDemand.td

llvm-svn: 23274
2005-09-08 18:48:23 +00:00
Chris Lattner
f315628427 x and X should be structurally identical
llvm-svn: 23273
2005-09-08 18:47:43 +00:00
Chris Lattner
08274846d1 new expression type
llvm-svn: 23272
2005-09-08 18:47:21 +00:00
Chris Lattner
9e7e8d43e8 regenerate
llvm-svn: 23271
2005-09-08 18:22:57 +00:00
Chris Lattner
2e3ed074d8 Tabs to spaces.
llvm-svn: 23270
2005-09-08 18:22:35 +00:00
Chris Lattner
03637c7200 Keep names even when inlining. This allows us to realize that ADDI is:
(set GPRC:i32:$rD, (add GPRC:i32:$rA, (imm)<<Predicate_immSExt16>>:$imm))

not:

(set GPRC:i32:$rD, (add GPRC:i32:$rA, (imm)<<Predicate_immSExt16>>))

(we keep the ":$imm")

llvm-svn: 23269
2005-09-08 17:45:12 +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
8449e3ad5f add some missing PPC backend files
llvm-svn: 23265
2005-09-07 23:57:00 +00:00
Chris Lattner
3c6d2bd13b Add tblgen fpcmp and the nightly tester to the utils folder
llvm-svn: 23264
2005-09-07 23:53:49 +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
65c98b6441 Initial cut of the dag isel generator. This is still very much a work in
progress.  It correctly parses instructions and pattern fragments and glues
together pattern fragments into instructions.

The only code it generates currently is some boilerplate code for things
like the EntryNode.

llvm-svn: 23261
2005-09-07 23:44:43 +00:00
Nate Begeman
c0f764ada4 Another round of dag combiner changes. This fixes some missing XOR folds
as well as fixing how we replace old values with new values.

llvm-svn: 23260
2005-09-07 23:25:52 +00:00
Chris Lattner
b3516c123f Fix a bug that Tzu-Chien Chiu noticed: live interval analysis does NOT
preserve livevar

llvm-svn: 23259
2005-09-07 17:34:39 +00:00
Nate Begeman
e8db0c961a Implement a common missing fold, (add (add x, c1), c2) -> (add x, c1+c2).
This restores all of stanford to being identical with and without the dag
combiner with the add folding turned off in sd.cpp.

llvm-svn: 23258
2005-09-07 16:09:19 +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
Chris Lattner
482f71733a Fix a bug nate ran into with replacealluseswith. In the recursive cse case,
we were losing a node, causing an assertion to fail.  Now we eagerly delete
discovered CSE's, and provide an optional vector to keep track of these
discovered equivalences.

llvm-svn: 23255
2005-09-07 05:37:01 +00:00
Chris Lattner
b68c833b48 Add a new argument to ReplaceAllUsesWith to keep track of nodes deleted by
this method

llvm-svn: 23254
2005-09-07 05:36:18 +00:00
Nate Begeman
143dc2039d Add an option to the DAG Combiner to enable it for beta runs, and turn on
that option for PowerPC's beta.

llvm-svn: 23253
2005-09-07 00:15:36 +00:00
Chris Lattner
b529b1bdbd Rename a class. These files are being migrated to the new isel and I want to
reuse the names

llvm-svn: 23252
2005-09-06 22:51:34 +00:00
Nate Begeman
63817e5779 Test the new 64bit i64<->fp functionality
llvm-svn: 23251
2005-09-06 22:23:15 +00:00