Alkis Evlogimenos
7290ef1f5c
Beautify debug output.
...
llvm-svn: 11573
2004-02-18 00:35:06 +00:00
John Criswell
49a38b9257
Added the Malloc perl benchmark license information.
...
Corrected the GhostScript license information.
llvm-svn: 11571
2004-02-17 22:58:41 +00:00
Chris Lattner
3cf6ea75e1
Bug fixed
...
llvm-svn: 11567
2004-02-17 22:00:39 +00:00
Chris Lattner
911d6bfaa8
New testcase for PR245
...
llvm-svn: 11566
2004-02-17 21:58:29 +00:00
Chris Lattner
4fa2e7a67f
Fix PR245: Linking weak and strong global variables is dependent on link order
...
llvm-svn: 11565
2004-02-17 21:56:04 +00:00
Chris Lattner
d9e1a49650
When we complete the bottom-up pass, make sure to merge the globals in 'main' into
...
the globals graph.
llvm-svn: 11562
2004-02-17 19:06:47 +00:00
Chris Lattner
f2b699b98b
Since tail duplication is currently neutered, we have to help the optimizer to remove the overhead of __main
...
llvm-svn: 11561
2004-02-17 18:45:06 +00:00
Chris Lattner
f58d2dd6cf
Add support for GlobalAddress's for alkis
...
llvm-svn: 11560
2004-02-17 18:23:55 +00:00
Alkis Evlogimenos
c6f0651e5c
These store to memory too.
...
llvm-svn: 11558
2004-02-17 17:53:48 +00:00
Chris Lattner
ea22a3de13
Remove the -disable-kill option. The register allocator is buggy with it,
...
and it was only for debugging in the first place.
llvm-svn: 11557
2004-02-17 17:49:10 +00:00
Chris Lattner
88271db3bc
These store to memory, not read from it.
...
llvm-svn: 11556
2004-02-17 17:46:50 +00:00
John Criswell
d5ef827012
Added espresso.
...
llvm-svn: 11555
2004-02-17 17:07:52 +00:00
Alkis Evlogimenos
0528c59353
Instructiosn with 1 memory operand have 4 operands in our
...
representation.. duh!
llvm-svn: 11554
2004-02-17 15:58:13 +00:00
Alkis Evlogimenos
b1a61b72f2
Align case statements.
...
llvm-svn: 11552
2004-02-17 15:50:41 +00:00
Alkis Evlogimenos
b815fd46ec
Add TEST and XCHG memory operand support.
...
llvm-svn: 11550
2004-02-17 15:48:42 +00:00
Alkis Evlogimenos
32a5b0fd6c
Add OR and XOR memory operand support.
...
llvm-svn: 11549
2004-02-17 15:33:14 +00:00
Alkis Evlogimenos
1e4b3b3c9b
Peephole optimize SUBmi{16,32} into SUBmi{16,32}b when immediate is 8
...
bits wide.
llvm-svn: 11548
2004-02-17 15:14:29 +00:00
Alkis Evlogimenos
4f22bb4d4b
ADDmi{16,32} should be in the next case statement.
...
llvm-svn: 11547
2004-02-17 15:10:11 +00:00
Alkis Evlogimenos
135c4faa55
Add memory operand folding support for MUL, DIV, IDIV, NEG, NOT,
...
MOVSX, and MOVZX.
llvm-svn: 11546
2004-02-17 09:14:23 +00:00
Alkis Evlogimenos
e7bbd1c2fb
Add memory operand folding for CMP{rm,mr,mi}{8,16,32}, INCm{8,16,32}
...
and DECm{8,16,32} instructions.
llvm-svn: 11545
2004-02-17 08:49:20 +00:00
Alkis Evlogimenos
d7e3cc8d65
Add CMP{rm,mr,mi}{8,16,32}, INCm{8,16,32} and DECm{8,16,32} instructions.
...
llvm-svn: 11544
2004-02-17 08:49:00 +00:00
Alkis Evlogimenos
638db7b5aa
Add SUB{rm,mr,mi}{8,16,32} instructions.
...
llvm-svn: 11543
2004-02-17 08:17:40 +00:00
Chris Lattner
a4e0020e54
Add support to the local allocator for fusing spill code into the instructions
...
that need them. This is very useful on CISCy targets like the X86 because it
reduces the total spill pressure, and makes better use of it's (large)
instruction set. Though the X86 backend doesn't know how to rewrite many
instructions yet, this already makes a substantial difference on 176.gcc for
example:
Before:
Time:
8.0099 ( 31.2%) 0.0100 ( 12.5%) 8.0199 ( 31.2%) 7.7186 ( 30.0%) Local Register Allocator
Code quality:
734559 asm-printer - Number of machine instrs printed
111395 ra-local - Number of registers reloaded
79902 ra-local - Number of registers spilled
231554 x86-peephole - Number of peephole optimization performed
After:
Time:
7.8700 ( 30.6%) 0.0099 ( 19.9%) 7.8800 ( 30.6%) 7.7892 ( 30.2%) Local Register Allocator
Code quality:
733083 asm-printer - Number of machine instrs printed
2379 ra-local - Number of reloads fused into instructions
109046 ra-local - Number of registers reloaded
79881 ra-local - Number of registers spilled
230658 x86-peephole - Number of peephole optimization performed
So by fusing 2300 instructions, we reduced the static number of instructions
by 1500, and reduces the number of peepholes (and thus the work) by about 900.
This also clearly reduces the number of reload/spill instructions that are
emitted.
llvm-svn: 11542
2004-02-17 08:09:40 +00:00
Alkis Evlogimenos
5aa39e1583
Add support for folding memory operands for ADC, SBB and SUB instructions.
...
llvm-svn: 11541
2004-02-17 08:08:51 +00:00
Alkis Evlogimenos
28691e063b
Add support for ADC{rm.mr}32 and SBB{rm,mr}32.
...
llvm-svn: 11540
2004-02-17 08:06:31 +00:00
Chris Lattner
eb1428d581
Add a (hidden) option to print instructions that fail to fuse. It's looking
...
like compares and test's would be the next huge win...
llvm-svn: 11539
2004-02-17 08:03:47 +00:00
Alkis Evlogimenos
19248dd757
Add support for folding memory operands in MOVri{8,16,32} instructions.
...
llvm-svn: 11538
2004-02-17 07:47:20 +00:00
Chris Lattner
c4ea4d12bf
Expand the repertoire of the forms we can print and encode.
...
llvm-svn: 11537
2004-02-17 07:40:44 +00:00
Chris Lattner
029dec8f3e
Disable this peephole for now. We can't keep track of the fact that the immediate is 8 bits,
...
but the memory reference is full sized.
llvm-svn: 11536
2004-02-17 07:36:32 +00:00
Chris Lattner
f93308ec17
Fix a bug in my previous refactoring change... arg!
...
llvm-svn: 11535
2004-02-17 07:02:17 +00:00
Chris Lattner
194353930c
The CBE is now in llc, not llvm-dis
...
llvm-svn: 11534
2004-02-17 06:40:51 +00:00
Chris Lattner
62f67310f1
The C backend is no longer in llvm-dis, it's in llc
...
llvm-svn: 11533
2004-02-17 06:40:06 +00:00
Chris Lattner
f877cd09d0
The CBE is no longer in llvm-dis
...
llvm-svn: 11532
2004-02-17 06:39:48 +00:00
Chris Lattner
a9493ad718
Add an option to disable spill fusing in the X86 backend
...
llvm-svn: 11531
2004-02-17 06:30:34 +00:00
Chris Lattner
d4b2f4ef32
Fix the mneumonics for the mov instructions to have the source and destination
...
order in the correct sense!! Arg!
llvm-svn: 11530
2004-02-17 06:28:19 +00:00
Chris Lattner
5757579731
Fix the last crimes against nature that used the 'ir' ordering to use the
...
'ri' ordering instead... no it's not possible to store a register into an
immediate!
llvm-svn: 11529
2004-02-17 06:24:02 +00:00
Chris Lattner
4682990fa5
GRRR. Move instructions have swapped the order of the r/m operands.
...
llvm-svn: 11528
2004-02-17 06:20:20 +00:00
Chris Lattner
16666f8bd2
Rename MOVi[mr] instructions to MOV[rm]i
...
llvm-svn: 11527
2004-02-17 06:16:44 +00:00
Chris Lattner
1db99b1949
Whoops, got my cases swapped.
...
llvm-svn: 11526
2004-02-17 06:02:15 +00:00
Chris Lattner
e227ae6b88
Change to match the newer, simpler, interface
...
llvm-svn: 11525
2004-02-17 05:54:57 +00:00
Chris Lattner
affbcb6be5
Simplify and document the new interface
...
llvm-svn: 11524
2004-02-17 05:54:26 +00:00
Chris Lattner
b82bb37952
Add support for folding memory operands into AND and IMUL's
...
llvm-svn: 11523
2004-02-17 05:46:06 +00:00
Chris Lattner
48e19d8b8e
Scrunchify code, by adding helpers. No functionality changes.
...
llvm-svn: 11522
2004-02-17 05:35:13 +00:00
Chris Lattner
9751eb8ab9
Add mem forms of AND instructions
...
llvm-svn: 11521
2004-02-17 05:25:50 +00:00
Alkis Evlogimenos
a479dc4715
Add LiveIntervals::Interval::empty() member function.
...
llvm-svn: 11520
2004-02-17 05:14:37 +00:00
Alkis Evlogimenos
c4ec9111bb
Add API to check and fold memory operands into instructions.
...
llvm-svn: 11519
2004-02-17 04:33:18 +00:00
Chris Lattner
3c514e8a54
Rename the IMULri* instructions to IMULrri, as they are actually three address
...
instructions. Add forms of these instructions that read from memory
llvm-svn: 11518
2004-02-17 04:26:43 +00:00
Chris Lattner
bb0cfb0429
Once we have a way to fold spill code reloads into instructions, we have a way to use it. :)
...
llvm-svn: 11517
2004-02-17 04:08:37 +00:00
Alkis Evlogimenos
c6ea9a6b65
Fix spilled interval update. It was too conservative.
...
llvm-svn: 11516
2004-02-17 04:04:20 +00:00
Chris Lattner
7b3342d814
Refactor code a bit. No functionality changes, though the comment hints at things to come.
...
llvm-svn: 11515
2004-02-17 03:57:19 +00:00