Commit Graph

20044 Commits

Author SHA1 Message Date
Chris Lattner
47f01f1b44 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23277 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 19:50:41 +00:00
Chris Lattner
751eabf7bd Fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23276 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 19:47:28 +00:00
Chris Lattner
ca572be3a1 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23275 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:48:47 +00:00
Chris Lattner
a1207a5add Add support for automatically created anonymous definitions.
This implements Regression/TableGen/AnonDefinitionOnDemand.td


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23274 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:48:23 +00:00
Chris Lattner
d0d1d39541 x and X should be structurally identical
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23273 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:47:43 +00:00
Chris Lattner
33694cfc0f new expression type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23272 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:47:21 +00:00
Chris Lattner
ba4b144764 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23271 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:22:57 +00:00
Chris Lattner
69b545e877 Tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23270 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 18:22:35 +00:00
Chris Lattner
fbf8e57639 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")


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23269 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 17:45:12 +00:00
Chris Lattner
bfde080ce0 add patterns for x?oris?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23268 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 17:40:49 +00:00
Chris Lattner
3e63ead49b add patterns to the addi/addis/mulli etc instructions. Define predicates
for matching signed 16-bit and shifted 16-bit ppc immediates


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23267 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 17:33:10 +00:00
Chris Lattner
d1cdc7028c Add patterns for some new instructions, allowing the use of the ineg fragment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23266 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-08 17:01:54 +00:00
Chris Lattner
e29dca4d83 add some missing PPC backend files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23265 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 23:57:00 +00:00
Chris Lattner
777fd2742d Add tblgen fpcmp and the nightly tester to the utils folder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23264 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 23:53:49 +00:00
Chris Lattner
8c65344a15 ignore generated files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23263 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 23:47:44 +00:00
Chris Lattner
19c0907ba1 Remove some cases handled by the generated portion of the isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23262 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 23:45:15 +00:00
Chris Lattner
54cb8fd814 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23261 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 23:44:43 +00:00
Nate Begeman
9980119270 Another round of dag combiner changes. This fixes some missing XOR folds
as well as fixing how we replace old values with new values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23260 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 23:25:52 +00:00
Chris Lattner
dc6e2e0a5f Fix a bug that Tzu-Chien Chiu noticed: live interval analysis does NOT
preserve livevar


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23259 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 17:34:39 +00:00
Nate Begeman
f89d78d7c7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23258 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 16:09:19 +00:00
Chris Lattner
c98d823649 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23257 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 05:45:33 +00:00
Chris Lattner
3eb3369a25 Print:
'' is not a recognized processor for this target (ignoring processor)

instead of:

 is not a recognized processor for this target (ignoring processor)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23256 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 05:44:14 +00:00
Chris Lattner
1e111c7bbb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23255 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 05:37:01 +00:00
Chris Lattner
fde3f3061d Add a new argument to ReplaceAllUsesWith to keep track of nodes deleted by
this method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23254 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 05:36:18 +00:00
Nate Begeman
2300f55046 Add an option to the DAG Combiner to enable it for beta runs, and turn on
that option for PowerPC's beta.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23253 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-07 00:15:36 +00:00
Chris Lattner
6b5d9cdfcf Rename a class. These files are being migrated to the new isel and I want to
reuse the names


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23252 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 22:51:34 +00:00
Nate Begeman
eeff9b055c Test the new 64bit i64<->fp functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23251 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 22:23:15 +00:00
Nate Begeman
c09eeec0eb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23250 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 22:03:27 +00:00
Chris Lattner
46a780056b regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23249 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 21:23:27 +00:00
Chris Lattner
9978332473 Tighten up the specification to allow TableGen/nested-comment.td to pass
(fixing a bug where / in a /* */ comment would cause it to not close).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23248 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 21:23:09 +00:00
Chris Lattner
5838b21cde new testcase: tblgen should grok this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23247 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 21:22:15 +00:00
Andrew Lenharth
46a776e664 Fix up the AssertXext problem, as well as adding it at calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23246 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 17:00:23 +00:00
Nate Begeman
92cce90c66 Add note about future optimization noted in the ppc compiler writer's guide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23245 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 15:30:48 +00:00
Nate Begeman
d401dff796 Add accessor for 64bit flag, so that we can tell when it is safe to
generate the fun in-register fp<->long instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23244 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 15:30:12 +00:00
Nate Begeman
83e75ecd27 Next round of DAGCombiner changes. This version now passes all the tests
I have run so far when run before Legalize.  It still needs to pick up the
SetCC folds, and nodes that use SetCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23243 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 04:43:02 +00:00
Chris Lattner
2286cab238 Add a requirement, patch contributed by Henrik Bach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23242 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-06 04:07:15 +00:00
Andrew Lenharth
f71df33671 revert part of the last change, should fix regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23241 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-04 06:12:19 +00:00
Chris Lattner
e147ceb2fa explicitly specify an operands list for patterns with inputs (e.g. neg)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23240 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-03 01:28:40 +00:00
Chris Lattner
6cd40d5888 include the dag isel fragment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23239 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-03 01:17:22 +00:00
Chris Lattner
bb38b6f8c0 ask for a dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23238 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-03 01:15:41 +00:00
Chris Lattner
f31f09e67c allow for a target to ask for a dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23237 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-03 01:15:25 +00:00
Chris Lattner
4a24c645c8 Add an option and stuff implementation of a dag isel emitter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23236 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-03 01:14:03 +00:00
Chris Lattner
6a8a21ced4 Fix a checking failure in gs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23235 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-03 01:04:40 +00:00
Chris Lattner
25dae727f3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23234 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-03 00:53:47 +00:00
Chris Lattner
7cd09cf942 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23233 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-03 00:21:51 +00:00
Chris Lattner
6159fb20c2 Add AND/OR/XOR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23232 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 22:35:53 +00:00
Nate Begeman
646d7e2727 Next round of DAG Combiner changes. Just need to support multiple return
values, and then we should be able to hook it up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23231 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 21:18:40 +00:00
Chris Lattner
218a15d02c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23230 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 21:18:00 +00:00
Chris Lattner
6fdcb250d5 Clean up some code from the last checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23229 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 20:32:45 +00:00
Chris Lattner
99c25b86aa Fix a bug in legalize where it would emit two calls to libcalls that return
i64 values on targets that need that expanded to 32-bit registers.  This fixes
PowerPC/2005-09-02-LegalizeDuplicatesCalls.ll and speeds up 189.lucas from
taking 122.72s to 81.96s on my desktop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23228 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 20:26:58 +00:00