Commit Graph

12 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 43a87501b3 Tell the register allocator about new unused virtual registers.
This allows the allocator to free any resources used by the virtual register,
including physical register assignments.

llvm-svn: 127560
2011-03-13 01:23:11 +00:00
Jakob Stoklund Olesen 8e089640e0 Add a LiveRangeEdit::Delegate protocol.
This will we used for keeping register allocator data structures up to date
while LiveRangeEdit is trimming live intervals.

llvm-svn: 127300
2011-03-09 00:57:29 +00:00
Jakob Stoklund Olesen ea5ebfed15 Delete dead code after rematerializing.
LiveRangeEdit::eliminateDeadDefs() will eventually be used by coalescing,
splitting, and spilling for dead code elimination. It can delete chains of dead
instructions as long as there are no dependency loops.

llvm-svn: 127287
2011-03-08 22:46:11 +00:00
Jakob Stoklund Olesen 27f942fa60 Make the UselessRegs argument optional in the LiveRangeEdit constructor.
llvm-svn: 127181
2011-03-07 22:42:16 +00:00
Jakob Stoklund Olesen 13eb3650b0 This method belonged in VirtRegMap.
llvm-svn: 126002
2011-02-19 00:38:43 +00:00
Jakob Stoklund Olesen 4376d67b6f Use VirtRegMap's Virt2SplitMap to keep track of the original live range before splitting.
All new virtual registers created for spilling or splitting point back to their original.

llvm-svn: 125980
2011-02-18 22:35:20 +00:00
Jakob Stoklund Olesen de5c4dc24b Simplify the LiveRangeEdit::canRematerializeAt() interface a bit.
llvm-svn: 118661
2010-11-10 01:05:12 +00:00
Jakob Stoklund Olesen ba9a4985a2 Don't assign new registers created during a split to the same stack slot, but
give them individual stack slots once the are actually spilled.

llvm-svn: 117945
2010-11-01 19:49:57 +00:00
Jakob Stoklund Olesen a3b61d32d8 Remember to keep track of rematted values.
llvm-svn: 116962
2010-10-20 22:50:42 +00:00
Jakob Stoklund Olesen 2edaa2fb24 Move some of the InlineSpiller rematerialization code into LiveRangeEdit.
llvm-svn: 116951
2010-10-20 22:00:51 +00:00
Jakob Stoklund Olesen 0f3e98ce2e Move stack slot assignments into LiveRangeEdit.
All registers created during splitting or spilling are assigned to the same
stack slot as the parent register.

When splitting or rematting, we may not spill at all. In that case the stack
slot is still assigned, but it will be dead.

llvm-svn: 116546
2010-10-15 00:16:55 +00:00
Jakob Stoklund Olesen 72911e49fa Create a new LiveRangeEdit class to keep track of the new registers created when
splitting or spillling, and to help with rematerialization.

Use LiveRangeEdit in InlineSpiller and SplitKit. This will eventually make it
possible to share remat code between InlineSpiller and SplitKit.

llvm-svn: 116543
2010-10-14 23:49:52 +00:00