Chris Lattner [Mon, 12 Sep 2005 05:50:15 +0000 (05:50 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23312
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Sep 2005 05:30:06 +0000 (05:30 +0000)]
Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23311
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 12 Sep 2005 05:29:43 +0000 (05:29 +0000)]
Rearrange two rules, which apparently makes some versions of bison happier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23310
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 11 Sep 2005 03:50:38 +0000 (03:50 +0000)]
Make sure to disable 64-bit extensions for this test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23309
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 10 Sep 2005 02:33:17 +0000 (02:33 +0000)]
Fix more Visual Studio build problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23308
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeff Cohen [Sat, 10 Sep 2005 02:00:02 +0000 (02:00 +0000)]
Fix miscellaneous Visual Studio build problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23307
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 10 Sep 2005 01:18:45 +0000 (01:18 +0000)]
implement Transforms/LoopStrengthReduce/dont-hoist-simple-loop-constants.ll.
We used to emit this code for it:
_test:
li r2, 1 ;; Value tying up a register for the whole loop
li r5, 0
LBB_test_1: ; no_exit.2
or r6, r5, r5
li r5, 0
stw r5, 0(r3)
addi r5, r6, 1
addi r3, r3, 4
add r7, r2, r5 ;; should be addi r7, r5, 1
cmpwi cr0, r7, 701
blt cr0, LBB_test_1 ; no_exit.2
LBB_test_2: ; loopexit.2.loopexit
addi r2, r6, 2
stw r2, 0(r4)
blr
now we emit this:
_test:
li r2, 0
LBB_test_1: ; no_exit.2
or r5, r2, r2
li r2, 0
stw r2, 0(r3)
addi r3, r3, 4
addi r2, r5, 1
addi r6, r5, 2 ;; whoa, fold those adds!
cmpwi cr0, r6, 701
blt cr0, LBB_test_1 ; no_exit.2
LBB_test_2: ; loopexit.2.loopexit
addi r2, r5, 2
stw r2, 0(r4)
blr
more improvement coming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23306
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 10 Sep 2005 01:14:37 +0000 (01:14 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23305
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 10 Sep 2005 00:21:06 +0000 (00:21 +0000)]
PowerPC cannot truncstore i1 natively
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23304
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 10 Sep 2005 00:20:18 +0000 (00:20 +0000)]
Allow targets to say they don't support truncstore i1 (which includes a mask
when storing to an 8-bit memory location), as most don't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23303
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 23:53:39 +0000 (23:53 +0000)]
Add a missing #include, patch courtesy of Baptiste Lepilleur.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23302
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 23:00:07 +0000 (23:00 +0000)]
Fix a problem duraid encountered on itanium where this folding:
select (x < y), 1, 0 -> (x < y) incorrectly: the setcc returns i1 but the
select returned i32. Add the zero extend as needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23301
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 22:35:03 +0000 (22:35 +0000)]
Fix a crash viewing dags that have target nodes in them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23300
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 21:59:44 +0000 (21:59 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23299
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 21:46:49 +0000 (21:46 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23298
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 20:51:08 +0000 (20:51 +0000)]
code cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23297
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 20:29:51 +0000 (20:29 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23296
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 9 Sep 2005 19:49:52 +0000 (19:49 +0000)]
Last round of 2-node folds from SD.cpp. Will move on to 3 node ops such
as setcc and select next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23295
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 19:19:20 +0000 (19:19 +0000)]
remove debugging code *slaps head*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23294
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 19:17:47 +0000 (19:17 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23293
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 18:17:41 +0000 (18:17 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23292
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Fri, 9 Sep 2005 17:50:20 +0000 (17:50 +0000)]
Added targets to speed up build of llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23291
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 17:48:57 +0000 (17:48 +0000)]
New testcase, neither should require a register-register copy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23290
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 01:15:01 +0000 (01:15 +0000)]
add an accessor to provide more checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 01:11:44 +0000 (01:11 +0000)]
use new accessors to simplify code. Add checking to make sure top-level instr
definitions are void
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23288
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 01:11:17 +0000 (01:11 +0000)]
add some accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23287
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 9 Sep 2005 00:39:56 +0000 (00:39 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23286
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 23:26:30 +0000 (23:26 +0000)]
Fix incorrect comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23285
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 23:22:48 +0000 (23:22 +0000)]
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)))
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23284
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 23:17:26 +0000 (23:17 +0000)]
whitespace/comment changes, no functionality diffs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23283
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 21:43:21 +0000 (21:43 +0000)]
Compute the value types that are natively supported by a target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23282
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 21:27:15 +0000 (21:27 +0000)]
Parse information about type constraints on SDNodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23281
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 21:04:46 +0000 (21:04 +0000)]
use node info in the one place we currently use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23280
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 21:03:01 +0000 (21:03 +0000)]
start parsing SDNode info records
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23279
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 8 Sep 2005 20:18:10 +0000 (20:18 +0000)]
Move yet more folds over to the dag combiner from sd.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23278
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 19:50:41 +0000 (19:50 +0000)]
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
Chris Lattner [Thu, 8 Sep 2005 19:47:28 +0000 (19:47 +0000)]
Fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23276
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 18:48:47 +0000 (18:48 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23275
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 18:48:23 +0000 (18:48 +0000)]
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
Chris Lattner [Thu, 8 Sep 2005 18:47:43 +0000 (18:47 +0000)]
x and X should be structurally identical
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23273
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 18:47:21 +0000 (18:47 +0000)]
new expression type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23272
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 18:22:57 +0000 (18:22 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23271
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 18:22:35 +0000 (18:22 +0000)]
Tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23270
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 17:45:12 +0000 (17:45 +0000)]
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
Chris Lattner [Thu, 8 Sep 2005 17:40:49 +0000 (17:40 +0000)]
add patterns for x?oris?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23268
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 8 Sep 2005 17:33:10 +0000 (17:33 +0000)]
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
Chris Lattner [Thu, 8 Sep 2005 17:01:54 +0000 (17:01 +0000)]
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
Chris Lattner [Wed, 7 Sep 2005 23:57:00 +0000 (23:57 +0000)]
add some missing PPC backend files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23265
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Sep 2005 23:53:49 +0000 (23:53 +0000)]
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
Chris Lattner [Wed, 7 Sep 2005 23:47:44 +0000 (23:47 +0000)]
ignore generated files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23263
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Sep 2005 23:45:15 +0000 (23:45 +0000)]
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
Chris Lattner [Wed, 7 Sep 2005 23:44:43 +0000 (23:44 +0000)]
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
Nate Begeman [Wed, 7 Sep 2005 23:25:52 +0000 (23:25 +0000)]
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
Chris Lattner [Wed, 7 Sep 2005 17:34:39 +0000 (17:34 +0000)]
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
Nate Begeman [Wed, 7 Sep 2005 16:09:19 +0000 (16:09 +0000)]
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
Chris Lattner [Wed, 7 Sep 2005 05:45:33 +0000 (05:45 +0000)]
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
Chris Lattner [Wed, 7 Sep 2005 05:44:14 +0000 (05:44 +0000)]
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
Chris Lattner [Wed, 7 Sep 2005 05:37:01 +0000 (05:37 +0000)]
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
Chris Lattner [Wed, 7 Sep 2005 05:36:18 +0000 (05:36 +0000)]
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
Nate Begeman [Wed, 7 Sep 2005 00:15:36 +0000 (00:15 +0000)]
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
Chris Lattner [Tue, 6 Sep 2005 22:51:34 +0000 (22:51 +0000)]
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
Nate Begeman [Tue, 6 Sep 2005 22:23:15 +0000 (22:23 +0000)]
Test the new 64bit i64<->fp functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23251
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Tue, 6 Sep 2005 22:03:27 +0000 (22:03 +0000)]
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
Chris Lattner [Tue, 6 Sep 2005 21:23:27 +0000 (21:23 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23249
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Sep 2005 21:23:09 +0000 (21:23 +0000)]
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
Chris Lattner [Tue, 6 Sep 2005 21:22:15 +0000 (21:22 +0000)]
new testcase: tblgen should grok this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23247
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Tue, 6 Sep 2005 17:00:23 +0000 (17:00 +0000)]
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
Nate Begeman [Tue, 6 Sep 2005 15:30:48 +0000 (15:30 +0000)]
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
Nate Begeman [Tue, 6 Sep 2005 15:30:12 +0000 (15:30 +0000)]
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
Nate Begeman [Tue, 6 Sep 2005 04:43:02 +0000 (04:43 +0000)]
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
Chris Lattner [Tue, 6 Sep 2005 04:07:15 +0000 (04:07 +0000)]
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
Andrew Lenharth [Sun, 4 Sep 2005 06:12:19 +0000 (06:12 +0000)]
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
Chris Lattner [Sat, 3 Sep 2005 01:28:40 +0000 (01:28 +0000)]
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
Chris Lattner [Sat, 3 Sep 2005 01:17:22 +0000 (01:17 +0000)]
include the dag isel fragment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23239
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Sep 2005 01:15:41 +0000 (01:15 +0000)]
ask for a dag isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23238
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Sep 2005 01:15:25 +0000 (01:15 +0000)]
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
Chris Lattner [Sat, 3 Sep 2005 01:14:03 +0000 (01:14 +0000)]
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
Chris Lattner [Sat, 3 Sep 2005 01:04:40 +0000 (01:04 +0000)]
Fix a checking failure in gs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23235
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Sep 2005 00:53:47 +0000 (00:53 +0000)]
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
Chris Lattner [Sat, 3 Sep 2005 00:21:51 +0000 (00:21 +0000)]
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
Chris Lattner [Fri, 2 Sep 2005 22:35:53 +0000 (22:35 +0000)]
Add AND/OR/XOR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23232
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 2 Sep 2005 21:18:40 +0000 (21:18 +0000)]
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
Chris Lattner [Fri, 2 Sep 2005 21:18:00 +0000 (21:18 +0000)]
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
Chris Lattner [Fri, 2 Sep 2005 20:32:45 +0000 (20:32 +0000)]
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
Chris Lattner [Fri, 2 Sep 2005 20:26:58 +0000 (20:26 +0000)]
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
Chris Lattner [Fri, 2 Sep 2005 20:24:10 +0000 (20:24 +0000)]
Test that converting from double to int64 results in one libcall, not one
and a dead one. This is a legalize bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23227
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 19:53:54 +0000 (19:53 +0000)]
turn on dag isel by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23226
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 19:36:17 +0000 (19:36 +0000)]
Make sure to auto-cse nullary ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23224
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 19:35:42 +0000 (19:35 +0000)]
add a map for nullary ops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23223
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Fri, 2 Sep 2005 19:27:43 +0000 (19:27 +0000)]
Add help support for -mcpu and -mattr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23222
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 19:15:44 +0000 (19:15 +0000)]
Fix some buggy logic where we would try to remove nodes with two operands
from the binary ops map, even if they had multiple results. This latent bug
caused a few failures with the dag isel last night.
To prevent stuff like this from happening in the future, add some really
strict checking to make sure that the CSE maps always match up with reality!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23221
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Fri, 2 Sep 2005 18:46:02 +0000 (18:46 +0000)]
Pull out Lowering in preperation for multiple ISels. Oh, and get rid of some stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23220
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 18:41:28 +0000 (18:41 +0000)]
Don't create zero sized stack objects even for array allocas with a zero
number of elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23219
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 18:33:05 +0000 (18:33 +0000)]
Decouple fsqrt from gpul optimizations, implementing fsqrt.ll.
Remove the -enable-gpopt option which is subsumed by feature flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23218
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 18:32:22 +0000 (18:32 +0000)]
new testcase to ensure fsqrt is generated for correct subtargets only, and
that the fsqrt feature works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23217
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 18:16:20 +0000 (18:16 +0000)]
Move a bunch of non-deprecated methods above the "deprecated line"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23216
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 07:09:28 +0000 (07:09 +0000)]
Fix the release build, noticed by Eric van Riet Paap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 07:07:58 +0000 (07:07 +0000)]
Fix a problem that Dan Berlin noticed, where reassociation would not succeed
in building maximal expressions before simplifying them. In particular, i
cases like this:
X-(A+B+X)
the code would consider A+B+X to be a maximal expression (not understanding
that the single use '-' would be turned into a + later), simplify it (a noop)
then later get simplified again.
Each of these simplify steps is where the cost of reassociation comes from,
so this patch should speed up the already fast pass a bit.
Thanks to Dan for noticing this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23214
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 06:38:04 +0000 (06:38 +0000)]
Avoid creating garbage instructions, just move the old add instruction
to where we need it when converting -(A+B+C) -> -A + -B + -C.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23213
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Sep 2005 06:12:12 +0000 (06:12 +0000)]
new testcase for recent bugfix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23212
91177308-0d34-0410-b5e6-
96231b3b80d8