oota-llvm.git
19 years agoFix some typos.
Jeff Cohen [Fri, 11 Nov 2005 02:15:27 +0000 (02:15 +0000)]
Fix some typos.

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

19 years agoAdd new file to Visual Studio.
Jeff Cohen [Fri, 11 Nov 2005 01:34:02 +0000 (01:34 +0000)]
Add new file to Visual Studio.

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

19 years agoFix the optimized code handling of user asm strings
Chris Lattner [Thu, 10 Nov 2005 23:24:26 +0000 (23:24 +0000)]
Fix the optimized code handling of user asm strings

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

19 years agoMake BB and CPI labels use the function number, not the function name as a
Chris Lattner [Thu, 10 Nov 2005 21:59:25 +0000 (21:59 +0000)]
Make BB and CPI labels use the function number, not the function name as a
uniquing id.  This makes things happy when the function name is quoted,
preventing labels like LBB"foo"_2.

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

19 years agospeedup the common case where nothing needs to be quoted
Chris Lattner [Thu, 10 Nov 2005 21:47:01 +0000 (21:47 +0000)]
speedup the common case where nothing needs to be quoted

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

19 years agoAllow per-character control over what target assemblers allow in symbol
Chris Lattner [Thu, 10 Nov 2005 21:40:01 +0000 (21:40 +0000)]
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.

Also, this includes some minor speedups

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

19 years agodo not allow '.' in symbol names
Chris Lattner [Thu, 10 Nov 2005 21:39:29 +0000 (21:39 +0000)]
do not allow '.' in symbol names

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

19 years agoAllow per-character control over what target assemblers allow in symbol
Chris Lattner [Thu, 10 Nov 2005 21:39:12 +0000 (21:39 +0000)]
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.

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

19 years agothe pain isn't gone unless the phinodes are spilled too
Andrew Lenharth [Thu, 10 Nov 2005 19:39:09 +0000 (19:39 +0000)]
the pain isn't gone unless the phinodes are spilled too

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

19 years agoDarwin supports quoted labels. This implements:
Chris Lattner [Thu, 10 Nov 2005 19:33:43 +0000 (19:33 +0000)]
Darwin supports quoted labels.  This implements:
test/Regression/CodeGen/PowerPC/darwin-labels.ll

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

19 years agoCheck that this compiles to a label with a space in it.
Chris Lattner [Thu, 10 Nov 2005 19:33:04 +0000 (19:33 +0000)]
Check that this compiles to a label with a space in it.

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

19 years agoAdd a new option for targets that accept quoted labels.
Chris Lattner [Thu, 10 Nov 2005 19:30:07 +0000 (19:30 +0000)]
Add a new option for targets that accept quoted labels.

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

19 years agoRemove M, which is dead. Eliminate a dead typedef. Add comments.
Chris Lattner [Thu, 10 Nov 2005 19:02:52 +0000 (19:02 +0000)]
Remove M, which is dead.  Eliminate a dead typedef.  Add comments.

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

19 years agoremove the M instance var
Chris Lattner [Thu, 10 Nov 2005 19:02:18 +0000 (19:02 +0000)]
remove the M instance var

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

19 years agoThis method is no longer static
Chris Lattner [Thu, 10 Nov 2005 18:55:09 +0000 (18:55 +0000)]
This method is no longer static

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

19 years agoCall this method with the object we have
Chris Lattner [Thu, 10 Nov 2005 18:53:25 +0000 (18:53 +0000)]
Call this method with the object we have

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

19 years agonuke blank line
Chris Lattner [Thu, 10 Nov 2005 18:49:46 +0000 (18:49 +0000)]
nuke blank line

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

19 years agoMake this more efficient of the common case where we are only mangling globals.
Chris Lattner [Thu, 10 Nov 2005 18:48:58 +0000 (18:48 +0000)]
Make this more efficient of the common case where we are only mangling globals.
Do not mangle internal global names that do not collide with anything.

This gives us strings that now look like this:

__2E_str_1:                             ; '.str_1'
        .asciz  "foo"

instead of this:

l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"

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

19 years agominor interface changes.
Chris Lattner [Thu, 10 Nov 2005 18:46:57 +0000 (18:46 +0000)]
minor interface changes.

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

19 years agoGet rid of casts by #including the right header
Chris Lattner [Thu, 10 Nov 2005 18:36:17 +0000 (18:36 +0000)]
Get rid of casts by #including the right header

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

19 years agoMake the aix asm printer interface properly with the parent class
Chris Lattner [Thu, 10 Nov 2005 18:20:29 +0000 (18:20 +0000)]
Make the aix asm printer interface properly with the parent class

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

19 years agoCompile C strings to:
Chris Lattner [Thu, 10 Nov 2005 18:09:27 +0000 (18:09 +0000)]
Compile C strings to:

l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"

not:

        .align  0
l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"

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

19 years agoadd support for .asciz, and enable it by default. If your target assemblerdoesn...
Chris Lattner [Thu, 10 Nov 2005 18:06:33 +0000 (18:06 +0000)]
add support for .asciz, and enable it by default.  If your target assemblerdoesn'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"

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

19 years agoadd support for .asciz, and enable it by default. If your target assembler
Chris Lattner [Thu, 10 Nov 2005 18:05:57 +0000 (18:05 +0000)]
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"

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

19 years agothis works with backedges to the existing entry block alot better
Andrew Lenharth [Thu, 10 Nov 2005 17:35:34 +0000 (17:35 +0000)]
this works with backedges to the existing entry block alot better

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

19 years agofix a bunch of regressions
Andrew Lenharth [Thu, 10 Nov 2005 16:59:55 +0000 (16:59 +0000)]
fix a bunch of regressions

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

19 years agoneeds to go here to apparently.
Andrew Lenharth [Thu, 10 Nov 2005 02:07:45 +0000 (02:07 +0000)]
needs to go here to apparently.

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

19 years agoThe pass everyone has been waiting for!
Andrew Lenharth [Thu, 10 Nov 2005 01:58:38 +0000 (01:58 +0000)]
The pass everyone has been waiting for!
Reg2Mem

for fun you can opt -reg2mem -mem2reg

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

19 years agoPacked elements must be a power of two in size
Chris Lattner [Thu, 10 Nov 2005 01:44:22 +0000 (01:44 +0000)]
Packed elements must be a power of two in size

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

19 years agoForce vectors to be a power of two in size
Chris Lattner [Thu, 10 Nov 2005 01:42:43 +0000 (01:42 +0000)]
Force vectors to be a power of two in size

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

19 years agoForce packed vectors to be a power of two in length.
Chris Lattner [Thu, 10 Nov 2005 01:40:59 +0000 (01:40 +0000)]
Force packed vectors to be a power of two in length.

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

19 years agoSwitch the allnodes list from a vector of pointers to an ilist of nodes.This eliminat...
Chris Lattner [Wed, 9 Nov 2005 23:47:37 +0000 (23:47 +0000)]
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 froma graph, and makes iteration over the all nodes list stable when adding
nodes to the graph.

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

19 years agoSwitch the allnodes list from a vector of pointers to an ilist of nodes.
Chris Lattner [Wed, 9 Nov 2005 23:46:43 +0000 (23:46 +0000)]
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.

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

19 years agoRefactor intrinsic lowering stuff out of visitCall
Chris Lattner [Wed, 9 Nov 2005 19:44:01 +0000 (19:44 +0000)]
Refactor intrinsic lowering stuff out of visitCall

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

19 years agowhatever. Intermediate patch to see what breaks. Seems ok.
Andrew Lenharth [Wed, 9 Nov 2005 19:17:08 +0000 (19:17 +0000)]
whatever.  Intermediate patch to see what breaks.  Seems ok.

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

19 years agoHandle the trivial (but common) two-op case more efficiently
Chris Lattner [Wed, 9 Nov 2005 18:48:57 +0000 (18:48 +0000)]
Handle the trivial (but common) two-op case more efficiently

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

19 years agoNuke noop copies.
Chris Lattner [Wed, 9 Nov 2005 18:22:42 +0000 (18:22 +0000)]
Nuke noop copies.

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

19 years agoFix CodeGen/X86/shift-folding.ll:test3 on X86
Chris Lattner [Wed, 9 Nov 2005 16:50:40 +0000 (16:50 +0000)]
Fix CodeGen/X86/shift-folding.ll:test3 on X86

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

19 years agoDisable some overly-aggressive checking code. This speeds up the local
Chris Lattner [Wed, 9 Nov 2005 05:28:45 +0000 (05:28 +0000)]
Disable some overly-aggressive checking code.  This speeds up the local
allocator from 23s to 11s on kc++ in debug mode.

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

19 years agoAvoid creating a token factor node in trivially redundant cases. This
Chris Lattner [Wed, 9 Nov 2005 05:03:03 +0000 (05:03 +0000)]
Avoid creating a token factor node in trivially redundant cases.  This
eliminates almost one node per block in common cases.

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

19 years agoHandle GEP's a bit more intelligently. Fold constant indices early and
Chris Lattner [Wed, 9 Nov 2005 04:45:33 +0000 (04:45 +0000)]
Handle GEP's a bit more intelligently.  Fold constant indices early and
turn power-of-two multiplies into shifts early to improve compile time.

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

19 years agoAllocate the right amount of memory for this vector up front.
Chris Lattner [Tue, 8 Nov 2005 23:32:44 +0000 (23:32 +0000)]
Allocate the right amount of memory for this vector up front.

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

19 years agoChange the ValueList array for each node to be shared instead of individuallyallocate...
Chris Lattner [Tue, 8 Nov 2005 23:30:28 +0000 (23:30 +0000)]
Change the ValueList array for each node to be shared instead of individuallyallocated.  Further, in the common case where a node has a single value, justreference an element from a small array.  This is a small compile-time win.

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

19 years agoChange the ValueList array for each node to be shared instead of individually
Chris Lattner [Tue, 8 Nov 2005 23:30:11 +0000 (23:30 +0000)]
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.

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

19 years agoSwitch the operandlist/valuelist from being vectors to being just an array.This saves...
Chris Lattner [Tue, 8 Nov 2005 22:07:03 +0000 (22:07 +0000)]
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.

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

19 years agoSwitch the operandlist/valuelist from being vectors to being just an array.
Chris Lattner [Tue, 8 Nov 2005 22:06:23 +0000 (22:06 +0000)]
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.

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

19 years agoExplicitly initialize some instance vars
Chris Lattner [Tue, 8 Nov 2005 21:54:57 +0000 (21:54 +0000)]
Explicitly initialize some instance vars

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

19 years agoRip out 1.6ness, bump version # to 1.7cvs
Chris Lattner [Tue, 8 Nov 2005 21:29:17 +0000 (21:29 +0000)]
Rip out 1.6ness, bump version # to 1.7cvs

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

19 years agoUpdated version to 1.7cvs.
John Criswell [Tue, 8 Nov 2005 21:13:01 +0000 (21:13 +0000)]
Updated version to 1.7cvs.

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

19 years agoMerged from RELEASE_16.
John Criswell [Tue, 8 Nov 2005 21:11:33 +0000 (21:11 +0000)]
Merged from RELEASE_16.

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

19 years agoadjust itf
Chris Lattner [Tue, 8 Nov 2005 18:52:57 +0000 (18:52 +0000)]
adjust itf

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

19 years agoClean up RemoveDeadNodes significantly, by eliminating the need for a temporary
Chris Lattner [Tue, 8 Nov 2005 18:52:27 +0000 (18:52 +0000)]
Clean up RemoveDeadNodes significantly, by eliminating the need for a temporary
set and eliminating the need to iterate whenever something is removed (which
can be really slow in some cases).  Thx to Jim for pointing out something silly
I was getting stuck on. :)

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

19 years agoAdd a new option to indicate we want the code generator to emit code quickly,
Chris Lattner [Tue, 8 Nov 2005 02:12:47 +0000 (02:12 +0000)]
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.

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

19 years agoAdd a new -fast option, which generates code quickly.
Chris Lattner [Tue, 8 Nov 2005 02:12:17 +0000 (02:12 +0000)]
Add a new -fast option, which generates code quickly.

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

19 years agoAdd a new option to indicate we want the code generator to emit code quickly,not...
Chris Lattner [Tue, 8 Nov 2005 02:11:51 +0000 (02:11 +0000)]
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 -O0style of build.

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

19 years agoLet's try ignoring resource utilization on the backward pass.
Jim Laskey [Mon, 7 Nov 2005 19:08:53 +0000 (19:08 +0000)]
Let's try ignoring resource utilization on the backward pass.

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

19 years agoadd support for storing and returning bools
Duraid Madina [Mon, 7 Nov 2005 03:11:02 +0000 (03:11 +0000)]
add support for storing and returning bools

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

19 years agoAlways compute max align.
Chris Lattner [Sun, 6 Nov 2005 17:43:20 +0000 (17:43 +0000)]
Always compute max align.

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

19 years agoChange a comment slightly
Chris Lattner [Sun, 6 Nov 2005 17:40:18 +0000 (17:40 +0000)]
Change a comment slightly

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

19 years agojust some random hacking - calls (particularly indirect) need a lot of
Duraid Madina [Sun, 6 Nov 2005 13:43:30 +0000 (13:43 +0000)]
just some random hacking - calls (particularly indirect) need a lot of
love (especially with -sched=simple)

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

19 years agoAdd the necessary support to the ISel to allow targets to codegen the new
Nate Begeman [Sun, 6 Nov 2005 09:00:38 +0000 (09:00 +0000)]
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.

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

19 years agominor clarity changes, no functionality difference.
Chris Lattner [Sun, 6 Nov 2005 08:23:17 +0000 (08:23 +0000)]
minor clarity changes, no functionality difference.

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

19 years agoMake sure to initialize the alignment field
Chris Lattner [Sun, 6 Nov 2005 08:22:18 +0000 (08:22 +0000)]
Make sure to initialize the alignment field

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

19 years agodocument alignment on globals, functions, and allocation instructions.
Chris Lattner [Sun, 6 Nov 2005 08:02:57 +0000 (08:02 +0000)]
document alignment on globals, functions, and allocation instructions.

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

19 years agoMinor correction
Chris Lattner [Sun, 6 Nov 2005 07:48:11 +0000 (07:48 +0000)]
Minor correction

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

19 years agodon't misencode CC#'s
Chris Lattner [Sun, 6 Nov 2005 07:46:13 +0000 (07:46 +0000)]
don't misencode CC#'s

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

19 years agoencode/decode function alignment in bc files
Chris Lattner [Sun, 6 Nov 2005 07:43:39 +0000 (07:43 +0000)]
encode/decode function alignment in bc files

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

19 years agodescribe extensions to the .bc format for function/global alignment
Chris Lattner [Sun, 6 Nov 2005 07:20:25 +0000 (07:20 +0000)]
describe extensions to the .bc format for function/global alignment

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

19 years agoRead/write global variable alignments if present
Chris Lattner [Sun, 6 Nov 2005 07:11:04 +0000 (07:11 +0000)]
Read/write global variable alignments if present

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

19 years agoadd alignment info for globals and functions
Chris Lattner [Sun, 6 Nov 2005 06:52:11 +0000 (06:52 +0000)]
add alignment info for globals and functions

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

19 years agoprint alignment info for globals and functions
Chris Lattner [Sun, 6 Nov 2005 06:48:53 +0000 (06:48 +0000)]
print alignment info for globals and functions

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

19 years agoregenerate
Chris Lattner [Sun, 6 Nov 2005 06:46:53 +0000 (06:46 +0000)]
regenerate

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

19 years agoAllow globals to have an alignment specified. Switch to using isPowerOf2_32
Chris Lattner [Sun, 6 Nov 2005 06:46:28 +0000 (06:46 +0000)]
Allow globals to have an alignment specified.  Switch to using isPowerOf2_32
at Jim's request for the checking code.

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

19 years agoallow functions and modules to have an explicit alignment
Chris Lattner [Sun, 6 Nov 2005 06:44:42 +0000 (06:44 +0000)]
allow functions and modules to have an explicit alignment

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

19 years agoregenerate
Chris Lattner [Sun, 6 Nov 2005 06:34:34 +0000 (06:34 +0000)]
regenerate

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

19 years agofactor optional alignment
Chris Lattner [Sun, 6 Nov 2005 06:34:12 +0000 (06:34 +0000)]
factor optional alignment

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

19 years agoask for 16-byte aligned jmpbufs. This should unbreak C++ on IA64 (and
Duraid Madina [Sun, 6 Nov 2005 04:29:30 +0000 (04:29 +0000)]
ask for 16-byte aligned jmpbufs. This should unbreak C++ on IA64 (and
a bunch of other things) but is currently ignored by the code
generator.

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

19 years agoenumerate non-standard argument encoding cases, such as alignment info for
Chris Lattner [Sat, 5 Nov 2005 22:32:06 +0000 (22:32 +0000)]
enumerate non-standard argument encoding cases, such as alignment info for
allocations

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

19 years agorearrange some info about the instruction encoding
Chris Lattner [Sat, 5 Nov 2005 22:20:06 +0000 (22:20 +0000)]
rearrange some info about the instruction encoding

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

19 years agoWrite/read allocation instruction alignment info to .bc files.
Chris Lattner [Sat, 5 Nov 2005 22:08:14 +0000 (22:08 +0000)]
Write/read allocation instruction alignment info to .bc files.

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

19 years agonew testcase
Chris Lattner [Sat, 5 Nov 2005 22:07:30 +0000 (22:07 +0000)]
new testcase

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

19 years agoadd an accessor
Chris Lattner [Sat, 5 Nov 2005 21:58:30 +0000 (21:58 +0000)]
add an accessor

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

19 years agoverify that alignments are always a power of 2
Chris Lattner [Sat, 5 Nov 2005 21:57:54 +0000 (21:57 +0000)]
verify that alignments are always a power of 2

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

19 years agoregenerate
Chris Lattner [Sat, 5 Nov 2005 21:54:23 +0000 (21:54 +0000)]
regenerate

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

19 years agoVerify that alignment amounts are a power of 2
Chris Lattner [Sat, 5 Nov 2005 21:54:03 +0000 (21:54 +0000)]
Verify that alignment amounts are a power of 2

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

19 years agofix printing the alignment directive
Chris Lattner [Sat, 5 Nov 2005 21:20:34 +0000 (21:20 +0000)]
fix printing the alignment directive

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

19 years agoAdd support alignment of allocation instructions.
Nate Begeman [Sat, 5 Nov 2005 09:21:28 +0000 (09:21 +0000)]
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.

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

19 years agoadd a case Nate sent me
Chris Lattner [Sat, 5 Nov 2005 08:57:56 +0000 (08:57 +0000)]
add a case Nate sent me

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

19 years agoImplement Transforms/TailCallElim/return-undef.ll, a trivial case
Chris Lattner [Sat, 5 Nov 2005 08:21:11 +0000 (08:21 +0000)]
Implement Transforms/TailCallElim/return-undef.ll, a trivial case
that has been sitting in my inbox since May 18. :)

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

19 years agoNew testcase
Chris Lattner [Sat, 5 Nov 2005 08:20:28 +0000 (08:20 +0000)]
New testcase

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

19 years agoTurn sdiv into udiv if both operands have a clear sign bit. This occurs
Chris Lattner [Sat, 5 Nov 2005 07:40:31 +0000 (07:40 +0000)]
Turn sdiv into udiv if both operands have a clear sign bit.  This occurs
a few times in crafty:

OLD:    %tmp.36 = div int %tmp.35, 8            ; <int> [#uses=1]
NEW:    %tmp.36 = div uint %tmp.35, 8           ; <uint> [#uses=0]
OLD:    %tmp.19 = div int %tmp.18, 8            ; <int> [#uses=1]
NEW:    %tmp.19 = div uint %tmp.18, 8           ; <uint> [#uses=0]
OLD:    %tmp.117 = div int %tmp.116, 8          ; <int> [#uses=1]
NEW:    %tmp.117 = div uint %tmp.116, 8         ; <uint> [#uses=0]
OLD:    %tmp.92 = div int %tmp.91, 8            ; <int> [#uses=1]
NEW:    %tmp.92 = div uint %tmp.91, 8           ; <uint> [#uses=0]

Which all turn into shrs.

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

19 years agoTurn srem -> urem when neither input has their sign bit set. This triggers
Chris Lattner [Sat, 5 Nov 2005 07:28:37 +0000 (07:28 +0000)]
Turn srem -> urem when neither input has their sign bit set.  This triggers
8 times in vortex, allowing the srems to be turned into shrs:

OLD:    %tmp.104 = rem int %tmp.5.i37, 16               ; <int> [#uses=1]
NEW:    %tmp.104 = rem uint %tmp.5.i37, 16              ; <uint> [#uses=0]
OLD:    %tmp.98 = rem int %tmp.5.i24, 16                ; <int> [#uses=1]
NEW:    %tmp.98 = rem uint %tmp.5.i24, 16               ; <uint> [#uses=0]
OLD:    %tmp.91 = rem int %tmp.5.i19, 8         ; <int> [#uses=1]
NEW:    %tmp.91 = rem uint %tmp.5.i19, 8                ; <uint> [#uses=0]
OLD:    %tmp.88 = rem int %tmp.5.i14, 8         ; <int> [#uses=1]
NEW:    %tmp.88 = rem uint %tmp.5.i14, 8                ; <uint> [#uses=0]
OLD:    %tmp.85 = rem int %tmp.5.i9, 1024               ; <int> [#uses=2]
NEW:    %tmp.85 = rem uint %tmp.5.i9, 1024              ; <uint> [#uses=0]
OLD:    %tmp.82 = rem int %tmp.5.i, 512         ; <int> [#uses=2]
NEW:    %tmp.82 = rem uint %tmp.5.i1, 512               ; <uint> [#uses=0]
OLD:    %tmp.48.i = rem int %tmp.5.i.i161, 4            ; <int> [#uses=1]
NEW:    %tmp.48.i = rem uint %tmp.5.i.i161, 4           ; <uint> [#uses=0]
OLD:    %tmp.20.i2 = rem int %tmp.5.i.i, 4              ; <int> [#uses=1]
NEW:    %tmp.20.i2 = rem uint %tmp.5.i.i, 4             ; <uint> [#uses=0]

it also occurs 9 times in gcc, but with odd constant divisors (1009 and 61)
so the payoff isn't as great.

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

19 years agoFix logic bug in finding retry slot in tally.
Jim Laskey [Sat, 5 Nov 2005 00:01:25 +0000 (00:01 +0000)]
Fix logic bug in finding retry slot in tally.

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

19 years agoFix a warning
Jim Laskey [Fri, 4 Nov 2005 18:26:02 +0000 (18:26 +0000)]
Fix a warning

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

19 years agooops, forgot to load GP for indirect calls, though the old code now commented
Duraid Madina [Fri, 4 Nov 2005 17:55:53 +0000 (17:55 +0000)]
oops, forgot to load GP for indirect calls, though the old code now commented
out failed (e.g. methcall) - now the code compiles, though it's not quite
right just yet (tm) ;)

would fix this but it's 3am! :O

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

19 years agokill redundant SP/GP/RP save/restores across calls
Duraid Madina [Fri, 4 Nov 2005 10:01:10 +0000 (10:01 +0000)]
kill redundant SP/GP/RP save/restores across calls

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

19 years agoadd support for loading bools
Duraid Madina [Fri, 4 Nov 2005 09:59:06 +0000 (09:59 +0000)]
add support for loading bools

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

19 years agoScheduling now uses itinerary data.
Jim Laskey [Fri, 4 Nov 2005 04:05:35 +0000 (04:05 +0000)]
Scheduling now uses itinerary data.

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

19 years ago<cassert> no longer required to make VC++ happy.
Jeff Cohen [Fri, 4 Nov 2005 02:59:16 +0000 (02:59 +0000)]
<cassert> no longer required to make VC++ happy.

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

19 years agochange NULL to 0, unbreaks the ppc target when building on ia64
Duraid Madina [Fri, 4 Nov 2005 01:45:04 +0000 (01:45 +0000)]
change NULL to 0, unbreaks the ppc target when building on ia64

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