Alkis Evlogimenos
68f40cbfd3
Rename reloads/spills to loads/stores.
...
llvm-svn: 11619
2004-02-19 06:19:09 +00:00
Chris Lattner
2a293313ca
Add support for just running the code generator
...
llvm-svn: 11611
2004-02-18 23:24:41 +00:00
Alkis Evlogimenos
310f641c9c
Implement assignment correctness verification.
...
llvm-svn: 11609
2004-02-18 23:15:23 +00:00
Chris Lattner
5a22f3a7d1
indent correctly
...
llvm-svn: 11601
2004-02-18 20:58:00 +00:00
Chris Lattner
eddc6ab2e7
Don't yell. BUGPOINT should yell, not the tool runner :)
...
llvm-svn: 11600
2004-02-18 20:57:38 +00:00
Chris Lattner
a52c617fd7
If there is an error running a tool, include the error message (e.g. assertion failure) in the exception
...
llvm-svn: 11597
2004-02-18 20:38:00 +00:00
Chris Lattner
72ce97cc95
When an error occurs executing a tool, we now throw an exception instead
...
of calling exit(1).
llvm-svn: 11593
2004-02-18 20:21:57 +00:00
Chris Lattner
e672426e5d
Eliminate operator[] is deprecated warnings
...
llvm-svn: 11578
2004-02-18 16:43:51 +00:00
Chris Lattner
8acab89631
Fix deprecated operator[] warnings
...
llvm-svn: 11577
2004-02-18 16:38:18 +00:00
Alkis Evlogimenos
7ec1bad952
Fix argument size for MOVSX and MOVZX instructions.
...
llvm-svn: 11576
2004-02-18 16:20:40 +00:00
Alkis Evlogimenos
c394f7803b
Be more agressive when joining ranges.
...
llvm-svn: 11575
2004-02-18 04:38:37 +00:00
Alkis Evlogimenos
5c90efed55
Fix overly conservative spill interval computation.
...
llvm-svn: 11574
2004-02-18 03:35:38 +00:00
Alkis Evlogimenos
7290ef1f5c
Beautify debug output.
...
llvm-svn: 11573
2004-02-18 00:35:06 +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
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
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
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
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
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
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