Commit Graph

21041 Commits

Author SHA1 Message Date
Chris Lattner
b8c5ec0869 This method is no longer static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24280 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:55:09 +00:00
Chris Lattner
36c975c023 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
2005-11-10 18:53:25 +00:00
Chris Lattner
ed0c4ecf05 nuke blank line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24278 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:49:46 +00:00
Chris Lattner
9ddf21276e 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
2005-11-10 18:48:58 +00:00
Chris Lattner
a112e0f447 minor interface changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24276 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 18:46:57 +00:00
Chris Lattner
450de393ac 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
2005-11-10 18:36:17 +00:00
Chris Lattner
3459bfbc39 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
2005-11-10 18:20:29 +00:00
Chris Lattner
2a21c6e861 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
2005-11-10 18:09:27 +00:00
Chris Lattner
2980cefb80 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
2005-11-10 18:06:33 +00:00
Chris Lattner
38b6d78112 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
2005-11-10 18:05:57 +00:00
Andrew Lenharth
99b8e26b84 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
2005-11-10 17:35:34 +00:00
Andrew Lenharth
7b441dc966 fix a bunch of regressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24269 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 16:59:55 +00:00
Andrew Lenharth
105b2f5374 needs to go here to apparently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24268 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-10 02:07:45 +00:00
Andrew Lenharth
183119cdf6 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
2005-11-10 01:58:38 +00:00
Chris Lattner
b8d172f800 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
2005-11-10 01:44:22 +00:00
Chris Lattner
9547d7fe33 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
2005-11-10 01:42:43 +00:00
Chris Lattner
d115ef8973 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
2005-11-10 01:40:59 +00:00
Chris Lattner
de202b3cda 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
2005-11-09 23:47:37 +00:00
Chris Lattner
b80e2be889 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
2005-11-09 23:46:43 +00:00
Chris Lattner
c9ea6fde30 Refactor intrinsic lowering stuff out of visitCall
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24261 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 19:44:01 +00:00
Andrew Lenharth
5cefc5e64d 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
2005-11-09 19:17:08 +00:00
Chris Lattner
040c11c24e 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
2005-11-09 18:48:57 +00:00
Chris Lattner
e6a88ac1b9 Nuke noop copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24258 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-09 18:22:42 +00:00
Chris Lattner
6b2d69655a 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
2005-11-09 16:50:40 +00:00
Chris Lattner
9a5ef20f5e 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
2005-11-09 05:28:45 +00:00
Chris Lattner
7436b57de3 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
2005-11-09 05:03:03 +00:00
Chris Lattner
7c0104b525 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
2005-11-09 04:45:33 +00:00
Chris Lattner
0d902a9c74 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
2005-11-08 23:32:44 +00:00
Chris Lattner
a32551197a 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
2005-11-08 23:30:28 +00:00
Chris Lattner
109654fae9 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
2005-11-08 23:30:11 +00:00
Chris Lattner
65113b2f86 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
2005-11-08 22:07:03 +00:00
Chris Lattner
f71e843f65 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
2005-11-08 22:06:23 +00:00
Chris Lattner
4012eb2137 Explicitly initialize some instance vars
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24247 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 21:54:57 +00:00
Chris Lattner
c30c5c7001 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
2005-11-08 21:29:17 +00:00
John Criswell
e250389ebc Updated version to 1.7cvs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24244 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 21:13:01 +00:00
John Criswell
c0c186d140 Merged from RELEASE_16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24243 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 21:11:33 +00:00
Chris Lattner
f0e80cf909 adjust itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24242 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 18:52:57 +00:00
Chris Lattner
f469cb6546 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
2005-11-08 18:52:27 +00:00
Chris Lattner
df2e425f2a 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
2005-11-08 02:12:47 +00:00
Chris Lattner
178e0c41ce 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
2005-11-08 02:12:17 +00:00
Chris Lattner
ce8eb0c16b 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
2005-11-08 02:11:51 +00:00
Jim Laskey
26b91ebb63 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
2005-11-07 19:08:53 +00:00
Duraid Madina
d525df3c27 add support for storing and returning bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24228 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-07 03:11:02 +00:00
Chris Lattner
cbef8ba5f9 Always compute max align.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24227 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 17:43:20 +00:00
Chris Lattner
cb982916f7 Change a comment slightly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24226 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 17:40:18 +00:00
Duraid Madina
00873ebc1f 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
2005-11-06 13:43:30 +00:00
Nate Begeman
ae232e7a10 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
2005-11-06 09:00:38 +00:00
Chris Lattner
ce5e04e710 minor clarity changes, no functionality difference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24223 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 08:23:17 +00:00
Chris Lattner
3aef571287 Make sure to initialize the alignment field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24222 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-06 08:22:18 +00:00
Chris Lattner
2cbdc45f35 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
2005-11-06 08:02:57 +00:00