Commit Graph

786 Commits

Author SHA1 Message Date
Jim Laskey
4002017e68 Right size integer values before emitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25489 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 21:02:36 +00:00
Jim Laskey
d18e28964b Reworked how Dwarf debug info entries and abbreviations are handled. Added
pubnames and debuy str sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25487 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-20 20:34:06 +00:00
Jim Laskey
e719a7c40b Added minimum Dwarf aranges. Cleaned up some section headers. Line number
support now works in gdb.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25417 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-18 16:54:26 +00:00
Jim Laskey
08878dac8f Pastos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25412 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 21:39:39 +00:00
Jim Laskey
19ef4efa70 Add frame work for additional dwarf sections. Comments will improve as code
is added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25410 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 20:41:40 +00:00
Jim Laskey
0cbd242e33 Misc. errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25399 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 19:12:24 +00:00
Jim Laskey
063e765345 Adding basic support for Dwarf line number debug information.
I promise to keep future commits smaller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25396 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 17:31:53 +00:00
Evan Cheng
4e4937836e Yet another getTargetNode() variant. I promise one of these days I'll fix
tblgen so this is unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:32:38 +00:00
Chris Lattner
5a67afc118 add stacksave/stackrestore nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25270 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-13 02:39:42 +00:00
Nate Begeman
35ef913ec2 Add bswap, rotl, and rotr nodes
Add dag combiner code to recognize rotl, rotr
Add ppc code to match rotl

Targets should add rotl/rotr patterns if they have them


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25222 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 21:21:00 +00:00
Evan Cheng
909addffc3 New getNode() variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25156 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-09 18:29:18 +00:00
Jim Laskey
df0f659517 Grammer correction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 01:53:28 +00:00
Jim Laskey
abf6d1784b Added initial support for DEBUG_LABEL allowing debug specific labels to be
inserted in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 01:25:28 +00:00
Jim Laskey
b2efb853f0 Applied some recommend changes from sabre. The dominate one beginning "let the
pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25100 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 22:28:25 +00:00
Jim Laskey
5bf6f25b4a Add unique id to debug location for debug label use (work in progress.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25096 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 15:04:11 +00:00
Jim Laskey
129e079e06 Add flag for debug presence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25094 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 14:29:26 +00:00
Jim Laskey
a7cea6f599 Tie dwarf generation to darwin assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25093 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:52:30 +00:00
Jim Laskey
780a61cf04 1. Make MachineDebugInfo a pass.
2. Add label uniquing code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25092 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:46:37 +00:00
Jim Laskey
2c4ec70233 Move MachineDebugInfo to module level location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25091 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:44:43 +00:00
Chris Lattner
51d6e76ff4 add a comment that I should have written a long time ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25084 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 07:29:33 +00:00
Chris Lattner
0df687b1be add a dump method to help debugging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25079 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 05:39:51 +00:00
Nate Begeman
a08787faa8 add support for generating v4i32 code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25043 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 00:09:56 +00:00
Duraid Madina
7d0fe1b42a be more polite in public headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25036 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:47:33 +00:00
Duraid Madina
bd6269c321 undo yuletide naughtyness(tm)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25035 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:29:38 +00:00
Duraid Madina
bb35a113db I laugh at your dual-core G5s! Fear my precompiled headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25019 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-26 10:34:38 +00:00
Chris Lattner
80f55abf00 improve comment: mention vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24971 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:46:10 +00:00
Chris Lattner
1ac1c4b9d2 add a new node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24969 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 00:15:59 +00:00
Chris Lattner
002d83418a remove a dead node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24966 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 21:16:35 +00:00
Duraid Madina
3cb51f9754 i need to do this to take over the earth
when I take over the earth, sabre will be happy because i'll stop asking
him silly questions!!!!!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24949 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 07:02:51 +00:00
Reid Spencer
6a2bd74606 Add an eol at the end to shut gcc up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24925 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:40:06 +00:00
Jim Laskey
9369a5dbc7 Oops llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24913 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 19:46:32 +00:00
Jim Laskey
7f149034e5 Start of Dwarf framework code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24912 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 19:44:40 +00:00
Chris Lattner
bc149b2c98 Add an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24831 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-18 21:00:53 +00:00
Evan Cheng
05a4c35494 Yet another variant of getTargetNode().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24758 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-17 01:44:51 +00:00
Jim Laskey
f5395cee6a Added source file/line correspondence for dwarf (PowerPC only at this point.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 22:45:29 +00:00
Chris Lattner
ed13893ff7 Add a couple more fields, move ctor init list to .cpp file, add support
for emitting the ctor/dtor list for common targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24694 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-13 06:32:10 +00:00
Evan Cheng
7038daf342 Added new getNode and getTargetNode variants for X86 stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24653 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-10 00:37:58 +00:00
Evan Cheng
ab24ed2a32 Added patterns for ADD8rm, etc. These fold load operands. e.g. addb 4(%esp), %al
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24648 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-09 22:48:48 +00:00
Evan Cheng
0fc7198890 Added support for ComplexPattern. These are patterns that require C++ pattern
matching code that is not currently auto-generated by tblgen, e.g. X86
addressing mode. Selection routines for complex patterns can return multiple operands, e.g. X86 addressing mode returns 4.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24634 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-08 02:00:36 +00:00
Nate Begeman
8cfa57b1b4 Teach the SelectionDAG ISel how to turn ConstantPacked values into
constant nodes with vector types.  Also teach the asm printer how to print
ConstantPacked constant pool entries.  This allows us to generate altivec
code such as the following, which adds a vector constantto a packed float.

LCPI1_0:  <4 x float> < float 0.0e+0, float 0.0e+0, float 0.0e+0, float 1.0e+0 >
        .space  4
        .space  4
        .space  4
        .long   1065353216      ; float 1
        .text
        .align  4
        .globl  _foo
_foo:
        lis r2, ha16(LCPI1_0)
        la r2, lo16(LCPI1_0)(r2)
        li r4, 0
        lvx v0, r4, r2
        lvx v1, r4, r3
        vaddfp v0, v1, v0
        stvx v0, r4, r3
        blr

For the llvm code:

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24616 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 06:18:55 +00:00
Evan Cheng
66a48bbc35 Teach tblgen to accept register source operands in patterns, e.g.
def SHL8rCL  : I<0xD2, MRM4r, (ops R8 :$dst, R8 :$src),
                 "shl{b} {%cl, $dst|$dst, %CL}",
                 [(set R8:$dst, (shl R8:$src, CL))]>, Imp<[CL],[]>;

This generates a CopyToReg operand and added its 2nd result to the shl as
a flag operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24557 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 00:18:45 +00:00
Chris Lattner
eb19e40efb Make SelectNodeTo return N
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24548 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 22:45:14 +00:00
Nate Begeman
f43a3ca26d First chunk of actually generating vector code for packed types. These
changes allow us to generate the following code:

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

for this llvm:

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
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24534 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 08:22:07 +00:00
Evan Cheng
14229bb636 Fixed a bug introduced by my last commit: TargetGlobalValues should key on
GlobalValue * and index pair. Update getGlobalAddress() for symmetry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24524 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 02:49:21 +00:00
Evan Cheng
61ca74bc3a Added an index field to GlobalAddressSDNode so it can represent X+12, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 02:04:11 +00:00
Chris Lattner
47725d059b Add support for a new STRING and LOCATION node for line number support, patch
contributed by Daniel Berlin, with a few cleanups here and there by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24512 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 06:15:39 +00:00
Nate Begeman
6a648614e8 Add the majority of the vector machien value types we expect to support,
and make a few changes to the legalization machinery to support more than
16 types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24511 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 05:45:29 +00:00
Nate Begeman
ab48be3772 Check in code to scalarize arbitrarily wide packed types for some simple
vector operations (load, add, sub, mul).

This allows us to codegen:
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
}

on ppc as:
_foo:
        lfs f0, 12(r3)
        lfs f1, 8(r3)
        lfs f2, 4(r3)
        lfs f3, 0(r3)
        fadds f0, f0, f0
        fadds f1, f1, f1
        fadds f2, f2, f2
        fadds f3, f3, f3
        stfs f0, 12(r3)
        stfs f1, 8(r3)
        stfs f2, 4(r3)
        stfs f3, 0(r3)
        blr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24484 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-22 18:16:00 +00:00
Chris Lattner
291ca1c563 Add a new flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 23:06:08 +00:00
Chris Lattner
02d09206ee Add some more directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24474 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-21 19:51:51 +00:00