Evan Cheng
be5a63c601
Yet another variant of getTargetNode().
...
llvm-svn: 24758
2005-12-17 01:44:51 +00:00
Jeff Cohen
19d804b6d6
Fix VC++ level 4 warnings. Because a base class has declared these private, VC++ complains it cannot automatically generate this methods.
...
llvm-svn: 24751
2005-12-17 00:19:22 +00:00
Jeff Cohen
0998a3e70e
Fix VC++ level 4 warnings.
...
llvm-svn: 24750
2005-12-17 00:18:06 +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
Reid Spencer
2b33292a67
Adjust the constructor to the Linker class to take an argument that names
...
the module being constructed. This is used to correctly name the module.
Previously the name of the linker tool was used which produces confusing
output when the module identifier is used in an error message.
llvm-svn: 24699
2005-12-13 20:00:37 +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
Chris Lattner
2fbfb322b1
Remove a now-dead map, patch by Saem Ghani, thanks!
...
llvm-svn: 24629
2005-12-07 05:41:44 +00:00
Sumant Kowshik
4e682cf56e
Added comment for removing assert
...
llvm-svn: 24623
2005-12-06 18:16:08 +00:00
Sumant Kowshik
de8f54485b
Handling of zero length last fields in struct used for growing it arbitrarily
...
llvm-svn: 24620
2005-12-06 18:01:20 +00:00
Chris Lattner
18a2c21fc0
Implement external storage for post-order iteration, implementing PR267
...
Patch by Saem Ghani, thanks!
llvm-svn: 24617
2005-12-06 07:05:27 +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
Chris Lattner
8e01c48256
Add a flag to Module::getGlobalVariable to allow it to return vars with
...
internal linkage.
Patch provided by Evan Jones, thanks!
llvm-svn: 24604
2005-12-05 05:30:21 +00:00
Nate Begeman
811a41a87c
Support multiple ValueTypes per RegisterClass, needed for upcoming vector
...
work. This change has no effect on generated code.
llvm-svn: 24563
2005-12-01 04:51:06 +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
Chris Lattner
80afe26d76
Add a simple clear() method
...
llvm-svn: 24543
2005-11-30 19:31:23 +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
Chris Lattner
7dfd25992c
minor cleanup
...
llvm-svn: 24528
2005-11-30 05:26:03 +00:00
Reid Spencer
3bac59d2f0
Fix a problem with llvm-ranlib that (on some platforms) caused the archive
...
file to become corrupted due to interactions between mmap'd memory segments
and file descriptors closing. The problem is completely avoiding by using
a third temporary file.
Patch provided by Evan Jones
llvm-svn: 24527
2005-11-30 05:21:10 +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
Chris Lattner
8154ba119b
Fix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll
...
llvm-svn: 24508
2005-11-29 01:07:12 +00:00
Andrew Lenharth
cad1d52b64
Added documented rsprofiler interface. Also remove new profiler passes, the
...
old ones have been updated to implement the interface.
llvm-svn: 24499
2005-11-28 18:00:38 +00:00
Andrew Lenharth
311ec68cf4
Random sampling (aka Arnold and Ryder) profiling. This is still preliminary, but it works on spec on x86 and alpha. The idea is to allow profiling passes to remember what profiling they inserted, then a random sampling framework is inserted which consists of duplicated basic blocks (without profiling), such that at each backedge in the program and entry into every function, the framework chooses whether to use the instrumented code or the instrumentation free code. The goal of such a framework is to make it reasonably cheap to do random sampling of very expensive profiling products (such as load-value profiling).
...
The code is organized into 3 parts (2 passes)
1) a linked set of profiling passes, which implement an analysis group (linked, like alias analysis are). These insert profiling into the program, and remember what they inserted, so that at a later time they can be queried about any instruction.
2) a pass that handles inserting the random sampling framework. This also has options to control how random samples are choosen. Currently implemented are Global counters, register allocated global counters, and read cycle counter (see? there was a reason for it).
The profiling passes are almost identical to the existing ones (block, function, and null profiling is supported right now), and they are valid passes without the sampling framework (hence the existing passes can be unified with the new ones, not done yet).
Some things are a bit ugly still, but that should be fixed up soon enough.
Other todo? making the counter values not "magic 2^16 -1" values, but dynamically choosable.
llvm-svn: 24493
2005-11-28 00:58:09 +00:00
Andrew Lenharth
79ee761b69
Reg2Mem is something a pass may depend on, so allow that
...
llvm-svn: 24488
2005-11-22 22:14:23 +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
Chris Lattner
a19b6a0800
Fix the dominates method to return true if the two nodes are the same. Add
...
a new properlyDominates method to do what the old one did.
llvm-svn: 24407
2005-11-18 07:27:33 +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
Chris Lattner
ad22577daf
add malloc_zone_statistics, remove mstats
...
llvm-svn: 24350
2005-11-14 07:24:17 +00:00
Chris Lattner
7e7018b3dc
regenerate
...
llvm-svn: 24348
2005-11-14 06:57:34 +00:00
Chris Lattner
e30379e377
Shrink derived types by 8 bytes each by not having to have 2 vtables pointers
...
and other MI overhead.
llvm-svn: 24344
2005-11-13 03:26:12 +00:00
Chris Lattner
6204629107
Refactor some code, moving methods and data around. This gets rid of some
...
virtual methods.
llvm-svn: 24342
2005-11-13 03:13:26 +00:00
Chris Lattner
3a350f3f83
Shrink the Type class from 32 to 28 bytes on Darwin (which has silly 32-bit
...
bools).
llvm-svn: 24326
2005-11-12 10:07:47 +00:00
Chris Lattner
dec8e7e0aa
remove a dead method
...
llvm-svn: 24325
2005-11-12 08:42:30 +00:00
Chris Lattner
bcf40488a9
Add support for putting globals in a particular section
...
llvm-svn: 24309
2005-11-12 00:09:49 +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
3a18b19a03
Allow per-character control over what target assemblers allow in symbol
...
names. This also changes the default to allow all of "$_." in addition
to letters and numbers as symbol names. If you don't want this, use
markCharUnacceptable to remove one of these or markCharAcceptable to add
to the set. This corresponds with what GAS accepts by default.
llvm-svn: 24291
2005-11-10 21:39:12 +00:00
Chris Lattner
2ba7f5a64d
Add a new option for targets that accept quoted labels.
...
llvm-svn: 24283
2005-11-10 19:30:07 +00:00
Chris Lattner
6ce2a3d52e
Remove M, which is dead. Eliminate a dead typedef. Add comments.
...
llvm-svn: 24282
2005-11-10 19:02:52 +00:00
Chris Lattner
5b0d543080
This method is no longer static
...
llvm-svn: 24280
2005-11-10 18:55:09 +00:00
Chris Lattner
4e377b5d6d
minor interface changes.
...
llvm-svn: 24276
2005-11-10 18:46:57 +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
Andrew Lenharth
ddcbd92b23
needs to go here to apparently.
...
llvm-svn: 24268
2005-11-10 02:07:45 +00:00
Andrew Lenharth
03d60c3d09
The pass everyone has been waiting for!
...
Reg2Mem
for fun you can opt -reg2mem -mem2reg
llvm-svn: 24267
2005-11-10 01:58:38 +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
bb448515ae
Add a new option to indicate we want the code generator to emit code quickly,
...
not spending tons of time microoptimizing it. This is useful for an -O0
style of build.
llvm-svn: 24235
2005-11-08 02:12:47 +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
aa07ab1192
Make sure to initialize the alignment field
...
llvm-svn: 24222
2005-11-06 08:22:18 +00:00
Chris Lattner
0505c89e9c
allow functions and modules to have an explicit alignment
...
llvm-svn: 24209
2005-11-06 06:44:42 +00:00
Chris Lattner
cfaf9f14c0
add an accessor
...
llvm-svn: 24201
2005-11-05 21:58:30 +00:00
Nate Begeman
f299b9fb03
Add support alignment of allocation instructions.
...
Add support for specifying alignment and size of setjmp jmpbufs.
No targets currently do anything with this information, nor is it presrved
in the bytecode representation. That's coming up next.
llvm-svn: 24196
2005-11-05 09:21:28 +00:00
Jeff Cohen
16669485c1
<cassert> no longer required to make VC++ happy.
...
llvm-svn: 24177
2005-11-04 02:59:16 +00:00
Duraid Madina
feeaabd6f1
change NULL to 0, unbreaks the ppc target when building on ia64
...
llvm-svn: 24176
2005-11-04 01:45:04 +00:00
Jim Laskey
42681c1d58
1. Remove ranges from itinerary data.
...
2. Tidy up the subtarget emittined code.
llvm-svn: 24172
2005-11-03 22:47:41 +00:00
Jeff Cohen
ae39880d3a
Keep VC++ happy.
...
llvm-svn: 24148
2005-11-02 04:03:16 +00:00
Jim Laskey
4cb1e29b27
Allow itineraries to be passed through the Target Machine.
...
llvm-svn: 24139
2005-11-01 20:06:59 +00:00
Chris Lattner
dae0aafea8
Remove the LowerConstantExpressionsPass pass
...
llvm-svn: 24089
2005-10-29 05:32:20 +00:00
Chris Lattner
3736ba002f
remove a dead header
...
llvm-svn: 24084
2005-10-29 04:43:10 +00:00
Jim Laskey
03f8b2a366
Structures used to hold scheduling information.
...
llvm-svn: 24049
2005-10-27 18:18:05 +00:00
John Criswell
0893d5847f
Move some constant folding functions into LLVMAnalysis since they are used
...
by Analysis and Transformation passes.
llvm-svn: 24038
2005-10-27 16:00:10 +00:00
Jeff Cohen
ca14516b15
Fix comment.
...
llvm-svn: 24004
2005-10-26 15:02:21 +00:00
Jeff Cohen
342597c279
Eliminate use of sed in Visual Studio builds.
...
llvm-svn: 24003
2005-10-26 14:48:53 +00:00
Chris Lattner
4ab26b20b7
Add a method
...
llvm-svn: 23989
2005-10-25 21:02:21 +00:00
Chris Lattner
6d5166d861
Remove some dead argument names which irritates GCC at certain warning levels.
...
llvm-svn: 23979
2005-10-25 17:59:28 +00:00
Chris Lattner
71195650ea
Add a missing Module::setTargetTriple method.
...
Remove Function::aiterator and Module::giterator typedefs (and const versions)
as they should have been removed when abegin/gbegin were removed. Thanks to
alkis for bringing this to my attn.
llvm-svn: 23978
2005-10-25 17:58:00 +00:00
Jim Laskey
b377b32a58
Preparation of supporting scheduling info. Need to find info based on selected
...
CPU.
llvm-svn: 23974
2005-10-25 15:15:28 +00:00
Chris Lattner
b299faa5c1
Move the END_WITH_NULL marker. Vladimir suggests that this works better with
...
GCC 4.1. I tried it with 4.0 and 3.3 and it seems fine.
llvm-svn: 23957
2005-10-24 05:03:46 +00:00
Chris Lattner
1245463d22
Remove a prototype
...
llvm-svn: 23951
2005-10-24 04:13:21 +00:00
Chris Lattner
8a287bab72
This pass is very old and quite useless, remove it.
...
llvm-svn: 23946
2005-10-24 02:35:24 +00:00
Chris Lattner
bd6a973ae0
Don't link these three passes in anymore
...
llvm-svn: 23941
2005-10-24 02:30:25 +00:00
Chris Lattner
48f3be3f64
add a proto
...
llvm-svn: 23923
2005-10-24 01:00:32 +00:00
Chris Lattner
b035470bae
new header
...
llvm-svn: 23921
2005-10-24 00:59:49 +00:00
Chris Lattner
1cb80df69b
add some prototypes
...
llvm-svn: 23919
2005-10-24 00:38:25 +00:00
Chris Lattner
2f752062c1
Don't invade the system namespace
...
llvm-svn: 23917
2005-10-24 00:16:03 +00:00
Chris Lattner
31ac6df518
There is no need for this to be VC++ only
...
llvm-svn: 23915
2005-10-24 00:08:51 +00:00
Jeff Cohen
dda264c50a
Work around GCC's dislike of attributes on function definitions.
...
llvm-svn: 23896
2005-10-23 15:22:50 +00:00
Chris Lattner
79ea8acebc
Move static functions to .cpp file, reduce #includes, pass strings by
...
const&.
llvm-svn: 23890
2005-10-23 05:25:19 +00:00
Jeff Cohen
a38c737e85
When a function takes a variable number of pointer arguments, with a zero
...
pointer marking the end of the list, the zero *must* be cast to the pointer
type. An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.
The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.
llvm-svn: 23888
2005-10-23 04:37:20 +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
Nate Begeman
6c42f509bc
Invert the TargetLowering flag that controls divide by consant expansion.
...
Add a new flag to TargetLowering indicating if the target has really cheap
signed division by powers of two, make ppc use it. This will probably go
away in the future.
Implement some more ISD::SDIV folds in the dag combiner
Remove now dead code in the x86 backend.
llvm-svn: 23853
2005-10-21 00:02:42 +00:00
Chris Lattner
ca5f516c08
add a new method
...
llvm-svn: 23840
2005-10-20 07:37:59 +00:00
Nate Begeman
2b0b27775d
Enable targets to say that integer divide is expensive, which will trigger
...
an upcoming optimization in the DAG Combiner.
llvm-svn: 23834
2005-10-20 02:14:14 +00:00
Chris Lattner
dac26c2440
Make this work with the internalize change
...
llvm-svn: 23812
2005-10-19 01:41:47 +00:00
Nate Begeman
ee581735d9
Add the ability to lower return instructions to TargetLowering. This
...
allows us to lower legal return types to something else, to meet ABI
requirements (such as that i64 be returned in two i32 regs on Darwin/ppc).
llvm-svn: 23802
2005-10-18 23:23:37 +00:00
Chris Lattner
211f996c92
add an option to the internalize pass
...
llvm-svn: 23782
2005-10-18 06:28:16 +00:00
Chris Lattner
26f6c4de3d
Fix errors when compiling with -pedantic
...
llvm-svn: 23719
2005-10-14 00:33:05 +00:00
Nate Begeman
b49e7aa166
SimplifySelectCC is dead
...
llvm-svn: 23705
2005-10-13 03:10:46 +00:00
Chris Lattner
2800856064
remove a comma to compile with pedantic gcc
...
llvm-svn: 23667
2005-10-08 01:24:19 +00:00
Jeff Cohen
3151f1ba38
Remove prolific source of VC++ truncation warnings.
...
llvm-svn: 23657
2005-10-07 05:29:25 +00:00
Chris Lattner
bc5ae03dea
add a helper class
...
llvm-svn: 23633
2005-10-05 06:34:34 +00:00
Chris Lattner
536a465ceb
Change the signature of replaceUsesOfWithOnConstant to take a Use* and not
...
take the bool. The bool is always true dynamically.
llvm-svn: 23625
2005-10-04 18:12:13 +00:00
Chris Lattner
4bb574585f
Fix case of path
...
llvm-svn: 23605
2005-10-03 03:32:39 +00:00
Chris Lattner
3a47224042
This member can be const too
...
llvm-svn: 23600
2005-10-03 00:21:25 +00:00
Chris Lattner
b19d4e5584
Expose the actual valuetype of each register class
...
llvm-svn: 23583
2005-10-02 06:23:19 +00:00
Chris Lattner
9c069d09a5
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.
llvm-svn: 23576
2005-10-01 00:19:21 +00:00
Chris Lattner
2a439615b7
add a method
...
llvm-svn: 23575
2005-10-01 00:17:07 +00:00
Jim Laskey
7dcadb97aa
Reverting change moving to selection dag graph.
...
llvm-svn: 23568
2005-09-30 19:33:41 +00:00
Jim Laskey
1c928ba21a
Added allnodes_size for scheduling support.
...
llvm-svn: 23567
2005-09-30 19:27:01 +00:00
Jim Laskey
35efa80550
Add the node name (thus the address) to node label.
...
llvm-svn: 23565
2005-09-30 19:11:53 +00:00
Chris Lattner
c744d9398f
Rename MRegisterDesc -> TargetRegisterDesc for consistency
...
llvm-svn: 23564
2005-09-30 17:49:27 +00:00
Chris Lattner
6124aae803
trim down the target info structs now that we have a preferred spill register class for each callee save register
...
llvm-svn: 23560
2005-09-30 17:35:22 +00:00
Chris Lattner
18454e037b
expose a new virtual method
...
llvm-svn: 23555
2005-09-30 07:06:37 +00:00
Chris Lattner
ec85d13393
Change these methods to take RC's
...
llvm-svn: 23535
2005-09-30 01:28:14 +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
62922d5727
Add a new flag for targets where setjmp/longjmp saves/restores the signal mask,
...
and _setjmp/_longjmp should be used instead (for llvm.setjmp/llvm.longjmp).
llvm-svn: 23479
2005-09-27 22:13:36 +00:00
Chris Lattner
dbef366ea5
allow demotion to volatile values
...
llvm-svn: 23472
2005-09-27 19:38:43 +00:00
Chris Lattner
96f29dbdbe
Make this slightly more efficient by pushing actual type information down
...
into the evaluator. This shrinks a release build of instcombine's text
section from 216363 to 215975 bytes (on PPC).
llvm-svn: 23468
2005-09-27 06:38:05 +00:00
Chris Lattner
92616caa1a
Split SimpleConstantVal up into its components, so each Constant subclass gets
...
a different enum value. This allows 'classof' for these to be really simple,
not needing to call getType() anymore.
This speeds up isa/dyncast/etc for constants, and also makes them smaller.
For example, the text section of a release build of InstCombine.cpp shrinks
from 230037 bytes to 216363 bytes, a 6% reduction.
llvm-svn: 23466
2005-09-27 06:08:32 +00:00
Chris Lattner
2a5d66d0e1
add a new function
...
llvm-svn: 23443
2005-09-26 05:26:32 +00:00
Chris Lattner
808a5d8750
Add long-overdue helpers for getting constants with known upper bits
...
llvm-svn: 23426
2005-09-24 22:57:28 +00:00
Chris Lattner
830b7b7f9a
change proto slightly
...
llvm-svn: 23420
2005-09-24 08:23:53 +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
e8cb4e7356
add a new callback
...
llvm-svn: 23373
2005-09-17 01:02:45 +00:00
Chris Lattner
f3471861a6
new method
...
llvm-svn: 23314
2005-09-12 17:03:16 +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
Jim Laskey
1f9c40400c
Add help support for -mcpu and -mattr.
...
llvm-svn: 23222
2005-09-02 19:27:43 +00:00
Chris Lattner
49eef12127
Move a bunch of non-deprecated methods above the "deprecated line"
...
llvm-svn: 23216
2005-09-02 18:16:20 +00:00
Jeff Cohen
930e81f03b
Fix VC++ build errors
...
llvm-svn: 23210
2005-09-02 02:51: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
Jim Laskey
f32ef9a37f
1. Use SubtargetFeatures in llc/lli.
...
2. Propagate feature "string" to all targets.
3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.
llvm-svn: 23192
2005-09-01 21:38:21 +00:00
Jim Laskey
09a731071f
This new class provides support for platform specific "features". The intent
...
is to manage processor specific attributes from the command line. See examples
of use in llc/lli and PowerPCTargetSubtarget.
llvm-svn: 23191
2005-09-01 21:36:18 +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
Nate Begeman
5ad0e12280
Add support for count trailing zeroes, and population count. These are
...
needed for folding constants in the upcoming dag combiner.
llvm-svn: 23163
2005-08-31 00:25:01 +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
31b20389f9
Change the names of member variables per Chris' instructions, and document
...
them more clearly.
llvm-svn: 23118
2005-08-27 19:09:02 +00:00
Reid Spencer
71966308fc
Fix a typo.
...
llvm-svn: 23117
2005-08-27 19:06:05 +00:00
Chris Lattner
e91069c4de
add some forward defs
...
llvm-svn: 23100
2005-08-26 21:06:40 +00:00
Chris Lattner
ac19224b29
spell this right!
...
llvm-svn: 23097
2005-08-26 20:53:44 +00:00
Chris Lattner
98bd9339ce
Add a hook
...
llvm-svn: 23096
2005-08-26 20:53:09 +00:00
Chris Lattner
fd72abe85b
Add a new instruction flag
...
llvm-svn: 23093
2005-08-26 20:31:24 +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
Jim Laskey
a841c4183a
Change unsigned lng to unsigned.
...
llvm-svn: 23077
2005-08-26 09:24:46 +00:00
Jim Laskey
236ef88c39
Added cl::bits option type (bit vectors). See "Collecting options as a set
...
of flags" in the Command Line doc.
llvm-svn: 23067
2005-08-25 23:31:45 +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
Jim Laskey
4878a218a4
Recommended to use std::algorithms instead.
...
llvm-svn: 23046
2005-08-25 16:21:56 +00:00
Jim Laskey
86cc9d4550
Added support for generic linear/binary search.
...
llvm-svn: 23044
2005-08-25 13:32:25 +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
b71b78a79d
rename hasNativeSupportFor* -> is(Operation|Type)Legal.
...
llvm-svn: 23011
2005-08-24 16:34:59 +00:00
Misha Brukman
14a6b6e354
Wrap long lines
...
llvm-svn: 23009
2005-08-24 14:03:07 +00:00
Reid Spencer
124828d796
Remove some tabs.
...
Wrap a line.
llvm-svn: 23008
2005-08-24 10:57:30 +00:00
Reid Spencer
a1470f81ae
For PR616:
...
These patches make threading optional in LLVM. The configuration scripts are now
modified to accept a --disable-threads switch. If this is used, the Mutex class
will be implemented with all functions as no-op. Furthermore, linking against
libpthread will not be done. Finally, the ParallelJIT example needs libpthread
so its makefile was changed to always add -lpthread to the link line.
llvm-svn: 23003
2005-08-24 10:07:20 +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
a6da5575c8
add a method
...
llvm-svn: 22985
2005-08-23 21:45:31 +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
Chris Lattner
6fcfaee2fc
Add a new field to TargetInstrDescriptor for tracking information about
...
operands.
llvm-svn: 22908
2005-08-19 16:56:26 +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
Nate Begeman
a978ae8b7d
Remove the X86 and PowerPC Simple instruction selectors; their time has
...
passed.
llvm-svn: 22886
2005-08-18 23:53:15 +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
Jim Laskey
b45eb1e518
include/llvm/Support/MathExtras.h
...
llvm-svn: 22846
2005-08-17 23:54:12 +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
5f57048c62
Move code dependency for MathExtras.h out of Constants.h.
...
llvm-svn: 22840
2005-08-17 20:06:22 +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
Jim Laskey
f183efcfa2
Added support for converting raw bits to FP, and FP to raw bits. The intent
...
is to avoid the distraction of the union declarations.
llvm-svn: 22830
2005-08-17 17:27:47 +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
1fc1d60d5a
add a helper
...
llvm-svn: 22823
2005-08-17 06:34:37 +00:00