Chris Lattner
aee775a6b7
Eliminate static ctors from Statistics
...
llvm-svn: 32698
2006-12-19 22:41:21 +00:00
Bill Wendling
22e978a736
Removing even more <iostream> includes.
...
llvm-svn: 32320
2006-12-07 20:04:42 +00:00
Chris Lattner
700b873130
Detemplatize the Statistic class. The only type it is instantiated with
...
is 'unsigned'.
llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Bill Wendling
9d46fcd59c
More removal of std::cerr and DEBUG, replacing with DOUT instead.
...
llvm-svn: 31806
2006-11-17 02:09:07 +00:00
Evan Cheng
0ffff1c629
Match live variable changes.
...
llvm-svn: 31762
2006-11-15 20:55:15 +00:00
Evan Cheng
8c9c6d71ed
Add implicit def / use operands to MachineInstr.
...
llvm-svn: 31633
2006-11-10 08:43:01 +00:00
Chris Lattner
698000b0da
Fix UnitTests/2005-05-12-Int64ToFP.c with llc-beta. In particular, do not
...
allow it to go into an infinite loop, filling up the disk!
llvm-svn: 30494
2006-09-19 18:02:01 +00:00
Chris Lattner
b2e7316b2d
Non-allocatable physregs can be killed and dead, but don't treat them as
...
safe for later allocation. This fixes McCat/18-imp with llc-beta.
llvm-svn: 30204
2006-09-08 20:21:31 +00:00
Chris Lattner
050c64c51d
This fixes Benchmarks/Prolangs-C/unix-smail
...
llvm-svn: 30198
2006-09-08 19:11:11 +00:00
Chris Lattner
9b1a6ebf20
Fix a bunch of llc-beta failures on x86 yesterday. Don't allow selection
...
of unallocatable registers, just because an alias is allocatable. We were
picking registers like SIL just because ESI was being used.
llvm-svn: 30197
2006-09-08 19:03:30 +00:00
Evan Cheng
ddfb10b5af
Only call isUse/isDef on register operands
...
llvm-svn: 30122
2006-09-05 20:32:06 +00:00
Chris Lattner
7cc20d418b
Fix Regression/CodeGen/Generic/2006-09-02-LocalAllocCrash.ll on X86.
...
Just because an alias of a register is available, it doesn't mean that we
can arbitrarily evict the register.
llvm-svn: 30064
2006-09-03 07:15:37 +00:00
Chris Lattner
bd79458b0e
When deleting a machine instruction, make sure to remove it from the
...
livevariables information. This fixes several regalloc=local failures on x86
llvm-svn: 30062
2006-09-03 00:06:08 +00:00
Chris Lattner
3d27be1333
s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|
...
llvm-svn: 29911
2006-08-27 12:54:02 +00:00
Jim Laskey
29e635d3c9
Final polish on machine pass registries.
...
llvm-svn: 29471
2006-08-02 12:30:23 +00:00
Jim Laskey
95eda5b1f3
Introducing plugable register allocators and instruction schedulers.
...
llvm-svn: 29434
2006-08-01 14:21:23 +00:00
Jim Laskey
4b49c23571
Eliminate data relocations by using NULL instead of global empty list.
...
llvm-svn: 29250
2006-07-21 21:15:20 +00:00
Andrew Lenharth
ec104a2b41
80 cols
...
llvm-svn: 29221
2006-07-20 17:43:27 +00:00
Andrew Lenharth
c496b418b5
Reduce number of exported symbols
...
llvm-svn: 29220
2006-07-20 17:28:38 +00:00
Chris Lattner
996795b0dd
Use hidden visibility to make symbols in an anonymous namespace get
...
dropped. This shrinks libllvmgcc.dylib another 67K
llvm-svn: 28975
2006-06-28 23:17:24 +00:00
Chris Lattner
4ff6c1646f
Teach the local allocator to know that live-in values (e.g. arguments) are
...
live at function entry. This prevents it from using arg registers for other
purposes before the arguments are used.
llvm-svn: 28809
2006-06-15 22:21:53 +00:00
Chris Lattner
10d6341618
Move some methods out of MachineInstr into MachineOperand
...
llvm-svn: 28102
2006-05-04 17:52:23 +00:00
Chris Lattner
de02d7727f
Add explicit #includes of <iostream>
...
llvm-svn: 25515
2006-01-22 23:41:00 +00:00
Chris Lattner
619dfaa42b
Nuke noop copies.
...
llvm-svn: 24258
2005-11-09 18:22:42 +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
5a6199f387
Change this code ot pass register classes into the stack slot spiller/reloader
...
code. PrologEpilogInserter hasn't been updated yet though, so targets cannot
use this info.
llvm-svn: 23536
2005-09-30 01:29:00 +00:00
Chris Lattner
469652752c
adjust to new live variables interface
...
llvm-svn: 22992
2005-08-23 23:42:17 +00:00
Misha Brukman
835702a094
Remove trailing whitespace
...
llvm-svn: 21420
2005-04-21 22:36:52 +00:00
Chris Lattner
24f0f0e28f
Update this pass to set PhysRegsUsed info in MachineFunction.
...
llvm-svn: 19792
2005-01-23 22:51:56 +00:00
Chris Lattner
c8b07dd339
Clean up the MachineBasicBlock.h file, percolating #includes into this file.
...
Patch contributed by Morten Ofstad
llvm-svn: 17251
2004-10-26 15:35:58 +00:00
Reid Spencer
7c16caa336
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
5943c5078c
Reduce usage of MRegisterInfo::getRegClass
...
llvm-svn: 15784
2004-08-15 22:23:09 +00:00
Chris Lattner
afe8e34940
Nuke ifdef'd out code
...
llvm-svn: 15777
2004-08-15 22:03:57 +00:00
Chris Lattner
c66f27fd29
Stop using CreateStackObject(RegClass*)
...
llvm-svn: 15775
2004-08-15 22:02:22 +00:00
Chris Lattner
98de1d7795
These methods no longer take a TargetRegisterClass* operand.
...
llvm-svn: 15774
2004-08-15 21:56:44 +00:00
Brian Gaeke
902dcf0729
These files don't need to include <iostream> since they include "Support/Debug.h".
...
llvm-svn: 15089
2004-07-21 20:50:33 +00:00
Chris Lattner
6f4a596234
Fix a recent regression in Applications/sgefa that Alkis pointed out to me.
...
The vector may actually be empty if the register that we are marking as
recently used is not actually allocatable. This happens for physical registers
that are not allocatable, like the ST(x) registers on X86.
llvm-svn: 14195
2004-06-16 06:57:29 +00:00
Chris Lattner
2150542af9
Adjust to new TargetMachine interface
...
llvm-svn: 13956
2004-06-02 05:57:12 +00:00
Alkis Evlogimenos
48da2f8a6d
Change MRegisterInfo::foldMemoryOperand to return the folded
...
instruction to make the API more flexible.
llvm-svn: 12386
2004-03-14 07:19:51 +00:00
Alkis Evlogimenos
61719d48d2
Uncomment assertions that register# != 0 on calls to
...
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.
llvm-svn: 11882
2004-02-26 22:00:20 +00:00
Chris Lattner
28a0885929
No need to clear the map here, it will always be empty
...
llvm-svn: 11868
2004-02-26 05:21:21 +00:00
Alkis Evlogimenos
d8bace7f60
Add DenseMap template and actually use it for for mapping virtual regs
...
to objects.
llvm-svn: 11840
2004-02-25 21:55:45 +00:00
Alkis Evlogimenos
af2de4848e
Refactor rewinding code for finding the first terminator of a basic
...
block into MachineBasicBlock::getFirstTerminator().
This also fixes a bug in the implementation of the above in both
RegAllocLocal and InstrSched, where instructions where added after the
terminator if the basic block's only instruction was a terminator (it
shouldn't matter for RegAllocLocal since this case never occurs in
practice).
llvm-svn: 11748
2004-02-23 18:14:48 +00:00
Chris Lattner
19aef9e757
Another bug fix for empty MBB's
...
llvm-svn: 11716
2004-02-22 19:37:31 +00:00
Chris Lattner
84b406650e
Fix a bug where we were implicitly assuming that there would be at least
...
one terminator instruction in each basic block.
llvm-svn: 11714
2004-02-22 19:08:15 +00:00
Alkis Evlogimenos
334114bdf1
Make 'fold' statistic's description the same in both allocators.
...
llvm-svn: 11687
2004-02-21 18:07:33 +00:00
Chris Lattner
f5c5e1f458
Fix problem fusing spill code into instructions: we didn't update the live
...
variable information to take into account the change of instruction
address.
llvm-svn: 11628
2004-02-19 18:34:02 +00:00
Alkis Evlogimenos
d0a60b71fc
Rename reloads/spills to loads/stores.
...
llvm-svn: 11619
2004-02-19 06:19:09 +00:00
Chris Lattner
3d894dd3ab
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
4e21b2352c
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