Jim Laskey
70293489ac
Start of Dwarf framework code.
...
llvm-svn: 24912
2005-12-21 19:44:40 +00:00
Chris Lattner
5d042179e6
Add an accessor
...
llvm-svn: 24831
2005-12-18 21:00:53 +00:00
Evan Cheng
be5a63c601
Yet another variant of getTargetNode().
...
llvm-svn: 24758
2005-12-17 01:44:51 +00:00
Jim Laskey
37957b1ad3
Added source file/line correspondence for dwarf (PowerPC only at this point.)
...
llvm-svn: 24748
2005-12-16 22:45:29 +00:00
Chris Lattner
d27892a194
Add a couple more fields, move ctor init list to .cpp file, add support
...
for emitting the ctor/dtor list for common targets.
llvm-svn: 24694
2005-12-13 06:32:10 +00:00
Evan Cheng
0b7a482921
Added new getNode and getTargetNode variants for X86 stores.
...
llvm-svn: 24653
2005-12-10 00:37:58 +00:00
Evan Cheng
6610545b7e
Added patterns for ADD8rm, etc. These fold load operands. e.g. addb 4(%esp), %al
...
llvm-svn: 24648
2005-12-09 22:48:48 +00:00
Evan Cheng
d11d31e0bd
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.
llvm-svn: 24634
2005-12-08 02:00:36 +00:00
Nate Begeman
6c1b8712c5
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
}
llvm-svn: 24616
2005-12-06 06:18:55 +00:00
Evan Cheng
9c3508e1ab
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.
llvm-svn: 24557
2005-12-01 00:18:45 +00:00
Chris Lattner
7bed501258
Make SelectNodeTo return N
...
llvm-svn: 24548
2005-11-30 22:45:14 +00:00
Nate Begeman
31121419c8
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
}
llvm-svn: 24534
2005-11-30 08:22:07 +00:00
Evan Cheng
08ab45044b
Fixed a bug introduced by my last commit: TargetGlobalValues should key on
...
GlobalValue * and index pair. Update getGlobalAddress() for symmetry.
llvm-svn: 24524
2005-11-30 02:49:21 +00:00
Evan Cheng
025dab1137
Added an index field to GlobalAddressSDNode so it can represent X+12, etc.
...
llvm-svn: 24523
2005-11-30 02:04:11 +00:00
Chris Lattner
f9ea6dbf66
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.
llvm-svn: 24512
2005-11-29 06:15:39 +00:00
Nate Begeman
a1c2df2471
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.
llvm-svn: 24511
2005-11-29 05:45:29 +00:00
Nate Begeman
a90bb6d9b1
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
llvm-svn: 24484
2005-11-22 18:16:00 +00:00
Chris Lattner
e8b78e73f7
Add a new flag
...
llvm-svn: 24480
2005-11-21 23:06:08 +00:00
Chris Lattner
e68011991d
Add some more directives
...
llvm-svn: 24474
2005-11-21 19:51:51 +00:00
Chris Lattner
7edfd3138a
add two more config directives, add method for printing constant pool
...
llvm-svn: 24463
2005-11-21 08:24:11 +00:00
Chris Lattner
37cc677f05
Make the AsmPrinter keep track of the notion of a function number.
...
llvm-svn: 24460
2005-11-21 08:12:47 +00:00
Chris Lattner
29dcb4d3ef
Capitalize methods for better consistency
...
llvm-svn: 24455
2005-11-21 07:51:06 +00:00
Chris Lattner
05782d4087
Add section switching to to common AsmPrinter code.
...
llvm-svn: 24444
2005-11-21 07:05:42 +00:00
Chris Lattner
cf57490f4c
Add a new option.
...
llvm-svn: 24439
2005-11-21 06:41:08 +00:00
Chris Lattner
f6ae8401db
add a new node type
...
llvm-svn: 24436
2005-11-20 22:55:57 +00:00
Chris Lattner
e9a33d2505
Add two new construction methods, patch by Evan Cheng
...
llvm-svn: 24417
2005-11-19 01:42:10 +00:00
Nate Begeman
7d513f65ae
Teach LLVM how to scalarize packed types. Currently, this only works on
...
packed types with an element count of 1, although more generic support is
coming. This allows LLVM to turn the following code:
void %foo(<1 x float> * %a) {
entry:
%tmp1 = load <1 x float> * %a;
%tmp2 = add <1 x float> %tmp1, %tmp1
store <1 x float> %tmp2, <1 x float> *%a
ret void
}
Into:
_foo:
lfs f0, 0(r3)
fadds f0, f0, f0
stfs f0, 0(r3)
blr
llvm-svn: 24416
2005-11-19 00:36:38 +00:00
Nate Begeman
5784fb4adf
Teach the type lowering code about turning packed types into vector types.
...
Next step: generating vector dag nodes, and legalizing them into scalar
code.
llvm-svn: 24404
2005-11-17 21:44:42 +00:00
Chris Lattner
efa81a081f
add a flag
...
llvm-svn: 24375
2005-11-16 07:21:15 +00:00
Chris Lattner
389e3bfb0c
Teach emitAlignment to handle explicit alignment requests by globals.
...
llvm-svn: 24354
2005-11-14 19:00:06 +00:00
Andrew Lenharth
9b036b1bdb
added a chain output
...
llvm-svn: 24306
2005-11-11 22:48:54 +00:00
Andrew Lenharth
6600f4a1d0
Add support for a cycle counter intrinsic. As basically all processors have
...
this and have it in about the same form, I think this makes sense.
on X86, you do a RDTSC (64bit result, from any ring since the P5MMX)
on Alpha, you do a RDCC
on PPC, there is a sequence which may or may not work depending on how things
are setup by the OS. Or something like that. Maybe someone who knows PPC
can add support. Something about the time base register.
on Sparc, you read %tick, which in some solaris versions (>=8) is readable by
userspace
on IA64 read ar.itc
So I think the ulong is justified since all of those are 64bit.
Support is slighly flaky on old chips (P5 and lower) and sometimes
depends on OS (PPC, Sparc). But for modern OS/Hardware (aka this decade),
we should be ok.
I am still not sure what to do about lowering. I can either see a lower to 0, to
gettimeofday (or the target os equivalent), or loudly complaining and refusing to
continue.
I am commiting an Alpha implementation. I will add the X86 implementation if I
have to (I have use of it in the near future), but if someone who knows that
backend (and the funky multi-register results) better wants to add it, it would
take them a lot less time ;)
TODO: better lowering and legalizing, and support more platforms
llvm-svn: 24299
2005-11-11 16:45:18 +00:00
Chris Lattner
bfa198b9f1
add support for .asciz, and enable it by default. If your target assembler
...
doesn't support .asciz, just set AscizDirective to null in your asmprinter.
This compiles C strings to:
l1__2E_str_1: ; '.str_1'
.asciz "foo"
instead of:
l1__2E_str_1: ; '.str_1'
.ascii "foo\000"
llvm-svn: 24271
2005-11-10 18:05:57 +00:00
Chris Lattner
ce6f7839fe
Switch the allnodes list from a vector of pointers to an ilist of nodes.
...
This eliminates the vector, allows constant time removal of a node from
a graph, and makes iteration over the all nodes list stable when adding
nodes to the graph.
llvm-svn: 24262
2005-11-09 23:46:43 +00:00
Chris Lattner
e1cf681dee
Change the ValueList array for each node to be shared instead of individually
...
allocated. Further, in the common case where a node has a single value, just
reference an element from a small array. This is a small compile-time wi.
llvm-svn: 24250
2005-11-08 23:30:11 +00:00
Chris Lattner
12686ba20f
Switch the operandlist/valuelist from being vectors to being just an array.
...
This saves 12 bytes from SDNode, but doesn't speed things up substantially
(our graphs apparently already fit within the cache on my g5). In any case
this reduces memory usage.
llvm-svn: 24248
2005-11-08 22:06:23 +00:00
Chris Lattner
32dee7201b
adjust itf
...
llvm-svn: 24242
2005-11-08 18:52:57 +00:00
Chris Lattner
f0f5449612
Change a comment slightly
...
llvm-svn: 24226
2005-11-06 17:40:18 +00:00
Nate Begeman
aecebc076b
Add the necessary support to the ISel to allow targets to codegen the new
...
alignment information appropriately. Includes code for PowerPC to support
fixed-size allocas with alignment larger than the stack. Support for
arbitrarily aligned dynamic allocas coming soon.
llvm-svn: 24224
2005-11-06 09:00:38 +00:00
Chris Lattner
4ab26b20b7
Add a method
...
llvm-svn: 23989
2005-10-25 21:02:21 +00:00
Chris Lattner
1245463d22
Remove a prototype
...
llvm-svn: 23951
2005-10-24 04:13:21 +00:00
Andrew Lenharth
9fad56d2d2
add TargetExternalSymbol
...
llvm-svn: 23886
2005-10-23 03:40:17 +00:00
Chris Lattner
610724aedd
add missing prototype
...
llvm-svn: 23867
2005-10-21 15:49:28 +00:00
Chris Lattner
ca5f516c08
add a new method
...
llvm-svn: 23840
2005-10-20 07:37:59 +00:00
Nate Begeman
b49e7aa166
SimplifySelectCC is dead
...
llvm-svn: 23705
2005-10-13 03:10:46 +00:00
Chris Lattner
bc5ae03dea
add a helper class
...
llvm-svn: 23633
2005-10-05 06:34:34 +00:00
Jim Laskey
1c928ba21a
Added allnodes_size for scheduling support.
...
llvm-svn: 23567
2005-09-30 19:27:01 +00:00
Chris Lattner
9a2fb006e4
Add FP versions of the binary operators, keeping the int and fp worlds seperate.
...
llvm-svn: 23506
2005-09-28 22:29:58 +00:00
Chris Lattner
288e5b0a7d
Expose the LiveInterval interfaces as public headers.
...
llvm-svn: 23400
2005-09-21 04:19:09 +00:00
Chris Lattner
b68c833b48
Add a new argument to ReplaceAllUsesWith to keep track of nodes deleted by
...
this method
llvm-svn: 23254
2005-09-07 05:36:18 +00:00
Chris Lattner
7862cff120
add a map for nullary ops
...
llvm-svn: 23223
2005-09-02 19:35:42 +00:00
Chris Lattner
a0ac88861d
Add a new ANY_EXTEND node, which operates like an extension but has undefined
...
top bits.
llvm-svn: 23200
2005-09-02 00:14:40 +00:00
Nate Begeman
be2fa8f86f
First pass at the DAG Combiner. It isn't used anywhere yet, but it should
...
be mostly functional. It currently has all folds from SelectionDAG.cpp
that do not involve a condition code.
llvm-svn: 23184
2005-09-01 00:19:25 +00:00
Chris Lattner
ed58907fa3
remove an inappropriate comment
...
llvm-svn: 23182
2005-08-31 22:49:51 +00:00
Chris Lattner
b06ce2e026
Allow physregs to occur in the dag with multiple types. Though I don't like
...
this, it is a requirement on PPC, which can have an f32 value in r3 at one
point in a function and a f64 value in r3 at another point. :(
llvm-svn: 23160
2005-08-30 22:38:05 +00:00
Nate Begeman
f279937fd9
Add AssertSext, AssertZext nodes for targets that pass arguments in
...
registers, and the incoming values have already been zero or sign extended
from the appopriate type to the register width.
llvm-svn: 23146
2005-08-30 02:39:32 +00:00
Chris Lattner
d6753aa388
add some method variants
...
llvm-svn: 23142
2005-08-30 01:56:13 +00:00
Chris Lattner
1a17dba9d1
improve comment
...
llvm-svn: 23134
2005-08-29 22:48:32 +00:00
Chris Lattner
05f6bb1b68
Add a new API for nate
...
llvm-svn: 23132
2005-08-29 22:00:00 +00:00
Reid Spencer
71966308fc
Fix a typo.
...
llvm-svn: 23117
2005-08-27 19:06:05 +00:00
Chris Lattner
25b6e62a46
Add a new version of ReplaceAllUsesWith, make the comments more useful.
...
llvm-svn: 23086
2005-08-26 18:35:58 +00:00
Chris Lattner
a31708e6b3
Change ConstantPoolSDNode to actually hold the Constant itself instead of
...
putting it into the constant pool. This allows the isel machinery to
create constants that it will end up deciding are not needed, without them
ending up in the resultant function constant pool.
llvm-svn: 23081
2005-08-26 17:15:30 +00:00
Chris Lattner
929c00e9e9
Fix a huge annoyance: SelectNodeTo took types before the opcode unlike
...
every other SD API. Fix it to take the opcode before the types.
llvm-svn: 23079
2005-08-26 16:36:26 +00:00
Chris Lattner
70cc927742
add a method
...
llvm-svn: 23049
2005-08-25 17:24:09 +00:00
Chris Lattner
713643bc71
add an enum value
...
llvm-svn: 23048
2005-08-25 17:07:09 +00:00
Chris Lattner
165fcbcd64
Fix a problem Duraid noticed, where we weren't removing values from the kills
...
list when doing two-address and phi node lowering during register allocation.
llvm-svn: 23043
2005-08-25 05:45:31 +00:00
Chris Lattner
70cb011425
Add support for TargetConstantPool node
...
llvm-svn: 23040
2005-08-25 05:02:41 +00:00
Chris Lattner
813f6ddaf8
add a new TargetFrameIndex node
...
llvm-svn: 23035
2005-08-25 00:43:01 +00:00
Chris Lattner
22c6c99e5d
add a method
...
llvm-svn: 23027
2005-08-24 23:00:29 +00:00
Chris Lattner
79191b194f
add two new methods
...
llvm-svn: 23024
2005-08-24 22:43:53 +00:00
Chris Lattner
180f2050d0
Keep the killed/dead sets sorted, so that "KillsRegister" can do a quick
...
binary search to test for membership. This speeds up LLC a bit more on KC++,
e.g. on itanium from 16.6974s to 14.8272s, PPC from 11.4926s to 10.7089s and
X86 from 10.8128s to 9.7943s, with no difference in generated code (like all
of the RA patches).
With these changes, isel is the slowest pass for PPC/X86, but linscan+live
intervals is still > 50% of the compile time for itanium. More work could
be done, but this is the last for now.
llvm-svn: 22993
2005-08-24 00:09:02 +00:00
Chris Lattner
3bb878f134
Change live variables from using multimaps to using maps of vectors and
...
rearrange some of the accessors to be more efficient.
This makes it much more efficient to iterate over all of the things with the
same value. This speeds up liveintervals analysis from 8.63s to 3.79s with
a release build of llc on kc++ with -march=ia64. This also speeds up live
var from 1.66s -> 0.87s as well, reducing total llc time from 20.1s->15.2s.
This also speeds up other targets slightly, e.g. llc time on X86 from 16.84
-> 16.45s, and PPC from 17.64->17.03s.
llvm-svn: 22990
2005-08-23 23:40:41 +00:00
Chris Lattner
f91a79a306
Add RegisterDefIsDead to correspond to KillsRegister, mark both const
...
llvm-svn: 22987
2005-08-23 22:43:24 +00:00
Chris Lattner
a51be5a84c
add a method
...
llvm-svn: 22958
2005-08-21 22:30:42 +00:00
Chris Lattner
5c82be2ffc
ADd a method
...
llvm-svn: 22954
2005-08-21 19:48:53 +00:00
Chris Lattner
d76cf28d13
Add 5-operand version of SelectNodeTo
...
llvm-svn: 22950
2005-08-21 18:49:58 +00:00
Chris Lattner
0c4565bf91
ADd support for TargetGlobalAddress nodes
...
llvm-svn: 22939
2005-08-19 22:31:34 +00:00
Nate Begeman
0966f7d0b9
Add support for target nodes with more than 3 operands, required by ppc
...
llvm-svn: 22894
2005-08-19 00:56:28 +00:00
Chris Lattner
2e3f21c27f
add a method
...
llvm-svn: 22867
2005-08-18 18:44:33 +00:00
Nate Begeman
474ec3c02d
Add support for target DAG nodes that take 4 operands, such as PowerPC's
...
rlwinm.
llvm-svn: 22856
2005-08-18 07:30:15 +00:00
Nate Begeman
50efb750b6
Add two new methods isTargetOpcode() which returns true if the node type
...
is greater than the range of building selection dag node types, and
getTargetOpcode(), which returns the node opcode less the value of
isd::builtin_op_end, which specifies the end of the builtin types.
llvm-svn: 22844
2005-08-17 23:44:54 +00:00
Jim Laskey
d761e8859d
Move the code dependency for MathExtras.h from SelectionDAGNodes.h.
...
Added some class dividers in SelectionDAG.cpp.
llvm-svn: 22841
2005-08-17 20:08:02 +00:00
Jim Laskey
61e3d7bca5
Culling out use of unions for converting FP to bits and vice versa.
...
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
Chris Lattner
14518a342f
add ReplaceAllUsesWith, and a helper to implemented it
...
llvm-svn: 22833
2005-08-17 18:59:17 +00:00
Chris Lattner
1e93590d9f
Make removeUser more efficient, add a matching addUser.
...
Fix the setOperands methods I added to update use/def information correctly.
llvm-svn: 22832
2005-08-17 18:58:38 +00:00
Chris Lattner
d3add16ed6
This was moved to the .cpp file
...
llvm-svn: 22827
2005-08-17 06:46:50 +00:00
Chris Lattner
dd99fbadb7
make sure to remove a node from the use list of its operands when we replace
...
it.
llvm-svn: 22820
2005-08-17 01:54:00 +00:00
Chris Lattner
3895acdb6a
add some helper methods, and a new TargetConstant node, which is not
...
subjected to folding.
llvm-svn: 22812
2005-08-17 00:33:30 +00:00
Chris Lattner
3b7e157005
Eliminate the RegSDNode class, which 3 nodes (CopyFromReg/CopyToReg/ImplicitDef)
...
used to tack a register number onto the node.
Instead of doing this, make a new node, RegisterSDNode, which is a leaf
containing a register number. These three operations just become normal
DAG nodes now, instead of requiring special handling.
Note that with this change, it is no longer correct to make illegal
CopyFromReg/CopyToReg nodes. The legalizer will not touch them, and this
is bad, so don't do it. :)
llvm-svn: 22806
2005-08-16 21:55:35 +00:00
Nate Begeman
f6b6378f23
Implement BR_CC and BRTWOWAY_CC. This allows the removal of a rather nasty
...
fixme from the PowerPC backend. Emit slightly better code for legalizing
select_cc.
llvm-svn: 22805
2005-08-16 19:49:35 +00:00
Chris Lattner
c93a92c951
allow passing a dag into getOperationName and dump
...
llvm-svn: 22803
2005-08-16 18:32:18 +00:00
Chris Lattner
0b9933e14b
add some methods for dag->dag isel
...
llvm-svn: 22800
2005-08-16 18:16:24 +00:00
Nate Begeman
021a5b3fe1
Remove an unncessary argument to SimplifySelectCC and add an additional
...
assert when creating a select_cc node.
llvm-svn: 22780
2005-08-13 06:14:17 +00:00
Nate Begeman
4e8f777256
Fix the fabs regression on x86 by abstracting the select_cc optimization
...
out into SimplifySelectCC. This allows both ISD::SELECT and ISD::SELECT_CC
to use the same set of simplifying folds.
llvm-svn: 22779
2005-08-13 06:00:21 +00:00
Nate Begeman
206e850add
Some SELECT_CC cleanups:
...
1. move assertions for node creation to getNode()
2. legalize the values returned in ExpandOp immediately
3. Move select_cc optimizations from SELECT's getNode() to SELECT_CC's,
allowing them to be cleaned up significantly.
This paves the way to pick up additional optimizations on SELECT_CC, such
as sum-of-absolute-differences.
llvm-svn: 22757
2005-08-11 01:12:20 +00:00
Nate Begeman
eddc9d4856
Add new node, SELECT_CC. This node is for targets that don't natively
...
implement SELECT.
llvm-svn: 22755
2005-08-10 20:51:12 +00:00
Chris Lattner
40937543ee
I can't believe I caught this before Misha! :)
...
llvm-svn: 22733
2005-08-09 23:08:53 +00:00
Chris Lattner
0fa4402b59
Eliminate the SetCCSDNode in favor of a CondCodeSDNode class. This pulls the
...
CC out of the SetCC operation, making SETCC a standard ternary operation and
CC's a standard DAG leaf. This will make it possible for other node to use
CC's as operands in the future...
llvm-svn: 22728
2005-08-09 20:20:18 +00:00
Chris Lattner
367080bfc2
Mark these as V9 specific
...
llvm-svn: 22572
2005-08-01 20:38:31 +00:00
Andrew Lenharth
f623af9b64
new is not a valid default anywhere, so make this pure virtual
...
llvm-svn: 22542
2005-07-28 18:13:59 +00:00
Andrew Lenharth
02e0c80ecb
Like constants, globals on some platforms are GOT relative. This means they have to be allocated
...
near the GOT, which new doesn't do. So break out the allocate into a new function.
Also move GOT index handling into JITResolver. This lets it update the mapping when a Lazy
function is JITed. It doesn't managed the table, just the mapping. Note that this is
still non-ideal, as any function that takes a function address should also take a GOT
index, but that is a lot of changes. The relocation resolve process updates any GOT entry
it sees is out of date.
llvm-svn: 22537
2005-07-28 12:44:13 +00:00
Jeff Cohen
81980781a1
Eliminate tabs and trailing spaces.
...
llvm-svn: 22520
2005-07-27 05:53:44 +00:00
Andrew Lenharth
8fc535e9bd
allow constants to be relocated like GV (necessary for alpha, as constants are relocated with globals, not with .text), and allow targets to have a GOT managed for them
...
llvm-svn: 22496
2005-07-22 20:46:42 +00:00
Chris Lattner
5aed419b6d
Add two helper methods, adjust a prototype
...
llvm-svn: 22456
2005-07-16 17:40:34 +00:00
Chris Lattner
e40a414500
Add ability to set TYPE and FLAGS field for section trivially
...
llvm-svn: 22454
2005-07-16 17:35:26 +00:00
Chris Lattner
40fbf63df8
Major refactor of the ELFWriter code. Instead of building up one big
...
vector that represents the .o file at once, build up a vector for each
section of the .o file. This is needed because the .o file writer needs
to be able to switch between sections as it emits them (e.g. switch
between the .text section and the .rel section when emitting code).
This patch has no functionality change.
llvm-svn: 22453
2005-07-16 08:01:13 +00:00
Chris Lattner
81e3035723
Add support for emitting 64-bit integers
...
llvm-svn: 22399
2005-07-12 06:57:26 +00:00
Chris Lattner
79e388c0f6
Add some apparently undocumented ELF section header flags
...
llvm-svn: 22398
2005-07-12 06:40:29 +00:00
Chris Lattner
3efcbfbfc7
The symbol table just needs a const GlobalValue*, not a non-const one.
...
llvm-svn: 22377
2005-07-11 06:16:24 +00:00
Chris Lattner
e788f4d773
expose a new code emitter object
...
llvm-svn: 22374
2005-07-11 05:15:32 +00:00
Chris Lattner
fe9d6ce97a
add a helper method
...
llvm-svn: 22373
2005-07-11 04:49:33 +00:00
Chris Lattner
fada9c1e1f
add a name mangler object
...
llvm-svn: 22370
2005-07-11 03:11:10 +00:00
Chris Lattner
6e49696ba6
Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.
...
This is the last MVTSDNode.
This allows us to eliminate a bunch of special case code for handling
MVTSDNodes.
llvm-svn: 22367
2005-07-10 01:55:33 +00:00
Chris Lattner
a966d80ab8
Move TRUNCSTORE to using a VTSDNode operand instead of being a MVTSDNode.
...
Also update some comments that Andrew forgot to update when he changed
loads/stores.
llvm-svn: 22365
2005-07-10 00:28:25 +00:00
Chris Lattner
c355896290
Introduce a new VTSDNode class with the ultimate goal of eliminating the
...
MVTSDNode class. This class is used to provide an operand to operators
that require an extra type. We start by converting FP_ROUND_INREG and
SIGN_EXTEND_INREG over to using it.
llvm-svn: 22364
2005-07-10 00:07:11 +00:00
Chris Lattner
ad1e2361e9
Add support for building/representing the symbol table, add some enum constants
...
llvm-svn: 22342
2005-07-07 07:00:37 +00:00
Chris Lattner
85b1b5aa24
iniital checkin of ELFWriter header.
...
For now, the elf writer is only capable of emitting an empty elf file, with
a section table and a section table string table. This will be enhanced
in the future :)
llvm-svn: 22290
2005-06-27 06:28:45 +00:00
Chris Lattner
b9ccf966b8
add a new map
...
llvm-svn: 22017
2005-05-14 07:36:02 +00:00
Chris Lattner
1032d777e6
Add a way to construct an arbitrary node, cleanly.
...
llvm-svn: 22008
2005-05-14 06:20:08 +00:00
Chris Lattner
3afe2d8d83
add accessors
...
llvm-svn: 22007
2005-05-14 06:19:11 +00:00
Chris Lattner
97505aa9ac
add TAILCALL node
...
llvm-svn: 21956
2005-05-13 18:40:17 +00:00
Chris Lattner
c79b6eeefd
add a new method
...
llvm-svn: 21929
2005-05-13 07:23:03 +00:00
Chris Lattner
5cd760d12d
allow a virtual register to be associated with live-in values.
...
llvm-svn: 21927
2005-05-13 07:08:07 +00:00
Chris Lattner
094bbfcebb
rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.
...
llvm-svn: 21915
2005-05-12 23:24:06 +00:00
Chris Lattner
328273326d
new method
...
llvm-svn: 21869
2005-05-11 18:56:45 +00:00
Chris Lattner
9aedca57b1
Add READPORT, WRITEPORT, READIO, WRITEIO nodes, wrap long lines
...
llvm-svn: 21823
2005-05-09 20:21:27 +00:00
Andrew Lenharth
8b64bd0fd5
Implement count leading zeros (ctlz), count trailing zeros (cttz), and count
...
population (ctpop). Generic lowering is implemented, however only promotion
is implemented for SelectionDAG at the moment.
More coming soon.
llvm-svn: 21676
2005-05-03 17:19:30 +00:00
Tanya Lattner
ec45f6a4cd
Adding ModuloSched SB.
...
llvm-svn: 21648
2005-05-01 16:14:34 +00:00
Chris Lattner
4678a790e6
Add FSQRT, FSIN, FCOS nodes, patch contributed by Morten Ofstad
...
llvm-svn: 21605
2005-04-28 21:44:03 +00:00
Andrew Lenharth
2a00530fa7
Implement Value* tracking for loads and stores in the selection DAG. This enables one to use alias analysis in the backends.
...
(TRUNK)Stores and (EXT|ZEXT|SEXT)Loads have an extra SDOperand which is a SrcValueSDNode which contains the Value*. Note that if the operation is introduced by the backend, it will still have the operand, but the value* will be null.
llvm-svn: 21599
2005-04-27 20:10:01 +00:00
Misha Brukman
5e38b1e17e
Convert tabs to spaces
...
llvm-svn: 21438
2005-04-22 03:46:24 +00:00
Misha Brukman
4ad5efd1a9
Remove trailing whitespace
...
llvm-svn: 21409
2005-04-21 20:39:54 +00:00
Chris Lattner
41aabb9427
Add a new helper method which returns the and that is equivalent to what
...
ZERO_EXTEND_INREG was.
llvm-svn: 21264
2005-04-13 02:37:19 +00:00
Chris Lattner
f5fe51581b
Remove the ZERO_EXTEND_INREG node which is redundant with AND
...
llvm-svn: 21263
2005-04-13 02:36:41 +00:00
Duraid Madina
b7227cd315
rename addU64Imm() to addImm64()
...
llvm-svn: 21223
2005-04-11 07:14:41 +00:00
Jeff Cohen
4ac4db487c
Eliminate major source of VC++ "possible loss of data" warnings.
...
llvm-svn: 21215
2005-04-11 03:38:28 +00:00
Duraid Madina
a416f4bbf3
* store immediate values as int64_t, not int. come on, we should be happy
...
when there are immediates, let's not worry about the memory overhead of
this :)
* add addU64Imm(uint64_t val) to machineinstrbuilder
(seriously: this seems required to support 64-bit immediates cleanly. if it
_really_ gets on your nerves, feel free to pull it out ;) )
coming up next week: "all your floating point constants are belong to us"
llvm-svn: 21208
2005-04-10 09:18:55 +00:00
Chris Lattner
3cbcd49059
add routines to track the livein/out set for a function
...
llvm-svn: 21179
2005-04-09 15:22:53 +00:00
Chris Lattner
b0e6e4b693
Add a new node
...
llvm-svn: 21162
2005-04-09 03:21:50 +00:00
Chris Lattner
6c466448d3
fix this method for 64-bit constants
...
llvm-svn: 21158
2005-04-08 21:31:29 +00:00
Chris Lattner
4201b81130
document these nodes, as they are nonobvious
...
llvm-svn: 21108
2005-04-06 04:21:29 +00:00
Nate Begeman
12af81407b
Add MULHU and MULHS nodes for the high part of an (un)signed 32x32=64b
...
multiply.
llvm-svn: 21102
2005-04-05 22:36:56 +00:00
Duraid Madina
6b3090447d
a wise man once said:
...
"!!!!!!!! IF YOU CHANGE SPACES TO TABS, YOU WILL BE KILLED!!!!!!"
llvm-svn: 21062
2005-04-03 14:57:35 +00:00
Duraid Madina
3a10f491f0
add support for prefix/suffix strings to go around GlobalValue(s)
...
(which may or be function pointers) in the asmprinter. For the moment,
this changes nothing, except the IA64 backend which can use this to write:
data8.ua @fptr(blah__blah__mangled_function_name)
(by setting FunctionAddrPrefix/Suffix to "@fptr(" / ")")
llvm-svn: 21024
2005-04-02 12:21:51 +00:00
Chris Lattner
e74fa510c9
Add two happy new nodes for FABS and FNEG
...
llvm-svn: 21007
2005-04-02 04:58:28 +00:00
Chris Lattner
92920b74a0
fix a comment
...
llvm-svn: 21003
2005-04-02 03:59:45 +00:00
Chris Lattner
37abadec02
add some new nodes.
...
llvm-svn: 21000
2005-04-02 03:30:33 +00:00
Nate Begeman
4034852ba9
Add ISD::UNDEF node
...
Teach the SelectionDAG code how to expand and promote it
Have PPC32 LowerCallTo generate ISD::UNDEF for int arg regs used up by fp
arguments, but not shadowing their value. This allows us to do the right
thing with both fixed and vararg floating point arguments.
llvm-svn: 20988
2005-04-01 22:34:39 +00:00
Misha Brukman
b5dc9aae6c
Fix spelling of `corresponds'
...
llvm-svn: 20966
2005-03-31 21:30:35 +00:00
Andrew Lenharth
7db3834ecf
PCMarker support for DAG and Alpha
...
llvm-svn: 20965
2005-03-31 21:24:06 +00:00
Duraid Madina
8b010ff8d2
dainty
...
llvm-svn: 20653
2005-03-17 18:23:22 +00:00
Chris Lattner
10f39c27ee
Map doubles from integers, not the double itself.
...
llvm-svn: 20229
2005-02-17 20:16:58 +00:00
Chris Lattner
92b24431d9
Improve spelling
...
llvm-svn: 19931
2005-01-30 00:13:34 +00:00
Chris Lattner
aa4ae8f5b3
Adjust to ilist changes.
...
llvm-svn: 19923
2005-01-29 18:41:12 +00:00
Chris Lattner
65c4c91477
Add an accessor.
...
llvm-svn: 19794
2005-01-23 22:57:27 +00:00
Chris Lattner
38249d15df
Expose more information from register allocation to passes that run after
...
it.
llvm-svn: 19788
2005-01-23 22:13:36 +00:00
Chris Lattner
519fcf19c2
Give SelectionDAG a TargetLowering instance instead of TM instance.
...
llvm-svn: 19778
2005-01-23 04:36:06 +00:00
Chris Lattner
9ee3bbc844
Keep track of node depth for each node
...
llvm-svn: 19732
2005-01-21 21:39:38 +00:00
Chris Lattner
8e17ad37f2
Eliminate the unimplemented ADDC/SUBB operations, add ADD_PARTS/SUB_PARTS instead.
...
llvm-svn: 19713
2005-01-20 18:50:39 +00:00
Chris Lattner
7005632b59
Add an accessor for targets that pass args in regs
...
llvm-svn: 19702
2005-01-19 20:19:58 +00:00
Chris Lattner
0697def39d
Keep track of the returned value type as well.
...
llvm-svn: 19669
2005-01-18 19:26:18 +00:00
Chris Lattner
818e819e43
Allow setcc operations to have non-bool types.
...
llvm-svn: 19655
2005-01-18 02:51:41 +00:00
Chris Lattner
e2fd07b43d
Make methods private, add a method.
...
llvm-svn: 19634
2005-01-17 17:14:43 +00:00
Chris Lattner
783a9d8893
Add methods
...
llvm-svn: 19627
2005-01-17 02:24:59 +00:00
Chris Lattner
ee53940434
Add some helper methods.
...
llvm-svn: 19570
2005-01-15 06:52:18 +00:00
Chris Lattner
2f65e8798f
Add new SIGN_EXTEND_INREG, ZERO_EXTEND_INREG, and FP_ROUND_INREG operators.
...
llvm-svn: 19568
2005-01-15 06:17:04 +00:00
Chris Lattner
3df2651c81
Change CopyFromReg to take and produce a chain node, allowing it to be used
...
with physregs that are not live across the entire block.
llvm-svn: 19560
2005-01-14 22:37:20 +00:00
Chris Lattner
c73bf62770
Start adding some new operators, give IMPLICIT_DEF a chain operand.
...
llvm-svn: 19558
2005-01-14 22:07:46 +00:00
Chris Lattner
c6f23adb2a
Add a method
...
llvm-svn: 19538
2005-01-13 22:58:50 +00:00
Chris Lattner
7a8788c9ac
Add new ImplicitDef node, rename CopyRegSDNode class to RegSDNode.
...
llvm-svn: 19535
2005-01-13 20:50:02 +00:00
Chris Lattner
000509e7b0
Add a new node type, add comments.
...
llvm-svn: 19525
2005-01-13 17:58:35 +00:00
Chris Lattner
92c07c0dba
New method.
...
llvm-svn: 19516
2005-01-12 18:37:33 +00:00
Chris Lattner
f01a5206ea
Update comments to indicate CopyFrom/ToReg take physregs as well as vregs.
...
llvm-svn: 19514
2005-01-12 18:11:36 +00:00
Chris Lattner
1b9caa4504
Add MEMSET/MEMCPY/MEMMOVE operations. Fix a really bad bug in the vector
...
SDNode ctor.
llvm-svn: 19462
2005-01-11 05:56:17 +00:00
Chris Lattner
9ed0d66c8a
Add a helper method.
...
llvm-svn: 19442
2005-01-10 23:25:04 +00:00
Chris Lattner
a4f7c88eb6
Add support for graph operations, and add a viewGraph method to SelectionDAG.
...
llvm-svn: 19440
2005-01-10 23:05:53 +00:00
Chris Lattner
911dca53ee
Adjust prototype
...
llvm-svn: 19387
2005-01-08 19:57:49 +00:00
Chris Lattner
a58b3f48ef
Silence VS warnings.
...
llvm-svn: 19384
2005-01-08 19:52:31 +00:00
Chris Lattner
e4cd40b379
Add operators for FP -> INT conversions and back.
...
llvm-svn: 19368
2005-01-08 08:08:49 +00:00
Chris Lattner
6182c88b85
Add a new SelectionDAG::RemoveDeadNodes method
...
llvm-svn: 19344
2005-01-07 21:08:55 +00:00
Jeff Cohen
6b821ecd16
Fix include. Too easy to make mistakes like this on Windows :(
...
llvm-svn: 19343
2005-01-07 19:21:49 +00:00
Jeff Cohen
a97d6be787
Get new SelectionDAG stuff building with Visual Studio.
...
llvm-svn: 19340
2005-01-07 15:52:36 +00:00
Chris Lattner
c72669973a
Complete rewrite of the SelectionDAG class.
...
llvm-svn: 19327
2005-01-07 07:46:32 +00:00
Chris Lattner
409c6158ad
Common base class for SelectionDAG-based instruction selectors.
...
llvm-svn: 19326
2005-01-07 07:46:03 +00:00
Chris Lattner
c5b77f7009
Initial implementation of the nodes in a SelectionDAG.
...
llvm-svn: 19325
2005-01-07 07:45:27 +00:00
Chris Lattner
d8856e4665
Add required #include
...
llvm-svn: 19302
2005-01-06 03:25:27 +00:00
Chris Lattner
b5473d7cf3
Add a useful method
...
llvm-svn: 19301
2005-01-06 03:23:59 +00:00
Chris Lattner
8263ec34fd
Add a list end sentinal
...
llvm-svn: 19299
2005-01-05 22:14:14 +00:00
Chris Lattner
1105e059bb
add an assertion
...
llvm-svn: 19290
2005-01-05 16:27:34 +00:00
Chris Lattner
70d0a6155b
Add a useful accessor
...
llvm-svn: 19209
2005-01-01 15:58:55 +00:00
Chris Lattner
7f004e59d8
Add two helper functions.
...
llvm-svn: 19208
2005-01-01 15:58:41 +00:00
Chris Lattner
70c19defde
Fix the FIXME, nuke the JIT specific forceCompilationOf method.
...
llvm-svn: 18131
2004-11-22 21:54:35 +00:00
Chris Lattner
39b616869e
These methods are now obsolete
...
llvm-svn: 18128
2004-11-22 21:48:01 +00:00
Chris Lattner
3765dc4ebd
Add another bit, to make the JIT a bit more efficient.
...
llvm-svn: 18077
2004-11-21 03:27:13 +00:00
Chris Lattner
53ea58d4c1
Change this interface a bit
...
llvm-svn: 18063
2004-11-20 23:52:43 +00:00
Chris Lattner
62d04b04f0
Add missing #include
...
llvm-svn: 18058
2004-11-20 23:40:54 +00:00
Chris Lattner
c0599d0f14
Add getCurrentPCOffset() and addRelocation() methods.
...
llvm-svn: 18034
2004-11-20 03:44:39 +00:00
Chris Lattner
20654daf37
Add the getRelocationType method that I forgot
...
llvm-svn: 18033
2004-11-20 03:43:50 +00:00
Chris Lattner
674e29ccde
New file
...
llvm-svn: 18029
2004-11-20 03:05:50 +00:00
Chris Lattner
6e17c0f19e
Remove dead #include
...
llvm-svn: 18027
2004-11-20 02:17:03 +00:00