1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

25 Commits

Author SHA1 Message Date
Gabor Greif
0d4f085232 eliminate all 80-col violations that I have introduced in my recent checkins (and some others more)
llvm-svn: 80304
2009-08-27 23:44:33 +00:00
Gabor Greif
cc8681cea3 Clean up the minor mess I caused with removing iterator.h. I shall take care of 80-col violations and the FIXME later. (Thanks goodness that I live in another continent, so the monkeypox did not strike me :-)
llvm-svn: 80224
2009-08-27 06:41:46 +00:00
Evan Cheng
3219c7fbe5 Part 1.
- Change register allocation hint to a pair of unsigned integers. The hint type is zero (which means prefer the register specified as second part of the pair) or entirely target dependent.
- Allow targets to specify alternative register allocation orders based on allocation hint.

Part 2.
- Use the register allocation hint system to implement more aggressive load / store multiple formation.
- Aggressively form LDRD / STRD. These are formed *before* register allocation. It has to be done this way to shorten live interval of base and offset registers. e.g.
v1025 = LDR v1024, 0
v1026 = LDR v1024, 0
=>
v1025,v1026 = LDRD v1024, 0

If this transformation isn't done before allocation, v1024 will overlap v1025 which means it more difficult to allocate a register pair.

- Even with the register allocation hint, it may not be possible to get the desired allocation. In that case, the post-allocation load / store multiple pass must fix the ldrd / strd instructions. They can either become ldm / stm instructions or back to a pair of ldr / str instructions.

This is work in progress, not yet enabled.

llvm-svn: 73381
2009-06-15 08:28:29 +00:00
Evan Cheng
1607bd1fa9 Move register allocation preference (or hint) from LiveInterval to MachineRegisterInfo. This allows more passes to set them.
llvm-svn: 73346
2009-06-14 20:22:55 +00:00
Dan Gohman
e1e53b379b Move MachineRegisterInfo::setRegClass out of line.
llvm-svn: 69126
2009-04-15 01:19:35 +00:00
Dan Gohman
ea82309aa7 Add empty() methods for register def lists.
llvm-svn: 61890
2009-01-07 22:28:56 +00:00
Dan Gohman
e4b1a93573 Move createVirtualRegister out-of-line.
llvm-svn: 60684
2008-12-08 04:54:11 +00:00
Evan Cheng
c4d1fb1435 Add a register class -> virtual registers map.
llvm-svn: 57844
2008-10-20 20:03:28 +00:00
Dan Gohman
680e1bd958 Enable rematerialization of constants using AliasAnalysis::pointsToConstantMemory,
and knowledge of PseudoSourceValues. This unfortunately isn't sufficient to allow
constants to be rematerialized in PIC mode -- the extra indirection is a
complication.

llvm-svn: 54000
2008-07-25 00:02:30 +00:00
Evan Cheng
968679913e Minor spiller tweak to unfavor reload into load/store instructions.
llvm-svn: 52477
2008-06-19 01:16:17 +00:00
Evan Cheng
e447be0532 Add MachineRegisterInfo::use_empty.
llvm-svn: 52451
2008-06-18 07:47:55 +00:00
Anton Korobeynikov
f77142326f For PR1338: rename include/llvm/ADT/ilist and friends to end with ".h"
llvm-svn: 51687
2008-05-29 17:41:17 +00:00
Evan Cheng
d9353009b7 Fix more -Wshorten-64-to-32 warnings.
llvm-svn: 50659
2008-05-05 18:30:58 +00:00
Chris Lattner
c7cc29f2a9 update comment.
llvm-svn: 49010
2008-04-01 00:54:39 +00:00
Anton Korobeynikov
0c5e186924 Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
llvm-svn: 47367
2008-02-20 11:08:44 +00:00
Evan Cheng
95894280dc Added debugging routine dumpUses.
llvm-svn: 47042
2008-02-13 02:45:38 +00:00
Dan Gohman
cabaec582f Rename MRegisterInfo to TargetRegisterInfo.
llvm-svn: 46930
2008-02-10 18:45:23 +00:00
Dan Gohman
522401f26e Add explicit keywords.
llvm-svn: 46506
2008-01-29 11:36:12 +00:00
Chris Lattner
d3a396668c provide def_* and use_* iterators in addition to reg_* iterators.
The first only returns definitions of a register, the second only
returns uses, the third returns both.

llvm-svn: 45803
2008-01-10 01:01:27 +00:00
Chris Lattner
6c74a2cbcb don't access element zero of an array of size zero.
llvm-svn: 45526
2008-01-03 01:25:31 +00:00
Chris Lattner
490a9681cb switch the register iterator to act more like hte LLVM value iterator: dereferencing
it now returns the machineinstr of the use.  To get the operand, use I.getOperand().

Add a new MachineRegisterInfo::replaceRegWith, which is basically like
Value::replaceAllUsesWith.

llvm-svn: 45482
2008-01-01 20:36:19 +00:00
Chris Lattner
7091807c2d Add a trivial but handy function to efficiently return the machine
instruction that defines the specified vreg.  Crazy.

llvm-svn: 45480
2008-01-01 03:07:29 +00:00
Chris Lattner
73f957d96f add efficient iteration support for register use/def's
within a machine function.

llvm-svn: 45479
2008-01-01 02:55:32 +00:00
Chris Lattner
39b56ec51b Implement automatically updated def/use lists for all MachineInstr register
operands.  The lists are currently kept in MachineRegisterInfo, but it does
not yet provide an iterator interface to them.

llvm-svn: 45477
2008-01-01 01:12:31 +00:00
Chris Lattner
96167aa93c Rename SSARegMap -> MachineRegisterInfo in keeping with the idea
that "machine" classes are used to represent the current state of
the code being compiled.  Given this expanded name, we can start 
moving other stuff into it.  For now, move the UsedPhysRegs and
LiveIn/LoveOuts vectors from MachineFunction into it.

Update all the clients to match.

This also reduces some needless #includes, such as MachineModuleInfo
from MachineFunction.

llvm-svn: 45467
2007-12-31 04:13:23 +00:00