forked from OSchip/llvm-project
667395f334
Note: I do not implement a base pointer, so it's still impossible to have dynamic realignment AND dynamic alloca in the same function. This also moves the code for determining the frame index reference into getFrameIndexReference, where it belongs, instead of inline in eliminateFrameIndex. [Begin long-winded screed] Now, stack realignment for Sparc is actually a silly thing to support, because the Sparc ABI has no need for it -- unlike the situation on x86, the stack is ALWAYS aligned to the required alignment for the CPU instructions: 8 bytes on sparcv8, and 16 bytes on sparcv9. However, LLVM unfortunately implements user-specified overalignment using stack realignment support, so for now, I'm going to go along with that tradition. GCC instead treats objects which have alignment specification greater than the maximum CPU-required alignment for the target as a separate block of stack memory, with their own virtual base pointer (which gets aligned). Doing it that way avoids needing to implement per-target support for stack realignment, except for the targets which *actually* have an ABI-specified stack alignment which is too small for the CPU's requirements. Further unfortunately in LLVM, the default canRealignStack for all targets effectively returns true, despite that implementing that is something a target needs to do specifically. So, the previous behavior on Sparc was to silently ignore the user's specified stack alignment. Ugh. Yet MORE unfortunate, if a target actually does return false from canRealignStack, that also causes the user-specified alignment to be *silently ignored*, rather than emitting an error. (I started looking into fixing that last, but it broke a bunch of tests, because LLVM actually *depends* on having it silently ignored: some architectures (e.g. non-linux i386) have smaller stack alignment than spilled-register alignment. But, the fact that a register needs spilling is not known until within the register allocator. And by that point, the decision to not reserve the frame pointer has been frozen in place. And without a frame pointer, stack realignment is not possible. So, canRealignStack() returns false, and needsStackRealignment() then returns false, assuming everyone can just go on their merry way assuming the alignment requirements were probably just suggestions after-all. Sigh...) Differential Revision: http://reviews.llvm.org/D12208 llvm-svn: 245668 |
||
---|---|---|
.. | ||
64abi.ll | ||
64bit.ll | ||
64cond.ll | ||
64spill.ll | ||
2006-01-22-BitConvertLegalize.ll | ||
2007-05-09-JumpTables.ll | ||
2007-07-05-LiveIntervalAssert.ll | ||
2008-10-10-InlineAsmMemoryOperand.ll | ||
2008-10-10-InlineAsmRegOperand.ll | ||
2009-08-28-PIC.ll | ||
2009-08-28-WeakLinkage.ll | ||
2011-01-11-CC.ll | ||
2011-01-11-Call.ll | ||
2011-01-11-FrameAddr.ll | ||
2011-01-19-DelaySlot.ll | ||
2011-01-21-ByValArgs.ll | ||
2011-01-22-SRet.ll | ||
2011-12-03-TailDuplication.ll | ||
2012-05-01-LowerArguments.ll | ||
2013-05-17-CallFrame.ll | ||
DbgValueOtherTargets.test | ||
atomics.ll | ||
basictest.ll | ||
blockaddr.ll | ||
constpool.ll | ||
ctpop.ll | ||
empty-functions.ll | ||
exception.ll | ||
float.ll | ||
fp128.ll | ||
globals.ll | ||
inlineasm.ll | ||
leafproc.ll | ||
lit.local.cfg | ||
mature-mc-support.ll | ||
missinglabel.ll | ||
mult-alt-generic-sparc.ll | ||
multiple-div.ll | ||
obj-relocs.ll | ||
parts.ll | ||
private.ll | ||
rem.ll | ||
reserved-regs.ll | ||
select-mask.ll | ||
setjmp.ll | ||
spill.ll | ||
spillsize.ll | ||
sret-secondary.ll | ||
stack-align.ll | ||
tls.ll | ||
trap.ll | ||
varargs.ll |