Commit Graph

9 Commits

Author SHA1 Message Date
David Greene be851acfb0 Make the MachineFunction argument of getFrameRegister const.
This also fixes a build error.

llvm-svn: 87027
2009-11-12 21:00:03 +00:00
Jim Grosbach fa14dd430c Add register-reuse to frame-index register scavenging. When a target uses
a virtual register to eliminate a frame index, it can return that register
and the constant stored there to PEI to track. When scavenging to allocate
for those registers, PEI then tracks the last-used register and value, and
if it is still available and matches the value for the next index, reuses
the existing value rather and removes the re-materialization instructions.
Fancier tracking and adjustment of scavenger allocations to keep more
values live for longer is possible, but not yet implemented and would likely
be better done via a different, less special-purpose, approach to the
problem.

eliminateFrameIndex() is modified so the target implementations can return
the registers they wish to be tracked for reuse.

ARM Thumb1 implements and utilizes the new mechanism. All other targets are
simply modified to adjust for the changed eliminateFrameIndex() prototype.

llvm-svn: 83467
2009-10-07 17:12:56 +00:00
Anton Korobeynikov 3db6283188 Fix fallout from 12-bit stuff landing: decide whether 20 bit displacements are needed during elimination of frame indexes.
llvm-svn: 75989
2009-07-16 14:09:56 +00:00
Anton Korobeynikov 432d4cd915 We already have reserved call frame regardless whether variable sized frame objects were present or not
llvm-svn: 75987
2009-07-16 14:09:04 +00:00
Anton Korobeynikov a2afc692f6 Implement asmprinting for odd-even regpairs
llvm-svn: 75974
2009-07-16 14:04:01 +00:00
Anton Korobeynikov 8695a30066 Emit callee-saved regs spills / restores
llvm-svn: 75943
2009-07-16 13:51:12 +00:00
Anton Korobeynikov d694b9ff8b Some preliminary call lowering
llvm-svn: 75941
2009-07-16 13:50:21 +00:00
Anton Korobeynikov 09890bd434 Add simple frame index elimination
llvm-svn: 75939
2009-07-16 13:49:25 +00:00
Anton Korobeynikov c334c28b3b Let's start another backend :)
llvm-svn: 75909
2009-07-16 13:27:25 +00:00