Brian Gaeke
2c5d55fd94
Do not hardcode the name of gcc, because its full pathname may have been
...
specified by top-level configure
llvm-svn: 13458
2004-05-11 07:42:58 +00:00
Brian Gaeke
a9447a8995
Do not depend on the path to bash
...
llvm-svn: 13457
2004-05-11 07:42:19 +00:00
Brian Gaeke
2d5a7a7b2f
Include <sys/types.h> to get the definition of int64_t on Solaris.
...
llvm-svn: 13456
2004-05-11 07:18:02 +00:00
Chris Lattner
279d8e8e2d
Switch this from using an std::map to using a DenseMap. This speeds up
...
phi-elimination from 0.6 to 0.54s on kc++.
llvm-svn: 13454
2004-05-10 19:17:36 +00:00
Chris Lattner
3fb5488b5e
Use a new VRegPHIUseCount to compute uses of PHI values by other phi values
...
in the basic block being processed. This fixes PhiElimination on kimwitu++
from taking 105s to taking a much more reasonable 0.6s (in a debug build).
llvm-svn: 13453
2004-05-10 19:06:37 +00:00
Chris Lattner
8b57a31ff4
Now that we use an ilist of machine instructions, iterators are more robust
...
than before. Because this is the case, we can compute the first non-phi
instruction once when de-phi'ing a block. This shaves ~4s off of
phielimination of _Z7yyparsev in kimwitu++ from 109s -> 105s. There are
still much more important gains to come.
llvm-svn: 13452
2004-05-10 18:47:18 +00:00
Chris Lattner
a407338e12
Fix a fairly serious pessimizaion that was preventing us from efficiently
...
compiling things like 'add long %X, 1'. The problem is that we were switching
the order of the operands for longs even though we can't fold them yet.
llvm-svn: 13451
2004-05-10 15:15:55 +00:00
Chris Lattner
385eb588e0
Bug fixed
...
llvm-svn: 13450
2004-05-10 14:28:09 +00:00
Chris Lattner
b37490a331
Patch to fix PR337. Make sure to mark all aliased physical registers as used
...
when we see a read of a register. This is important in cases like:
AL = ...
AH = ...
= AX
The read of AX must make both the AL and AH defs live until the use.
llvm-svn: 13444
2004-05-10 05:12:43 +00:00
Chris Lattner
35e874420b
Testcase for PR337, which was reduced by Reid Spencer.
...
llvm-svn: 13443
2004-05-10 05:11:24 +00:00
Reid Spencer
eebac3ea54
Bug 178 Fixed
...
llvm-svn: 13442
2004-05-09 23:32:39 +00:00
Reid Spencer
b417772e42
Changes to make the Stacker Stack use 64 bit values. This *should* get
...
around the problem with Stacker on Solaris because the Stack can handle
64-bit entries (pointer sized).
llvm-svn: 13441
2004-05-09 23:20:19 +00:00
Chris Lattner
0962db8f10
Fix some comments, avoid sign extending booleans when zero extend works fine
...
llvm-svn: 13440
2004-05-09 23:16:33 +00:00
Chris Lattner
d18c637a37
Generate more efficient code for casting booleans to integers (no sign extension required)
...
llvm-svn: 13439
2004-05-09 22:28:45 +00:00
Chris Lattner
8ccfc21a0f
syntactically loopify natural loops so that the GCC loop optimizer can find them. This should *dramatically* improve the performance of CBE compiled code on targets that depend on GCC's loop optimizations (like PPC)
...
llvm-svn: 13438
2004-05-09 20:41:32 +00:00
Chris Lattner
c6a63660e6
Do not emit prototypes for setjmp/longjmp, as they are handled specially
...
llvm-svn: 13437
2004-05-09 16:03:29 +00:00
Chris Lattner
7c723ecb57
Fine grainify namespacification
...
llvm-svn: 13436
2004-05-09 06:22:29 +00:00
Chris Lattner
4926af5c32
Make the floating point constant pools local to each function, split the
...
FindUsedTypes manipulation stuff out to be a seperate pass, and make the
main CWriter be a function pass now!
llvm-svn: 13435
2004-05-09 06:20:51 +00:00
Brian Gaeke
5bff7f662b
Bug fixed.
...
Rewrite portability intro.
llvm-svn: 13434
2004-05-09 05:28:35 +00:00
Chris Lattner
37abb037bf
Get this looking more like a function pass.
...
llvm-svn: 13433
2004-05-09 04:30:20 +00:00
Chris Lattner
da4ac5d876
Implement the AddPrototypes method
...
llvm-svn: 13432
2004-05-09 04:29:57 +00:00
Chris Lattner
337ea7709a
Add support for inserting all prototypes up-front
...
llvm-svn: 13431
2004-05-09 04:29:49 +00:00
Chris Lattner
99b7c2b532
Print all PHI copies for successor blocks before the terminator, whether it be a conditional branch or switch.
...
llvm-svn: 13430
2004-05-09 03:42:48 +00:00
Chris Lattner
0efd1cb264
Fix stupid bug in my checkin yesterday
...
llvm-svn: 13429
2004-05-08 22:41:42 +00:00
Tanya Lattner
c69bb49340
Fixed up sched graph.
...
llvm-svn: 13428
2004-05-08 16:14:24 +00:00
Tanya Lattner
9b4ee61855
Registering the ModuloScheduling pass.
...
llvm-svn: 13427
2004-05-08 16:14:02 +00:00
Tanya Lattner
f97f4f8760
Changed CPUResource to allow access to max num users for a resource.
...
Also added ModuloScheduling as a friend.
llvm-svn: 13426
2004-05-08 16:13:26 +00:00
Tanya Lattner
b6ecf521da
Changed CPUResource to allow access to maxnum users.
...
llvm-svn: 13425
2004-05-08 16:12:50 +00:00
Tanya Lattner
57339f67d6
Updating my versions of ModuloScheduling in cvs. Still not complete.
...
llvm-svn: 13424
2004-05-08 16:12:10 +00:00
Brian Gaeke
7cc5d0f106
Add support for widening integral casts.
...
Flesh out the SetCC support... which currently ends in a little bit
of unfinished code (which is probably completely hilarious) for
generating the condition value splitting the basic block up into 4
blocks, like this (clearly a better API is needed for this!):
BB
cond. branch
/ / R1=1 R2=0
\ /
\ /
R=phi(R1,R2)
Other minor edits.
llvm-svn: 13423
2004-05-08 06:36:14 +00:00
Brian Gaeke
58fd2b0e4a
Add a bunch more branches
...
llvm-svn: 13422
2004-05-08 06:08:29 +00:00
Brian Gaeke
faf41642ca
Flesh out GEP support
...
llvm-svn: 13421
2004-05-08 05:27:20 +00:00
Brian Gaeke
e44dbd4a39
Add ADD with immediate
...
llvm-svn: 13420
2004-05-08 05:26:55 +00:00
Brian Gaeke
5861a59506
Add forms of CMP, SUBCC, and a few branches, and some comments.
...
llvm-svn: 13419
2004-05-08 04:21:32 +00:00
Brian Gaeke
eaf8a021e3
Add stub support for GEPs.
...
Add support for branches (based loosely on X86/InstSelectSimple).
Add support for not visiting phi nodes in the first pass.
Add support for loading bools.
Flesh out support for stores.
llvm-svn: 13418
2004-05-08 04:21:17 +00:00
Alkis Evlogimenos
76be543a64
Add required header
...
llvm-svn: 13417
2004-05-08 03:50:03 +00:00
Alkis Evlogimenos
6022169db7
Remove unneeded header
...
llvm-svn: 13416
2004-05-08 03:49:35 +00:00
Chris Lattner
e3b3e333b0
Implement folding of GEP's like:
...
%tmp.0 = getelementptr [50 x sbyte]* %ar, uint 0, int 5 ; <sbyte*> [#uses=2]
%tmp.7 = getelementptr sbyte* %tmp.0, int 8 ; <sbyte*> [#uses=1]
together. This patch actually allows us to simplify and generalize the code.
llvm-svn: 13415
2004-05-07 22:09:22 +00:00
Brian Gaeke
e99247512f
Allow the user to set the LLVMINTERP environment variable as a workaround, for
...
when they have to run a gccld shell script without having lli in their path.
This is intended to address Bug 289.
Also, emit the traditional syntax ${1+"$@"} for passing all of a shell script's
args to a subprocess. If you have arguments that have spaces in them, $* will
not preserve the quoting (i.e., the quoted string "foo bar" as an argument will
end up as two arguments "foo" "bar" to lli.)
llvm-svn: 13414
2004-05-07 21:47:36 +00:00
Brian Gaeke
0d477a958f
Add support for copying bool constants to registers.
...
Disable the code that copies long constants to registers - it looks fishy.
Implement some simple casts: integral, smaller than longs, and equal-width
or narrowing only.
llvm-svn: 13413
2004-05-07 21:39:30 +00:00
Chris Lattner
67c21e74ec
Codegen floating point stores of constants into integer instructions. This
...
allows us to compile:
store float 10.0, float* %P
into:
mov DWORD PTR [%EAX], 1092616192
instead of:
.CPItest_0: # float 0x4024000000000000
.long 1092616192 # float 10
...
fld DWORD PTR [.CPItest_0]
fstp DWORD PTR [%EAX]
llvm-svn: 13409
2004-05-07 21:18:15 +00:00
Brian Gaeke
0bfc4cbb20
Add more casts. You can never have enough casts.
...
llvm-svn: 13408
2004-05-07 21:10:28 +00:00
Chris Lattner
2021030378
Make comparisons against the null pointer as efficient as integer comparisons
...
against zero. In particular, don't emit:
mov %ESI, 0
cmp %ECX, %ESI
instead, emit:
test %ECX, %ECX
llvm-svn: 13407
2004-05-07 19:55:55 +00:00
Chris Lattner
9d47fb5055
PR implemented
...
llvm-svn: 13406
2004-05-07 19:23:05 +00:00
Chris Lattner
335945deb6
Bug fixed
...
llvm-svn: 13403
2004-05-07 18:40:38 +00:00
Chris Lattner
25eab703b8
New testcase
...
llvm-svn: 13402
2004-05-07 18:38:59 +00:00
Chris Lattner
d2bfeadad8
New testcase for PR336
...
llvm-svn: 13401
2004-05-07 15:38:50 +00:00
Chris Lattner
6340390476
Fix PR336: The instcombine pass asserts when visiting load instruction
...
llvm-svn: 13400
2004-05-07 15:35:56 +00:00
John Criswell
9d57722f25
Regression test for PR#330.
...
llvm-svn: 13399
2004-05-07 13:57:19 +00:00
Chris Lattner
49980050b5
Add the enum corresponding to the source change I made earlier
...
llvm-svn: 13395
2004-05-07 02:27:32 +00:00