oota-llvm.git
18 years agorefactor a bit of code.
Chris Lattner [Tue, 4 Oct 2005 21:35:50 +0000 (21:35 +0000)]
refactor a bit of code.

When moving constant entries in 'Map' if the entry is the representative
constant for the abstractypemap, make sure to update it as well.  This
fixes the bcreader failures from last night on several C++ apps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23628 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMinor speedup to avoid array searches given a Use*. This speeds up bc reading
Chris Lattner [Tue, 4 Oct 2005 18:47:09 +0000 (18:47 +0000)]
Minor speedup to avoid array searches given a Use*.  This speeds up bc reading
of the python test from 1:00 to 54s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23627 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoChange the signature of replaceUsesOfWithOnConstant. The bool was always
Chris Lattner [Tue, 4 Oct 2005 18:13:04 +0000 (18:13 +0000)]
Change the signature of replaceUsesOfWithOnConstant.  The bool was always
true dynamically.  Finally, pass the Use* that replaceAllUsesWith has into
the method for future use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23626 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoChange the signature of replaceUsesOfWithOnConstant to take a Use* and not
Chris Lattner [Tue, 4 Oct 2005 18:12:13 +0000 (18:12 +0000)]
Change the signature of replaceUsesOfWithOnConstant to take a Use* and not
take the bool.  The bool is always true dynamically.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23625 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFor large constants (e.g. arrays and structs with many elements) just
Chris Lattner [Tue, 4 Oct 2005 17:48:46 +0000 (17:48 +0000)]
For large constants (e.g. arrays and structs with many elements) just
creating the keys and doing comparisons to index into 'Map' takes a lot
of time.  For these large constants, keep an inverse map so that 'remove'
and move operations are much faster.

This speeds up a release build of the bc reader on Eric's nasty python
bytecode file from 1:39 to 1:00s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23624 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agominor cleanup/fastpath for the bcreader. This speeds up the bcreader
Chris Lattner [Tue, 4 Oct 2005 16:52:46 +0000 (16:52 +0000)]
minor cleanup/fastpath for the bcreader.  This speeds up the bcreader
from 1:41 -> 1:39 on the large python .bc file in a release build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23623 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoReverting to version - until problem isolated.
Jim Laskey [Tue, 4 Oct 2005 16:41:51 +0000 (16:41 +0000)]
Reverting to version - until problem isolated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23622 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a forward def
Chris Lattner [Tue, 4 Oct 2005 05:09:20 +0000 (05:09 +0000)]
Add a forward def

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23621 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix some faulty logic in the libcall inserter.
Nate Begeman [Tue, 4 Oct 2005 02:10:55 +0000 (02:10 +0000)]
Fix some faulty logic in the libcall inserter.

Since calls return more than one value, don't bail if one of their uses
happens to be a node that's not an MVT::Other when following the chain
from CALLSEQ_START to CALLSEQ_END.

Once we've found a CALLSEQ_START, we can just return; there's no need to
tail-recurse further up the graph.

Most importantly, just because something only has one use doesn't mean we
should use it's one use to follow from start to end.  This faulty logic
caused us to follow a chain of one-use FP operations back to a much earlier
call, putting a cycle in the graph from a later start to an earlier end.

This is a better fix that reverting to the workaround committed earlier
today.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23620 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoimplement the struct version of the array speedup, speeding up the
Chris Lattner [Tue, 4 Oct 2005 01:17:50 +0000 (01:17 +0000)]
implement the struct version of the array speedup, speeding up the
testcase a bit more from 1:48 -> 1.40.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23619 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix DemoteRegToStack on an invoke. This fixes PR634.
Chris Lattner [Tue, 4 Oct 2005 00:44:01 +0000 (00:44 +0000)]
Fix DemoteRegToStack on an invoke.  This fixes PR634.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23618 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd back a workaround that fixes some breakages from chris's last change.
Nate Begeman [Tue, 4 Oct 2005 00:37:37 +0000 (00:37 +0000)]
Add back a workaround that fixes some breakages from chris's last change.
Neither of us have yet figured out why this code is necessary, but stuff
breaks if its not there.  Still tracking this down...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23617 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoClean up the code a bit. Use isInstructionTriviallyDead to be more aggressive
Chris Lattner [Mon, 3 Oct 2005 23:43:43 +0000 (23:43 +0000)]
Clean up the code a bit.  Use isInstructionTriviallyDead to be more aggressive
and more correct than use_empty().  This fixes PR635 and
SimplifyCFG/2005-10-02-InvokeSimplify.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23616 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase for PR635
Chris Lattner [Mon, 3 Oct 2005 23:42:54 +0000 (23:42 +0000)]
new testcase for PR635

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23615 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoChange ConstantArray::replaceUsesOfWithOnConstant to attempt to update
Chris Lattner [Mon, 3 Oct 2005 22:51:37 +0000 (22:51 +0000)]
Change ConstantArray::replaceUsesOfWithOnConstant to attempt to update
constant arrays in place instead of reallocating them and replaceAllUsesOf'ing
the result.  This speeds up a release build of the bcreader from:

136.987u 120.866s 4:24.38
to
49.790u 49.890s 1:40.14

... a 2.6x speedup parsing a large python bc file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23614 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agomove some methods, no other changes
Chris Lattner [Mon, 3 Oct 2005 21:58:36 +0000 (21:58 +0000)]
move some methods, no other changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23613 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agominor microoptimizations
Chris Lattner [Mon, 3 Oct 2005 21:56:24 +0000 (21:56 +0000)]
minor microoptimizations

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23612 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUse a map to cache the ModuleType information, so we can do logarithmic
Chris Lattner [Mon, 3 Oct 2005 21:26:53 +0000 (21:26 +0000)]
Use a map to cache the ModuleType information, so we can do logarithmic
lookups instead of linear time lookups.  This speeds up bc parsing of a
large file from

137.834u 118.256s 4:27.96
to
132.611u 114.436s 4:08.53

with a release build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23611 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRefactor gathering node info and emission.
Jim Laskey [Mon, 3 Oct 2005 12:30:32 +0000 (12:30 +0000)]
Refactor gathering node info and emission.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23610 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoclean up this code a bit, no functionality change
Chris Lattner [Mon, 3 Oct 2005 07:22:07 +0000 (07:22 +0000)]
clean up this code a bit, no functionality change

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23609 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSpeed up the asm printer a lot by not printing formatted LLVM asm output
Chris Lattner [Mon, 3 Oct 2005 07:08:36 +0000 (07:08 +0000)]
Speed up the asm printer a lot by not printing formatted LLVM asm output
for globals

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23608 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoBreak the body of the loop out into a new method
Chris Lattner [Mon, 3 Oct 2005 04:47:08 +0000 (04:47 +0000)]
Break the body of the loop out into a new method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23606 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix case of path
Chris Lattner [Mon, 3 Oct 2005 03:32:39 +0000 (03:32 +0000)]
Fix case of path

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23605 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake IVUseShouldUsePostIncValue more aggressive when the use is a PHI. In
Chris Lattner [Mon, 3 Oct 2005 02:50:05 +0000 (02:50 +0000)]
Make IVUseShouldUsePostIncValue more aggressive when the use is a PHI.  In
particular, it should realize that phi's use their values in the pred block
not the phi block itself.  This change turns our em3d loop from this:

_test:
        cmpwi cr0, r4, 0
        bgt cr0, LBB_test_2     ; entry.no_exit_crit_edge
LBB_test_1:     ; entry.loopexit_crit_edge
        li r2, 0
        b LBB_test_6    ; loopexit
LBB_test_2:     ; entry.no_exit_crit_edge
        li r6, 0
LBB_test_3:     ; no_exit
        or r2, r6, r6
        lwz r6, 0(r3)
        cmpw cr0, r6, r5
        beq cr0, LBB_test_6     ; loopexit
LBB_test_4:     ; endif
        addi r3, r3, 4
        addi r6, r2, 1
        cmpw cr0, r6, r4
        blt cr0, LBB_test_3     ; no_exit
LBB_test_5:     ; endif.loopexit.loopexit_crit_edge
        addi r3, r2, 1
        blr
LBB_test_6:     ; loopexit
        or r3, r2, r2
        blr

into:

_test:
        cmpwi cr0, r4, 0
        bgt cr0, LBB_test_2     ; entry.no_exit_crit_edge
LBB_test_1:     ; entry.loopexit_crit_edge
        li r2, 0
        b LBB_test_5    ; loopexit
LBB_test_2:     ; entry.no_exit_crit_edge
        li r6, 0
LBB_test_3:     ; no_exit
        lwz r2, 0(r3)
        cmpw cr0, r2, r5
        or r2, r6, r6
        beq cr0, LBB_test_5     ; loopexit
LBB_test_4:     ; endif
        addi r3, r3, 4
        addi r6, r6, 1
        cmpw cr0, r6, r4
        or r2, r6, r6
        blt cr0, LBB_test_3     ; no_exit
LBB_test_5:     ; loopexit
        or r3, r2, r2
        blr

Unfortunately, this is actually worse code, because the register coallescer
is getting confused somehow.  If it were doing its job right, it could turn the
code into this:

_test:
        cmpwi cr0, r4, 0
        bgt cr0, LBB_test_2     ; entry.no_exit_crit_edge
LBB_test_1:     ; entry.loopexit_crit_edge
        li r6, 0
        b LBB_test_5    ; loopexit
LBB_test_2:     ; entry.no_exit_crit_edge
        li r6, 0
LBB_test_3:     ; no_exit
        lwz r2, 0(r3)
        cmpw cr0, r2, r5
        beq cr0, LBB_test_5     ; loopexit
LBB_test_4:     ; endif
        addi r3, r3, 4
        addi r6, r6, 1
        cmpw cr0, r6, r4
        blt cr0, LBB_test_3     ; no_exit
LBB_test_5:     ; loopexit
        or r3, r6, r6
        blr

... which I'll work on next. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23604 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRefactor some code into a function
Chris Lattner [Mon, 3 Oct 2005 01:04:44 +0000 (01:04 +0000)]
Refactor some code into a function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23603 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoThis break is bogus and I have no idea why it was there. Basically it prevents
Chris Lattner [Mon, 3 Oct 2005 00:37:33 +0000 (00:37 +0000)]
This break is bogus and I have no idea why it was there.  Basically it prevents
memoizing code when IV's are used by phinodes outside of loops.  In a simple
example, we were getting this code before (note that r6 and r7 are isomorphic
IV's):

        li r6, 0
        or r7, r6, r6
LBB_test_3:     ; no_exit
        lwz r2, 0(r3)
        cmpw cr0, r2, r5
        or r2, r7, r7
        beq cr0, LBB_test_5     ; loopexit
LBB_test_4:     ; endif
        addi r2, r7, 1
        addi r7, r7, 1
        addi r3, r3, 4
        addi r6, r6, 1
        cmpw cr0, r6, r4
        blt cr0, LBB_test_3     ; no_exit

Now we get:

        li r6, 0
LBB_test_3:     ; no_exit
        or r2, r6, r6
        lwz r6, 0(r3)
        cmpw cr0, r6, r5
        beq cr0, LBB_test_6     ; loopexit
LBB_test_4:     ; endif
        addi r3, r3, 4
        addi r6, r2, 1
        cmpw cr0, r6, r4
        blt cr0, LBB_test_3     ; no_exit

this was noticed in em3d.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23602 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agowhen checking if we should move a split edge block outside of a loop,
Chris Lattner [Mon, 3 Oct 2005 00:31:52 +0000 (00:31 +0000)]
when checking if we should move a split edge block outside of a loop,
check the presplit pred, not the post-split pred.  This was causing us
to make the wrong decision in some cases, leaving the critical edge block
in the loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23601 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoThis member can be const too
Chris Lattner [Mon, 3 Oct 2005 00:21:25 +0000 (00:21 +0000)]
This member can be const too

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23600 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoput the right labels on the data
Chris Lattner [Sun, 2 Oct 2005 21:51:38 +0000 (21:51 +0000)]
put the right labels on the data

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23599 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix a problem where the legalizer would run out of stack space on extremely
Chris Lattner [Sun, 2 Oct 2005 17:49:46 +0000 (17:49 +0000)]
Fix a problem where the legalizer would run out of stack space on extremely
large basic blocks because it was purely recursive.  This switches it to an
iterative/recursive hybrid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23596 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agosilence a bogus warning
Chris Lattner [Sun, 2 Oct 2005 16:30:51 +0000 (16:30 +0000)]
silence a bogus warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23595 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agosilence some warnings
Chris Lattner [Sun, 2 Oct 2005 16:29:36 +0000 (16:29 +0000)]
silence some warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23594 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agosilence a warning
Chris Lattner [Sun, 2 Oct 2005 16:27:59 +0000 (16:27 +0000)]
silence a warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23593 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd patterns for float binops and fma ops
Chris Lattner [Sun, 2 Oct 2005 07:46:28 +0000 (07:46 +0000)]
add patterns for float binops and fma ops

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23592 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSort the cpu and features table, so that the alpha backend doesn't fail EVERY
Chris Lattner [Sun, 2 Oct 2005 07:13:52 +0000 (07:13 +0000)]
Sort the cpu and features table, so that the alpha backend doesn't fail EVERY
compile with an assertion that the tables are not sorted!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23591 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd assertions to the trivial scheduler to check that the value types match
Chris Lattner [Sun, 2 Oct 2005 07:10:55 +0000 (07:10 +0000)]
Add assertions to the trivial scheduler to check that the value types match
up between defs and uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23590 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoanother solution to the fsel issue. Instead of having 4 variants, just force
Chris Lattner [Sun, 2 Oct 2005 07:07:49 +0000 (07:07 +0000)]
another solution to the fsel issue.  Instead of having 4 variants, just force
the comparison to be 64-bits.  This is fine because extensions from float
to double are free.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23589 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofsel can take a different FP type for the comparison and for the result. As such
Chris Lattner [Sun, 2 Oct 2005 06:58:23 +0000 (06:58 +0000)]
fsel can take a different FP type for the comparison and for the result.  As such
split the FSEL family into 4 things instead of just two.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23588 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix an f32/f64 type mismatch
Chris Lattner [Sun, 2 Oct 2005 06:37:13 +0000 (06:37 +0000)]
fix an f32/f64 type mismatch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23587 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoCodegen CopyFromReg using the regclass that matches the valuetype of the
Chris Lattner [Sun, 2 Oct 2005 06:34:16 +0000 (06:34 +0000)]
Codegen CopyFromReg using the regclass that matches the valuetype of the
destination vreg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23586 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdjust to change in ctor
Chris Lattner [Sun, 2 Oct 2005 06:23:51 +0000 (06:23 +0000)]
Adjust to change in ctor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23585 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoEmit the value type for each register class.
Chris Lattner [Sun, 2 Oct 2005 06:23:37 +0000 (06:23 +0000)]
Emit the value type for each register class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23584 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoExpose the actual valuetype of each register class
Chris Lattner [Sun, 2 Oct 2005 06:23:19 +0000 (06:23 +0000)]
Expose the actual valuetype of each register class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23583 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMinor tweak to the branch selector. When emitting a two-way branch, and if
Chris Lattner [Sat, 1 Oct 2005 23:06:26 +0000 (23:06 +0000)]
Minor tweak to the branch selector.  When emitting a two-way branch, and if
we're in a single-mbb loop, make sure to emit the backwards branch as the
conditional branch instead of the uncond branch.  For example, emit this:

LBBl29_z__44:
        stw r9, 0(r15)
        stw r9, 4(r15)
        stw r9, 8(r15)
        stw r9, 12(r15)
        addi r15, r15, 16
        addi r8, r8, 1
        cmpw cr0, r8, r28
        ble cr0, LBBl29_z__44
        b LBBl29_z__48                   *** NOT PART OF LOOP

Instead of:

LBBl29_z__44:
        stw r9, 0(r15)
        stw r9, 4(r15)
        stw r9, 8(r15)
        stw r9, 12(r15)
        addi r15, r15, 16
        addi r8, r8, 1
        cmpw cr0, r8, r28
        bgt cr0, LBBl29_z__48            *** PART OF LOOP!
        b LBBl29_z__44

The former sequence has one fewer dispatch group for the loop body.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23582 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agolike the comment says, enable this
Chris Lattner [Sat, 1 Oct 2005 23:02:40 +0000 (23:02 +0000)]
like the comment says, enable this

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23581 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd some very paranoid checking for operand/result reg class matchup
Chris Lattner [Sat, 1 Oct 2005 07:45:09 +0000 (07:45 +0000)]
Add some very paranoid checking for operand/result reg class matchup
For instructions that define multiple results, use the right regclass
to define the result, not always the rc of result #0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23580 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix VC++ warnings.
Jeff Cohen [Sat, 1 Oct 2005 03:57:14 +0000 (03:57 +0000)]
Fix VC++ warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23579 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix typo
Chris Lattner [Sat, 1 Oct 2005 02:51:36 +0000 (02:51 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23578 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoModify the ppc backend to use two register classes for FP: F8RC and F4RC.
Chris Lattner [Sat, 1 Oct 2005 01:35:02 +0000 (01:35 +0000)]
Modify the ppc backend to use two register classes for FP: F8RC and F4RC.
These are used to represent float and double values, and the two regclasses
contain the same physical registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23577 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAnnotate nodes with their addresses if a graph requests it.
Chris Lattner [Sat, 1 Oct 2005 00:19:21 +0000 (00:19 +0000)]
Annotate nodes with their addresses if a graph requests it.

This is Jim's feature implemented so that graphs could 'opt-in' and get
this behavior.  This is currently used by selection dags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23576 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd a method
Chris Lattner [Sat, 1 Oct 2005 00:17:07 +0000 (00:17 +0000)]
add a method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23575 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agotypo
Jim Laskey [Sat, 1 Oct 2005 00:08:23 +0000 (00:08 +0000)]
typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23574 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago1. Simplify the gathering of node groups.
Jim Laskey [Sat, 1 Oct 2005 00:03:07 +0000 (00:03 +0000)]
1. Simplify the gathering of node groups.

2. Printing node groups when displaying nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23573 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoShould be using flag and not chain.
Jim Laskey [Fri, 30 Sep 2005 23:43:37 +0000 (23:43 +0000)]
Should be using flag and not chain.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23572 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemove some now-dead code.
Nate Begeman [Fri, 30 Sep 2005 21:28:27 +0000 (21:28 +0000)]
Remove some now-dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23571 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agomore specific tests of subtarget stuff
Andrew Lenharth [Fri, 30 Sep 2005 20:30:24 +0000 (20:30 +0000)]
more specific tests of subtarget stuff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23570 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agosubtarget support for CIX and FIX extentions (the only 2 I care about right now)
Andrew Lenharth [Fri, 30 Sep 2005 20:24:38 +0000 (20:24 +0000)]
subtarget support for CIX and FIX extentions (the only 2 I care about right now)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23569 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoReverting change moving to selection dag graph.
Jim Laskey [Fri, 30 Sep 2005 19:33:41 +0000 (19:33 +0000)]
Reverting change moving to selection dag graph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23568 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdded allnodes_size for scheduling support.
Jim Laskey [Fri, 30 Sep 2005 19:27:01 +0000 (19:27 +0000)]
Added allnodes_size for scheduling support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23567 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago1. Made things node-centric (from operand).
Jim Laskey [Fri, 30 Sep 2005 19:15:27 +0000 (19:15 +0000)]
1. Made things node-centric (from operand).

2. Added node groups to handle flagged nodes.

3. Started weaning simple scheduling off existing emitter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23566 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd the node name (thus the address) to node label.
Jim Laskey [Fri, 30 Sep 2005 19:11:53 +0000 (19:11 +0000)]
Add the node name (thus the address) to node label.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23565 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRename MRegisterDesc -> TargetRegisterDesc for consistency
Chris Lattner [Fri, 30 Sep 2005 17:49:27 +0000 (17:49 +0000)]
Rename MRegisterDesc -> TargetRegisterDesc for consistency

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23564 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUpdate the discussion of TargetRegisterDesc
Chris Lattner [Fri, 30 Sep 2005 17:46:55 +0000 (17:46 +0000)]
Update the discussion of TargetRegisterDesc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23563 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoremove some more initializers
Chris Lattner [Fri, 30 Sep 2005 17:41:05 +0000 (17:41 +0000)]
remove some more initializers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23562 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agotrim down the target info structs now that we have a preferred spill register class...
Chris Lattner [Fri, 30 Sep 2005 17:38:36 +0000 (17:38 +0000)]
trim down the target info structs now that we have a preferred spill register class for each callee save register

Why is V9 maintaining these tables manually? ugh!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23561 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agotrim down the target info structs now that we have a preferred spill register class...
Chris Lattner [Fri, 30 Sep 2005 17:35:22 +0000 (17:35 +0000)]
trim down the target info structs now that we have a preferred spill register class for each callee save register

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23560 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonow that we have a reg class to spill with, get this info from the regclass
Chris Lattner [Fri, 30 Sep 2005 17:19:22 +0000 (17:19 +0000)]
now that we have a reg class to spill with, get this info from the regclass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23559 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoconstant fold these calls
Chris Lattner [Fri, 30 Sep 2005 17:16:59 +0000 (17:16 +0000)]
constant fold these calls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23558 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agosimplify this code using the new regclass info passed in
Chris Lattner [Fri, 30 Sep 2005 17:12:38 +0000 (17:12 +0000)]
simplify this code using the new regclass info passed in

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23557 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoNow that we have getCalleeSaveRegClasses() info, use it to pass the register
Chris Lattner [Fri, 30 Sep 2005 16:59:07 +0000 (16:59 +0000)]
Now that we have getCalleeSaveRegClasses() info, use it to pass the register
class into the spill/reload methods.  Targets can now rely on that argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23556 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoexpose a new virtual method
Chris Lattner [Fri, 30 Sep 2005 07:06:37 +0000 (07:06 +0000)]
expose a new virtual method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23555 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agostub out a virtual method
Chris Lattner [Fri, 30 Sep 2005 06:55:18 +0000 (06:55 +0000)]
stub out a virtual method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23554 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoCompute a preferred spill register class for each callee-save register
Chris Lattner [Fri, 30 Sep 2005 06:44:45 +0000 (06:44 +0000)]
Compute a preferred spill register class for each callee-save register

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23553 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoCR registers are not used by this "target"
Chris Lattner [Fri, 30 Sep 2005 06:43:58 +0000 (06:43 +0000)]
CR registers are not used by this "target"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23552 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agothese registers don't belong to any register classes, so don't mark them
Chris Lattner [Fri, 30 Sep 2005 06:42:24 +0000 (06:42 +0000)]
these registers don't belong to any register classes, so don't mark them
as callee save.  They can never be generated by the compiler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23551 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix a warning
Chris Lattner [Fri, 30 Sep 2005 06:09:50 +0000 (06:09 +0000)]
Fix a warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23550 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRegenerate
Chris Lattner [Fri, 30 Sep 2005 04:53:25 +0000 (04:53 +0000)]
Regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23549 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRefactor this a bit to move ParsingTemplateArgs to only apply to classes,
Chris Lattner [Fri, 30 Sep 2005 04:53:04 +0000 (04:53 +0000)]
Refactor this a bit to move ParsingTemplateArgs to only apply to classes,
not defs.

Implement support for forward definitions of classes.  This implements
TableGen/ForwardRef.td.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23548 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a test that you can forward ref a class.
Chris Lattner [Fri, 30 Sep 2005 04:52:43 +0000 (04:52 +0000)]
Add a test that you can forward ref a class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23547 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRegenerate
Chris Lattner [Fri, 30 Sep 2005 04:42:56 +0000 (04:42 +0000)]
Regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23546 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoGenerate a parse error instead of a checked exception if template args are
Chris Lattner [Fri, 30 Sep 2005 04:42:31 +0000 (04:42 +0000)]
Generate a parse error instead of a checked exception if template args are
used on a def.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23545 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoNow that self referential classes are supported, get rid of a work-around.
Chris Lattner [Fri, 30 Sep 2005 04:13:23 +0000 (04:13 +0000)]
Now that self referential classes are supported, get rid of a work-around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23544 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoregenerate
Chris Lattner [Fri, 30 Sep 2005 04:11:27 +0000 (04:11 +0000)]
regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23543 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRefactor the grammar a bit to implement TableGen/ForwardRef.td
Chris Lattner [Fri, 30 Sep 2005 04:10:49 +0000 (04:10 +0000)]
Refactor the grammar a bit to implement TableGen/ForwardRef.td

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23542 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoCheck that we can refer to the same class we are defining.
Chris Lattner [Fri, 30 Sep 2005 04:10:17 +0000 (04:10 +0000)]
Check that we can refer to the same class we are defining.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23541 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoallow regs to be in multiple reg classes
Chris Lattner [Fri, 30 Sep 2005 01:33:48 +0000 (01:33 +0000)]
allow regs to be in multiple reg classes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23540 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agopass extra args
Chris Lattner [Fri, 30 Sep 2005 01:31:52 +0000 (01:31 +0000)]
pass extra args

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23539 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agothese methods get extra args
Chris Lattner [Fri, 30 Sep 2005 01:30:55 +0000 (01:30 +0000)]
these methods get extra args

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23538 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoPass extra regclasses into spilling code
Chris Lattner [Fri, 30 Sep 2005 01:29:42 +0000 (01:29 +0000)]
Pass extra regclasses into spilling code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23537 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoChange this code ot pass register classes into the stack slot spiller/reloader
Chris Lattner [Fri, 30 Sep 2005 01:29:00 +0000 (01:29 +0000)]
Change this code ot pass register classes into the stack slot spiller/reloader
code.  PrologEpilogInserter hasn't been updated yet though, so targets cannot
use this info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23536 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoChange these methods to take RC's
Chris Lattner [Fri, 30 Sep 2005 01:28:14 +0000 (01:28 +0000)]
Change these methods to take RC's

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23535 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUse the 32-bit version for now
Chris Lattner [Fri, 30 Sep 2005 00:05:05 +0000 (00:05 +0000)]
Use the 32-bit version for now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23534 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd a bunch of patterns for F64 FP ops, add some more integer ops
Chris Lattner [Thu, 29 Sep 2005 23:34:24 +0000 (23:34 +0000)]
Add a bunch of patterns for F64 FP ops, add some more integer ops

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23533 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemove code for patterns that are autogenerated
Chris Lattner [Thu, 29 Sep 2005 23:33:31 +0000 (23:33 +0000)]
Remove code for patterns that are autogenerated

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23532 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agobegining alpha subtarget support
Andrew Lenharth [Thu, 29 Sep 2005 22:54:56 +0000 (22:54 +0000)]
begining alpha subtarget support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23531 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agotblgen autogens this pattern now
Chris Lattner [Thu, 29 Sep 2005 22:37:24 +0000 (22:37 +0000)]
tblgen autogens this pattern now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23530 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoTeach tablegen to reassociate operators when possible. This allows it to
Chris Lattner [Thu, 29 Sep 2005 22:36:54 +0000 (22:36 +0000)]
Teach tablegen to reassociate operators when possible.  This allows it to
find all of teh pattern matches for EQV from one definition

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23529 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agocopy and paste error
Andrew Lenharth [Thu, 29 Sep 2005 21:11:57 +0000 (21:11 +0000)]
copy and paste error

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23528 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonow that tblgen is smarter, this pattern is not needed. Also, tblgen
Chris Lattner [Thu, 29 Sep 2005 19:29:15 +0000 (19:29 +0000)]
now that tblgen is smarter, this pattern is not needed.  Also, tblgen
now inverts commuted versions of ANDC/ORC with the current .td file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23527 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoTeach tblgen to build permutations of instructions, so that the target author
Chris Lattner [Thu, 29 Sep 2005 19:28:10 +0000 (19:28 +0000)]
Teach tblgen to build permutations of instructions, so that the target author
doesn't have to specify them manually.  It currently handles associativity,
e.g. knowing that (X*Y)+Z  also matches  X+(Y*Z)  and will be extended in
the future.

It is smart enough to not introduce duplicate patterns or patterns that can
never match.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23526 91177308-0d34-0410-b5e6-96231b3b80d8