Commit Graph

21469 Commits

Author SHA1 Message Date
Evan Cheng
5fb5e10cdc Fix the semantic of Requires<[cond]> to mean if (!cond) goto PXXFail;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24883 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 20:08:01 +00:00
Chris Lattner
2f0f9a6973 This ugly patch works around a GCC bug where it is compiling SelectCode to
use too much stack space, overflowing the stack for large functions.  Instead
of emitting new SDOperands in each match block, we emit some common ones at
the top of SelectCode then reuse them when possible.

This reduces the stack size of SelectCode from 28K to 21K.  Note that GCC
compiles it to 512 bytes :-/

I've filed GCC PR 25505 to track this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24882 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 19:41:03 +00:00
Chris Lattner
aca0901dd3 Run lower-switch after lower-invoke.
Only run lower-allocations and lower-select for the simple isel


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24881 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 08:00:11 +00:00
Chris Lattner
85e42b45ac Reserve G1 for frame offset stuff and use it to handle large stack frames.
For example, instead of emitting this:

test:
        save -40112, %o6, %o6   ;; imm too large
        add %i6, -40016, %o0    ;; imm too large
        call caller
        nop
        restore %g0, %g0, %g0
        retl
        nop

emit this:

test:
        sethi 4194264, %g1
        or %g1, 848, %g1
        save %o6, %g1, %o6
        sethi 4194264, %g1
        add %g1, %i6, %g1
        add %i1, 944, %o0
        call caller
        nop
        restore %g0, %g0, %g0
        retl
        nop

which doesn't cause the assembler to barf.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24880 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 07:56:31 +00:00
Evan Cheng
a5386b0823 Added X86 readport patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24879 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 07:38:38 +00:00
Evan Cheng
4fba28116c Now support instructions with implicit write to non-flag registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24878 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 07:37:41 +00:00
Evan Cheng
7226158d7e Added a hook to print out names of target specific DAG nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24877 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 06:22:03 +00:00
Patrick Meredith
dae87b6536 Added a break that I meant to include originally, for efficiency. Basically
it keeps it from trying to add the same node to the node set
over and over if it matches multiple given patterns.  Also in cases where there
are a lot of patterns to be matched, and it matches an early one, this
will make the script run slightly faster.  It's more there because it logically
should be, than anything else, I mean, Python is never going to be fast ;-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24876 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 02:03:23 +00:00
Chris Lattner
69a889eb35 Fix a nasty latent bug in the legalizer that was triggered by my patch
last night, breaking crafty and twolf.  Make sure that the newly found
legal nodes are themselves not re-legalized until the next iteration.

Also, since this functionality exists now, we can reduce number of legalizer
iterations by depending on this behavior instead of having to misuse 'do
another iteration' to get the same effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24875 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 00:53:54 +00:00
Nate Begeman
9e4dd9dfc9 Pattern-match return. Includes gross hack!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24874 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 00:26:01 +00:00
Evan Cheng
e08705134f Lefted out a fix in the previous check in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24873 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-20 00:06:17 +00:00
Nate Begeman
88276b887c Fix a couple of the FIXMEs, thanks to suggestion from Chris. This allows
us to load and store vectors directly at a pointer (offset of zero) by
using r0 as the base register.  This also requires some asm printer work
to satisfy the darwin assembler.

For
void %foo(<4 x float> * %a) {
entry:
  %tmp1 = load <4 x float> * %a;
  %tmp2 = add <4 x float> %tmp1, %tmp1
  store <4 x float> %tmp2, <4 x float> *%a
  ret void
}

We now produce:
_foo:
        lvx v0, 0, r3
        vaddfp v0, v0, v0
        stvx v0, 0, r3
        blr

Instead of:
_foo:
        li r2, 0
        lvx v0, r2, r3
        vaddfp v0, v0, v0
        stvx v0, r2, r3
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24872 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 23:40:42 +00:00
Nate Begeman
7fd1edd32e Convert load/store over to being pattern matched
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24871 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 23:25:09 +00:00
Evan Cheng
898101c15f X86 conditional branch support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24870 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 23:12:38 +00:00
Evan Cheng
115c036a4c Print out opcode number if it's an unknown target node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24869 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 23:11:49 +00:00
Evan Cheng
f9fc25db32 Fix another bug related to chain / flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24868 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 22:40:04 +00:00
Evan Cheng
fcaa9957c9 It's essential we clear CodeGenMap after isel every basic block!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24867 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 22:36:02 +00:00
Chris Lattner
9f8cc69009 Fix a case where the DAG Combiner would accidentally CSE flag-producing nodes,
creating graphs that cannot be scheduled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24866 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 22:21:21 +00:00
John Criswell
241116fbad Added the llvm-kernel project to the list of automatically configured
projects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24865 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 20:27:24 +00:00
John Criswell
61af913224 Prefix DSA specific options with dsa.
Make the dsa-alloc-list and dsa-free-list options hidden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24864 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 20:14:38 +00:00
John Criswell
3075160664 Added an option to specify the names of heap freeing functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24863 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 19:54:23 +00:00
John Criswell
fa70052063 Added a command line option that allows the user to specify a list of
functions that allocate memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24862 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 17:38:39 +00:00
Jim Laskey
d845582d4a Amend comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24861 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 16:32:26 +00:00
Jim Laskey
de48ee28a3 Create a strong dependency for loads following stores. This will leave a
latency period between the two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24860 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 16:30:13 +00:00
Chris Lattner
7c423b4df1 Fix pifft by correcting the case when a i64/f64 straddles O5 and memory:
we were storing into [FP+88] instead of [FP+92].
Improve codegen by emitting [FP+92], instead of emitting a copy of FP into
another GPR which wouldn't be coallesced because FP isn't register allocated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24859 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 07:57:53 +00:00
Evan Cheng
1b80f4d2c6 Fixes for a number of bugs: save flag results in CodeGenMap, folded chains
may not all have ResNo == 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24858 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 07:18:51 +00:00
Chris Lattner
43875e63f3 don't emit 'add %o6, 0, %o6' instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24857 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 02:51:12 +00:00
Chris Lattner
eb0966693b Fix calls to functions returning i64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24856 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 02:15:51 +00:00
Chris Lattner
bcfdec73d1 Correct bool truncstore operand order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24855 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 02:06:50 +00:00
Chris Lattner
e2d97f8399 add the other bool zextload as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24854 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:44:58 +00:00
Chris Lattner
a1251f24b5 implement zextload bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24853 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:43:04 +00:00
Chris Lattner
61772c20ee mark some unsupported ops as unsupported
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24852 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:39:40 +00:00
Patrick Meredith
7e1cf1c8f4 This is a script to extract nodes and edges associated with those nodes
from a dot file that is the output of DSA.  Nodes to extract
are specified by giving the name of the node seen in the graphical
representation, i.e. in the .ps if the node is specified %xyz
asking for just x, xy, or xyz will retain it in the output file.
Because it operates on substrings underspecifying may result
in additional unexpected nodes.  Be as specific as possible.
Obviously, however, if you ask for %xyz and there is a
getelementptr of %xyz you will get both nodes.  Some manual
editing may still be necessary because of this, but this script
can pare down 10,000 line files to 20 line files, making like easier.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24851 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:23:31 +00:00
Chris Lattner
96d5bb79d4 Fix syntax for indirect calls. This fixes Olden/mst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24850 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:22:53 +00:00
Chris Lattner
6554beffe4 Keep stack frames 8-byte aligned. This fixes olden/voronoi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24849 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 01:15:13 +00:00
Chris Lattner
97561fc2eb apparently rdy isn't actually a psuedo instruction. Use rd %y
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24848 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:53:02 +00:00
Chris Lattner
beecfd2b2d add fneg/fabs support for doubles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24847 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:50:12 +00:00
Chris Lattner
da5a7fd8d4 Various cleanups to this pass, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24846 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:46:20 +00:00
Chris Lattner
f53d0bfbfd add bool truncstores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24845 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:19:21 +00:00
Chris Lattner
8ba0423660 Elimiante SP and FP, which weren't members of the IntRegs register class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24844 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-19 00:06:52 +00:00
Chris Lattner
e773673d8e Make sure to relegalize new nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24843 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:54:29 +00:00
Chris Lattner
379e6c0369 The sun assembler only supports .xword in V9 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24842 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:36:45 +00:00
Chris Lattner
7a48e5018b Configure the asmwriter to allow constant pools to be printed correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24841 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:35:05 +00:00
Chris Lattner
b04c5c8eb2 add support for integer extloads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24840 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:18:37 +00:00
Chris Lattner
20ad53ffd7 Add support for undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24839 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:10:57 +00:00
Chris Lattner
311f8c21d0 Add support for calls to external symbols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24838 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:07:11 +00:00
Chris Lattner
e90ac3a3e7 we have no memcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24837 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 23:00:27 +00:00
Chris Lattner
b4d899e21c Fix a crash on a call with no arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24836 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 22:57:47 +00:00
Jeff Cohen
18840db533 Keep VC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24835 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 22:20:05 +00:00
Chris Lattner
cf198eca97 This is handled by the autogen'd code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24834 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 21:06:11 +00:00