Add materialization of virtual base registers for frame indices allocated into

the local block. Resolve references to those indices to a new base register.
For simplification and testing purposes, a new virtual base register is
allocated for each frame index being resolved. The result is truly horrible,
but correct, code that's good for exercising the new code paths.

Next up is adding thumb1 support, which should be very simple. Following that
will be adding base register re-use and implementing a reasonable ARM
heuristic for when a virtual base register should be generated at all.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111315 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2010-08-17 22:41:55 +00:00
parent b9072fdaad
commit dc140c6e7b
5 changed files with 90 additions and 3 deletions

View File

@@ -560,7 +560,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
// check for whether the frame is large enough to want to use virtual
// frame index registers. Functions which don't want/need this optimization
// will continue to use the existing code path.
if (EnableLocalStackAlloc) {
if (EnableLocalStackAlloc && MFI->getLocalFrameSize()) {
unsigned Align = MFI->getLocalFrameMaxAlign();
// Adjust to alignment boundary.