Commit Graph

21019 Commits

Author SHA1 Message Date
Andrew Lenharth 5b3b9d7052 Fix a bunch more alpha regressions
llvm-svn: 24304
2005-11-11 19:52:25 +00:00
Andrew Lenharth 5278ca3fa2 prevent cse of readcyclecounter
llvm-svn: 24303
2005-11-11 19:02:54 +00:00
Andrew Lenharth 01aa56397d continued readcyclecounter support
llvm-svn: 24300
2005-11-11 16:47:30 +00:00
Andrew Lenharth bd0127e467 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
Jeff Cohen dc6bfeae26 Fix some typos.
llvm-svn: 24298
2005-11-11 02:15:27 +00:00
Jeff Cohen 6579d1dabb Add new file to Visual Studio.
llvm-svn: 24297
2005-11-11 01:34:02 +00:00
Chris Lattner ecc301df17 Fix the optimized code handling of user asm strings
llvm-svn: 24296
2005-11-10 23:24:26 +00:00
Chris Lattner fafff9ba1d 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.

llvm-svn: 24295
2005-11-10 21:59:25 +00:00
Chris Lattner 86164e6e9e speedup the common case where nothing needs to be quoted
llvm-svn: 24294
2005-11-10 21:47:01 +00:00
Chris Lattner e1d34bac0b 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

llvm-svn: 24293
2005-11-10 21:40:01 +00:00
Chris Lattner 4b3b9192b2 do not allow '.' in symbol names
llvm-svn: 24292
2005-11-10 21:39:29 +00:00
Chris Lattner fe99e2de95 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
Andrew Lenharth d9c13b1336 the pain isn't gone unless the phinodes are spilled too
llvm-svn: 24288
2005-11-10 19:39:09 +00:00
Chris Lattner 9eb7dfa15a Darwin supports quoted labels. This implements:
test/Regression/CodeGen/PowerPC/darwin-labels.ll

llvm-svn: 24287
2005-11-10 19:33:43 +00:00
Chris Lattner b8e8cbec50 Check that this compiles to a label with a space in it.
llvm-svn: 24284
2005-11-10 19:33:04 +00:00
Chris Lattner 4b155fa5c3 Add a new option for targets that accept quoted labels.
llvm-svn: 24283
2005-11-10 19:30:07 +00:00
Chris Lattner 98d58eab21 Remove M, which is dead. Eliminate a dead typedef. Add comments.
llvm-svn: 24282
2005-11-10 19:02:52 +00:00
Chris Lattner 9fa3bcc8b4 remove the M instance var
llvm-svn: 24281
2005-11-10 19:02:18 +00:00
Chris Lattner 2d29be21d1 This method is no longer static
llvm-svn: 24280
2005-11-10 18:55:09 +00:00
Chris Lattner 369b61f068 Call this method with the object we have
llvm-svn: 24279
2005-11-10 18:53:25 +00:00
Chris Lattner 4f827446da nuke blank line
llvm-svn: 24278
2005-11-10 18:49:46 +00:00
Chris Lattner 12b0831295 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"

llvm-svn: 24277
2005-11-10 18:48:58 +00:00
Chris Lattner 144650c3c1 minor interface changes.
llvm-svn: 24276
2005-11-10 18:46:57 +00:00
Chris Lattner c0a1eba0ab Get rid of casts by #including the right header
llvm-svn: 24275
2005-11-10 18:36:17 +00:00
Chris Lattner 59e44ff3d3 Make the aix asm printer interface properly with the parent class
llvm-svn: 24274
2005-11-10 18:20:29 +00:00
Chris Lattner 747960d21e Compile C strings to:
l1__2E_str_1:                           ; '.str_1'
        .asciz  "foo"

not:

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

llvm-svn: 24273
2005-11-10 18:09:27 +00:00
Chris Lattner 55a6d9067b 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"

llvm-svn: 24272
2005-11-10 18:06:33 +00:00
Chris Lattner e039210a5b 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 8e66c0c8a9 this works with backedges to the existing entry block alot better
llvm-svn: 24270
2005-11-10 17:35:34 +00:00
Andrew Lenharth e373163e95 fix a bunch of regressions
llvm-svn: 24269
2005-11-10 16:59:55 +00:00
Andrew Lenharth 3d3de4e6c3 needs to go here to apparently.
llvm-svn: 24268
2005-11-10 02:07:45 +00:00
Andrew Lenharth 4130a4f061 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 330ce692a2 Packed elements must be a power of two in size
llvm-svn: 24266
2005-11-10 01:44:22 +00:00
Chris Lattner 625b9c8765 Force vectors to be a power of two in size
llvm-svn: 24265
2005-11-10 01:42:43 +00:00
Chris Lattner d7dbb856b9 Force packed vectors to be a power of two in length.
llvm-svn: 24264
2005-11-10 01:40:59 +00:00
Chris Lattner bf4f233214 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.

llvm-svn: 24263
2005-11-09 23:47:37 +00:00
Chris Lattner 46b1976a18 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 cd6f0f47f2 Refactor intrinsic lowering stuff out of visitCall
llvm-svn: 24261
2005-11-09 19:44:01 +00:00
Andrew Lenharth 97a7fcfd2b whatever. Intermediate patch to see what breaks. Seems ok.
llvm-svn: 24260
2005-11-09 19:17:08 +00:00
Chris Lattner af3aefa10e Handle the trivial (but common) two-op case more efficiently
llvm-svn: 24259
2005-11-09 18:48:57 +00:00
Chris Lattner 619dfaa42b Nuke noop copies.
llvm-svn: 24258
2005-11-09 18:22:42 +00:00
Chris Lattner 41fd6d5d27 Fix CodeGen/X86/shift-folding.ll:test3 on X86
llvm-svn: 24256
2005-11-09 16:50:40 +00:00
Chris Lattner 35ecaa76fa Disable some overly-aggressive checking code. This speeds up the local
allocator from 23s to 11s on kc++ in debug mode.

llvm-svn: 24255
2005-11-09 05:28:45 +00:00
Chris Lattner b7cad90e55 Avoid creating a token factor node in trivially redundant cases. This
eliminates almost one node per block in common cases.

llvm-svn: 24254
2005-11-09 05:03:03 +00:00
Chris Lattner 43535a19b1 Handle GEP's a bit more intelligently. Fold constant indices early and
turn power-of-two multiplies into shifts early to improve compile time.

llvm-svn: 24253
2005-11-09 04:45:33 +00:00
Chris Lattner c4d6050db6 Allocate the right amount of memory for this vector up front.
llvm-svn: 24252
2005-11-08 23:32:44 +00:00
Chris Lattner 88fa11c3d5 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.
llvm-svn: 24251
2005-11-08 23:30:28 +00:00
Chris Lattner 90f017c114 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 7e4b5d33cb 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: 24249
2005-11-08 22:07:03 +00:00
Chris Lattner e406e481d3 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 3ba38cba64 Explicitly initialize some instance vars
llvm-svn: 24247
2005-11-08 21:54:57 +00:00
Chris Lattner 578ab91f2b Rip out 1.6ness, bump version # to 1.7cvs
llvm-svn: 24246
2005-11-08 21:29:17 +00:00
John Criswell e1d319ab69 Updated version to 1.7cvs.
llvm-svn: 24244
2005-11-08 21:13:01 +00:00
John Criswell 3bdbd3024b Merged from RELEASE_16.
llvm-svn: 24243
2005-11-08 21:11:33 +00:00
Chris Lattner ba1b2ed1e9 adjust itf
llvm-svn: 24242
2005-11-08 18:52:57 +00:00
Chris Lattner aba48dd34c 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. :)

llvm-svn: 24241
2005-11-08 18:52:27 +00:00
Chris Lattner 88e234dd49 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 731055e370 Add a new -fast option, which generates code quickly.
llvm-svn: 24234
2005-11-08 02:12:17 +00:00
Chris Lattner b28f214033 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.
llvm-svn: 24233
2005-11-08 02:11:51 +00:00
Jim Laskey 1d2f26adcc Let's try ignoring resource utilization on the backward pass.
llvm-svn: 24231
2005-11-07 19:08:53 +00:00
Duraid Madina 3c1c8c55c3 add support for storing and returning bools
llvm-svn: 24228
2005-11-07 03:11:02 +00:00
Chris Lattner 629ba44e50 Always compute max align.
llvm-svn: 24227
2005-11-06 17:43:20 +00:00
Chris Lattner d082803948 Change a comment slightly
llvm-svn: 24226
2005-11-06 17:40:18 +00:00
Duraid Madina 4a30d4a460 just some random hacking - calls (particularly indirect) need a lot of
love (especially with -sched=simple)

llvm-svn: 24225
2005-11-06 13:43:30 +00:00
Nate Begeman 3ee3e69556 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 c5455bcbd2 minor clarity changes, no functionality difference.
llvm-svn: 24223
2005-11-06 08:23:17 +00:00
Chris Lattner d5286ba3d5 Make sure to initialize the alignment field
llvm-svn: 24222
2005-11-06 08:22:18 +00:00
Chris Lattner 54611b4af1 document alignment on globals, functions, and allocation instructions.
llvm-svn: 24221
2005-11-06 08:02:57 +00:00
Chris Lattner 9e0781f9a7 Minor correction
llvm-svn: 24220
2005-11-06 07:48:11 +00:00
Chris Lattner 05c64d1496 don't misencode CC#'s
llvm-svn: 24219
2005-11-06 07:46:13 +00:00
Chris Lattner 49d1908af1 encode/decode function alignment in bc files
llvm-svn: 24218
2005-11-06 07:43:39 +00:00
Chris Lattner 84acbccc33 describe extensions to the .bc format for function/global alignment
llvm-svn: 24217
2005-11-06 07:20:25 +00:00
Chris Lattner 547f20c63e Read/write global variable alignments if present
llvm-svn: 24216
2005-11-06 07:11:04 +00:00
Chris Lattner cc99ec2a14 add alignment info for globals and functions
llvm-svn: 24213
2005-11-06 06:52:11 +00:00
Chris Lattner f8a974d169 print alignment info for globals and functions
llvm-svn: 24212
2005-11-06 06:48:53 +00:00
Chris Lattner 840f789433 regenerate
llvm-svn: 24211
2005-11-06 06:46:53 +00:00
Chris Lattner d57ed893e1 Allow globals to have an alignment specified. Switch to using isPowerOf2_32
at Jim's request for the checking code.

llvm-svn: 24210
2005-11-06 06:46:28 +00:00
Chris Lattner 6b27e499e5 allow functions and modules to have an explicit alignment
llvm-svn: 24209
2005-11-06 06:44:42 +00:00
Chris Lattner 86c352b782 regenerate
llvm-svn: 24208
2005-11-06 06:34:34 +00:00
Chris Lattner c7de836a77 factor optional alignment
llvm-svn: 24207
2005-11-06 06:34:12 +00:00
Duraid Madina 4645db0948 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.

llvm-svn: 24206
2005-11-06 04:29:30 +00:00
Chris Lattner 16025eef80 enumerate non-standard argument encoding cases, such as alignment info for
allocations

llvm-svn: 24205
2005-11-05 22:32:06 +00:00
Chris Lattner db1375823d rearrange some info about the instruction encoding
llvm-svn: 24204
2005-11-05 22:20:06 +00:00
Chris Lattner 575e828aa5 Write/read allocation instruction alignment info to .bc files.
llvm-svn: 24203
2005-11-05 22:08:14 +00:00
Chris Lattner 6ce0ad3f74 new testcase
llvm-svn: 24202
2005-11-05 22:07:30 +00:00
Chris Lattner d775e1837f add an accessor
llvm-svn: 24201
2005-11-05 21:58:30 +00:00
Chris Lattner 79b8c79242 verify that alignments are always a power of 2
llvm-svn: 24200
2005-11-05 21:57:54 +00:00
Chris Lattner b467a4fb29 regenerate
llvm-svn: 24199
2005-11-05 21:54:23 +00:00
Chris Lattner 6318dc5691 Verify that alignment amounts are a power of 2
llvm-svn: 24198
2005-11-05 21:54:03 +00:00
Chris Lattner 7aeee3aff8 fix printing the alignment directive
llvm-svn: 24197
2005-11-05 21:20:34 +00:00
Nate Begeman 848622f87f 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
Chris Lattner 75fe59c4ea add a case Nate sent me
llvm-svn: 24195
2005-11-05 08:57:56 +00:00
Chris Lattner 16b29e9562 Implement Transforms/TailCallElim/return-undef.ll, a trivial case
that has been sitting in my inbox since May 18. :)

llvm-svn: 24194
2005-11-05 08:21:11 +00:00
Chris Lattner 7a4c694ef7 New testcase
llvm-svn: 24191
2005-11-05 08:20:28 +00:00
Chris Lattner dd0c174082 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.

llvm-svn: 24190
2005-11-05 07:40:31 +00:00
Chris Lattner e9ff0eaf5b 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.

llvm-svn: 24189
2005-11-05 07:28:37 +00:00
Jim Laskey 904dbb4a27 Fix logic bug in finding retry slot in tally.
llvm-svn: 24188
2005-11-05 00:01:25 +00:00
Jim Laskey ded4759d81 Fix a warning
llvm-svn: 24187
2005-11-04 18:26:02 +00:00
Duraid Madina 31071b7471 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

llvm-svn: 24186
2005-11-04 17:55:53 +00:00
Duraid Madina d3260128af kill redundant SP/GP/RP save/restores across calls
llvm-svn: 24183
2005-11-04 10:01:10 +00:00
Duraid Madina fc1d1b2499 add support for loading bools
llvm-svn: 24182
2005-11-04 09:59:06 +00:00
Jim Laskey e682b677c1 Scheduling now uses itinerary data.
llvm-svn: 24180
2005-11-04 04:05:35 +00:00
Jeff Cohen add93a5957 <cassert> no longer required to make VC++ happy.
llvm-svn: 24177
2005-11-04 02:59:16 +00:00
Duraid Madina 3b3f2a92e6 change NULL to 0, unbreaks the ppc target when building on ia64
llvm-svn: 24176
2005-11-04 01:45:04 +00:00
Duraid Madina 7ac646ef95 fun with predicates! (add TRUNC i64->i1, AND i1 i1, fix XOR i1 i1)
llvm-svn: 24175
2005-11-04 00:57:56 +00:00
Jim Laskey d6d3afb05e 1. Remove ranges from itinerary data.
2. Tidy up the subtarget emittined code.

llvm-svn: 24172
2005-11-03 22:47:41 +00:00
Chris Lattner 5f48179c85 Fix mac os spelling
llvm-svn: 24171
2005-11-03 22:33:48 +00:00
Chris Lattner e33f18eedc Add more bison versions, thanks to Vladimir
llvm-svn: 24169
2005-11-03 18:32:06 +00:00
Chris Lattner 6b5e263fe4 Per bug 655, give people more options in case 1.35 doesn't build on their
system.

llvm-svn: 24168
2005-11-03 18:28:22 +00:00
Duraid Madina f0f22a55b0 add pattern to load constant 0 into a predicate reg
llvm-svn: 24164
2005-11-03 10:09:32 +00:00
Chris Lattner b3140c3e8a add a hack that fixes:
llvm-gcc main.c -Wl,-native -o a.out -g

This is important because it used by many configure scripts.

John, please pull this onto the 1.6 branch.

llvm-svn: 24163
2005-11-03 07:17:51 +00:00
Chris Lattner 64209fd14b Reject integer literals that are out of range for their type.
llvm-svn: 24162
2005-11-03 05:46:11 +00:00
Chris Lattner 674660ff03 Fix a bug that prevented this pattern from matching
llvm-svn: 24161
2005-11-03 05:45:34 +00:00
Nate Begeman ee065281e8 Fix a crash that Andrew noticed, and add a pair of braces to unfconfuse
XCode's indenting.

llvm-svn: 24159
2005-11-02 18:42:59 +00:00
Andrew Lenharth 662295587d make this 64 bit clean, fixed test30 of /Regression/Transforms/InstCombine/add.ll
llvm-svn: 24158
2005-11-02 18:35:40 +00:00
Andrew Lenharth 8426ee14be This is missed by InstCombine, patch comming
llvm-svn: 24157
2005-11-02 18:34:05 +00:00
Chris Lattner 9b9a839605 Fix a QOI issue noticed by Markus F.X.J. Oberhumer.
This fixes PR641

llvm-svn: 24154
2005-11-02 17:42:58 +00:00
Duraid Madina 955ffafd79 "fix" support for FP constants (this code asserts in the scheduler,
though)

llvm-svn: 24152
2005-11-02 07:32:59 +00:00
Duraid Madina 4480dcdcea add F0 and F1 to the FP register class
llvm-svn: 24151
2005-11-02 07:30:39 +00:00
Chris Lattner b5310bdbe9 This works now
llvm-svn: 24150
2005-11-02 06:49:37 +00:00
Chris Lattner 590176be16 Add support for immediates directly in the pattern, this allows itanium to
define:

def : Pat<(i1 1), (CMPEQ r0, r0)>;

llvm-svn: 24149
2005-11-02 06:49:14 +00:00
Jeff Cohen 95b6fc359b Keep VC++ happy.
llvm-svn: 24148
2005-11-02 04:03:16 +00:00
Duraid Madina 17decbb253 add support for SELECT to TargetSelectionDAG.td, add support for
selecting ints to IA64, and a few other ia64 bits and pieces

llvm-svn: 24147
2005-11-02 02:37:18 +00:00
Duraid Madina 9abf1650ed add support for loading FP constants +0.0 and +1.0 to the dag isel,
stop pretending -0.0 and -1.0 are machine constants

llvm-svn: 24146
2005-11-02 02:35:04 +00:00
Chris Lattner 17df608719 Fix a source of undefined behavior when dealing with 64-bit types. This
may fix PR652.  Thanks to Andrew for tracking down the problem.

llvm-svn: 24145
2005-11-02 01:47:04 +00:00
Misha Brukman 93b8cb17ac * Replace ampersands in section titles with more formal ``and''
* Surround C++ template operators with <tt>
* Add <> after templated operators for consistency

llvm-svn: 24144
2005-11-01 21:12:49 +00:00
Misha Brukman 3c46ccf336 Re-generated to fix copy-paste typo noticed by Marco Matthies.
llvm-svn: 24143
2005-11-01 21:00:49 +00:00
Misha Brukman 2956ea758d Fixed copy-paste typo, patch by Marco Matthies.
llvm-svn: 24142
2005-11-01 20:58:08 +00:00
Jim Laskey 802748cd61 Allow itineraries to be passed through the Target Machine.
llvm-svn: 24139
2005-11-01 20:06:59 +00:00
Jeff Cohen 9e1784d738 Keep VC++ happy.
llvm-svn: 24137
2005-11-01 18:04:06 +00:00
Chris Lattner 1deb86dbf4 Let people who run the nightly tester specify paths to external tests, instead
of having to hack the nightly tester script itself.

as an example, I use the following for my machine:

$HOME/llvm/utils/NightlyTest.pl -parallel -release -enable-llcbeta \
     -spec2000path /Volumes/ProjectsDisk/cvs/benchmarks/speccpu2000-llvm/benchspec/ \
     -povraypath /Volumes/ProjectsDisk/cvs/benchmarks/povray31 \
     -namdpath /Volumes/ProjectsDisk/cvs/benchmarks/namd

llvm-svn: 24136
2005-11-01 17:59:42 +00:00
Duraid Madina 5a087ff8c3 heh, scheduling was easy?
need to send chris, jim and sampo a box of fish each

llvm-svn: 24135
2005-11-01 05:49:08 +00:00
Duraid Madina 9b61d3c1e2 FORTRAN!!! :( and other similarly unfortunate things mean that on ia64
one sometimes needs to pass FP args in both FP *and* integer registers.

llvm-svn: 24134
2005-11-01 05:46:16 +00:00
Duraid Madina b81b61330e so tablegen was thinking I might want to convert FPs to predicates.
clever little tablegen!

llvm-svn: 24133
2005-11-01 03:32:15 +00:00
Duraid Madina 6c912bffd6 add support for int->FP and FP->int ops, and add ia64 patterns for these
llvm-svn: 24132
2005-11-01 03:07:25 +00:00
Duraid Madina a284b6636f add zeroextend predicate->integer
llvm-svn: 24131
2005-11-01 01:29:55 +00:00
Chris Lattner 7432ceef5c Add a flag to enable a darwin linker optimization
llvm-svn: 24130
2005-11-01 00:12:36 +00:00
Chris Lattner 6b63e0c6fd Make constant pool entries use private labels. This is important when you're
not compiling a whole program at a time :)

llvm-svn: 24129
2005-10-31 22:12:06 +00:00
Andrew Lenharth d44a8f546d Updated alpha known problems.
llvm-svn: 24126
2005-10-31 19:07:29 +00:00
Chris Lattner b7147f6027 Apparently these do pass on some alphas
llvm-svn: 24125
2005-10-31 19:06:13 +00:00
Chris Lattner 71d73eb411 Fix an iterator invalidation problem in code used by the -strip pass
llvm-svn: 24124
2005-10-31 18:42:37 +00:00
Chris Lattner 09efd4e5b6 Limit the search depth of MaskedValueIsZero to 6 instructions, to avoid
bad cases.  This fixes Markus's second testcase in PR639, and should
seal it for good.

llvm-svn: 24123
2005-10-31 18:35:52 +00:00
Jim Laskey 0433df136f Emit itinerary class in instruction info.
llvm-svn: 24122
2005-10-31 17:16:46 +00:00
Jim Laskey 3763a50d82 Generate cpu to itinerary map.
llvm-svn: 24121
2005-10-31 17:16:01 +00:00
Chris Lattner 14ada0fd4e these tests fail on alpha for some reason
llvm-svn: 24120
2005-10-31 16:15:49 +00:00
Jim Laskey 5ce0538253 1. Embed and not inherit vector for NodeGroup.
2. Iterate operands and not uses (performance.)

3. Some long pending comment changes.

llvm-svn: 24119
2005-10-31 12:49:09 +00:00
Duraid Madina 88fc69f627 add FP compares and implicit register defs to the dag isel
llvm-svn: 24118
2005-10-31 01:42:11 +00:00
Jeff Cohen 94d1562071 Update Getting Started for Visual Studio page.
llvm-svn: 24117
2005-10-30 21:00:24 +00:00
Chris Lattner 6871b23d02 Significantly simplify this code and make it more aggressive. Instead of having
a special case hack for X86, make the hack more general: if an incoming argument
register is not used in any block other than the entry block, don't copy it to
a vreg.  This helps us compile code like this:

%struct.foo = type { int, int, [0 x ubyte] }
int %test(%struct.foo* %X) {
        %tmp1 = getelementptr %struct.foo* %X, int 0, uint 2, int 100
        %tmp = load ubyte* %tmp1                ; <ubyte> [#uses=1]
        %tmp2 = cast ubyte %tmp to int          ; <int> [#uses=1]
        ret int %tmp2
}

to:

_test:
        lbz r3, 108(r3)
        blr

instead of:

_test:
        lbz r2, 108(r3)
        or r3, r2, r2
        blr

The (dead) copy emitted to copy r3 into a vreg for extra-block uses was
increasing the live range of r3 past the load, preventing the coallescing.

This implements CodeGen/PowerPC/reg-coallesce-simple.ll

llvm-svn: 24115
2005-10-30 19:42:35 +00:00
Chris Lattner 6beef90324 new testcase
llvm-svn: 24112
2005-10-30 19:42:18 +00:00
Chris Lattner dd5663dfa0 Reduce the number of copies emitted as machine instructions by
generating results in vregs that will need them.  In the case of something
like this:  CopyToReg((add X, Y), reg1024), we no longer emit code like
this:

   reg1025 = add X, Y
   reg1024 = reg 1025

Instead, we emit:

   reg1024 = add X, Y

Whoa! :)

llvm-svn: 24111
2005-10-30 18:54:27 +00:00
Chris Lattner 5c7d731832 If the module has no t-t and the host is an alpha, default to using the Alpha BE
llvm-svn: 24110
2005-10-30 16:44:01 +00:00
Duraid Madina 57b7ee9da8 fix some broken comparisons, this affected the Pattern isel too.
llvm-svn: 24109
2005-10-30 10:14:19 +00:00
Chris Lattner 48131a8254 The pass was removed, but the spirit lives on
llvm-svn: 24108
2005-10-30 07:22:15 +00:00
Chris Lattner e507a15184 This is implemented
llvm-svn: 24107
2005-10-30 06:42:12 +00:00
Chris Lattner a70878d4fb Codegen mul by negative power of two with a shift and negate.
This implements test/Regression/CodeGen/PowerPC/mul-neg-power-2.ll,
producing:

_foo:
        slwi r2, r3, 1
        subfic r3, r2, 63
        blr

instead of:

_foo:
        mulli r2, r3, -2
        addi r3, r2, 63
        blr

llvm-svn: 24106
2005-10-30 06:41:49 +00:00
Chris Lattner 9cc9f0fca1 new testcase
llvm-svn: 24103
2005-10-30 06:37:33 +00:00
Chris Lattner f0b77f9acc Fix a problem that Nate noticed with LSR:
When inserting code for an addrec expression with a non-unit stride, be
more careful where we insert the multiply.  In particular, insert the multiply
in the outermost loop we can, instead of the requested insertion point.

This allows LSR to notice the mul in the right loop, reducing it when it gets
to it.  This allows it to reduce the multiply, where before it missed it.

This happens quite a bit in the test suite, for example, eliminating 2
multiplies in art, 3 in ammp, 4 in apsi, reducing from 1050 multiplies to
910 muls in galgel (!), from 877 to 859 in applu, and 36 to 30 in bzip2.

This speeds up galgel from 16.45s to 16.01s, applu from 14.21 to 13.94s and
fourinarow from 66.67s to 63.48s.

This implements Transforms/LoopStrengthReduce/nested-reduce.ll

llvm-svn: 24102
2005-10-30 06:24:33 +00:00
Chris Lattner 67315dc888 new testcase
llvm-svn: 24099
2005-10-30 05:14:02 +00:00
Chris Lattner af6b34ff44 Revert an accidental commit.
llvm-svn: 24098
2005-10-29 17:01:41 +00:00
Jeff Cohen 99a71ef891 More files deleted.
llvm-svn: 24097
2005-10-29 16:51:48 +00:00
Chris Lattner 85b184b292 Make -time-passes output prettier
llvm-svn: 24096
2005-10-29 16:45:02 +00:00
Chris Lattner d91df9d941 Make negative immediates in patterns work correctly, silence some warnings
building the itanium backend.

llvm-svn: 24095
2005-10-29 16:39:40 +00:00
Duraid Madina 7abaf906e2 add some FP stuff, some mix.* stuff, and constant pool support to the
DAG instruction selector, which should be destroyed one day (in the pattern
isel also) since ia64 can pack any constant in the instruction stream

llvm-svn: 24094
2005-10-29 16:08:30 +00:00
Chris Lattner 42f905691e Fix <> in html
llvm-svn: 24093
2005-10-29 07:08:19 +00:00
Chris Lattner a69595ee0d First hack-and-slash on the release notes. Comments and improvements welcome
llvm-svn: 24092
2005-10-29 07:07:09 +00:00
Chris Lattner d66c42facb Remove the lowerconstantexprs pass
llvm-svn: 24091
2005-10-29 05:34:40 +00:00
Chris Lattner 27d351f159 This pass is now obsolete since all targets have moved to the SelectionDAG
infrastructure and the simple isels have been removed.

llvm-svn: 24090
2005-10-29 05:33:46 +00:00
Chris Lattner de63fba075 Remove the LowerConstantExpressionsPass pass
llvm-svn: 24089
2005-10-29 05:32:20 +00:00
Chris Lattner dcceae104e remove reference to this pass
llvm-svn: 24088
2005-10-29 05:28:34 +00:00
Chris Lattner 8ad30360cf Basic updates
llvm-svn: 24087
2005-10-29 05:14:01 +00:00
Chris Lattner c86bd2b1cd Buh bye Expression.(cpp|h)
llvm-svn: 24086
2005-10-29 04:55:57 +00:00
Chris Lattner 21193ac3c0 remove a dead file
llvm-svn: 24085
2005-10-29 04:43:38 +00:00
Chris Lattner 29b04e1021 remove a dead header
llvm-svn: 24084
2005-10-29 04:43:10 +00:00
Chris Lattner 752717d4ec Remove dead #include
llvm-svn: 24083
2005-10-29 04:41:30 +00:00
Chris Lattner ceb9d5adaa Now that instcombine does this xform, remove it from the -raise pass
llvm-svn: 24082
2005-10-29 04:40:23 +00:00
Chris Lattner 8f663e8bbc Pull some code out into a function, give it the ability to see through +.
This allows us to turn code like malloc(4*x+4) -> malloc int, (x+1)

llvm-svn: 24081
2005-10-29 04:36:15 +00:00
Duraid Madina c252f33fdb add shladd
llvm-svn: 24080
2005-10-29 04:13:40 +00:00
Duraid Madina e71426f581 test for the formation of shladd
llvm-svn: 24077
2005-10-29 04:06:49 +00:00
Chris Lattner 8270c33606 Remove a special case, allowing the general case to handle it. No functionality
change.

llvm-svn: 24076
2005-10-29 03:19:53 +00:00
Nate Begeman 00cea9b2e0 New case to handle someday
llvm-svn: 24075
2005-10-28 23:26:57 +00:00
Chris Lattner 742606ad30 Switch more code over to using getValueAsListOfDefs. Look at all the -'s. :)
llvm-svn: 24074
2005-10-28 22:59:53 +00:00
Chris Lattner 7ca53a5783 Don't emit "32" for unordered comparison
llvm-svn: 24073
2005-10-28 22:58:07 +00:00
Chris Lattner 7ad0bed89f Rename Record::getValueAsListDef to getValueAsListOfDefs, to more accurately
reflect what it is.
Convert some more code over to use it.

llvm-svn: 24072
2005-10-28 22:49:02 +00:00
Chris Lattner 802bd8d94f Use the new interface Jim added
llvm-svn: 24071
2005-10-28 22:43:25 +00:00
Jim Laskey dffe5978a3 Removed Mr. Smith from the code.
llvm-svn: 24070
2005-10-28 21:47:29 +00:00
Jim Laskey b04feb633f Added method to return a vector of records for a ListInit of Def field. This
simplifies using list of records.

llvm-svn: 24069
2005-10-28 21:46:31 +00:00
Chris Lattner f8899a6877 add a hack to get code with ordered comparisons working. This hack is
tracked as PR642

llvm-svn: 24068
2005-10-28 20:49:47 +00:00
Chris Lattner 5d6cb604de add support for branch on ordered/unordered.
llvm-svn: 24067
2005-10-28 20:32:44 +00:00
Chris Lattner e2fb63ea95 add the xfail lines
llvm-svn: 24066
2005-10-28 19:57:55 +00:00
Chris Lattner 225022e4b0 New testcase. Probably many targets don't support this, so they should probably
add themselves as xfails until they do (at least for the release).

llvm-svn: 24065
2005-10-28 19:52:02 +00:00
Chris Lattner 97d72c80e4 Do not globalize internal symbols
llvm-svn: 24064
2005-10-28 18:44:07 +00:00
Chris Lattner 12fca42062 These are autogenerated
llvm-svn: 24063
2005-10-28 18:26:52 +00:00
Duraid Madina f221c261f3 DAG->DAG instruction selection for ia64! "hello world" works, not much else.
use -enable-ia64-dag-isel to turn this on

TODO: delete lowering stuff from the pattern isel
    : get operations on predicate bits working
    : get other bits of pseudocode going
    : use sampo's mulh/mull-using divide-by-constant magic
    : *so* many patterns ("extr", "tbit" and "dep" will be fun :)
    : add FP
    : add a JIT!
    : get it working 100%

in short: this'll be happier in a couple of weeks, but it's here now so
the tester can make me feel guilty sooner.

OTHER: there are a couple of fixes to the pattern isel, in particular
making the linker happy with big blobs of fun like pypy.

llvm-svn: 24058
2005-10-28 17:46:35 +00:00
Chris Lattner db53c998de The nightly tester report doesn't report JIT code size anymore, remove it
from the olden graph.

llvm-svn: 24057
2005-10-28 16:35:18 +00:00
Chris Lattner b9d3ca5c3c Fix a bit of backwards logic that broke exptree and smg2000
llvm-svn: 24056
2005-10-28 16:27:35 +00:00
Jim Laskey 1959575208 Add some commentary.
llvm-svn: 24055
2005-10-28 15:20:43 +00:00
Chris Lattner 529169cab2 remove dead stuff
llvm-svn: 24054
2005-10-28 04:58:24 +00:00
Chris Lattner e68a807025 Eliminate getClass, it is not needed
llvm-svn: 24053
2005-10-28 04:57:11 +00:00
Jeff Cohen b0aa47b043 Keep Visual Studio happy.
llvm-svn: 24052
2005-10-28 01:43:09 +00:00