[llvm-commits] CVS: llvm/lib/CodeGen/PrologEpilogInserter.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jan 25 14:13:00 PST 2007
Changes in directory llvm/lib/CodeGen:
PrologEpilogInserter.cpp updated: 1.66 -> 1.67
---
Log message:
Added a MRegisterInfo hook that tells PEI the target is responsible for
rounding the stack frame to a multiple of stack alignment.
---
Diffs of the changes: (+3 -2)
PrologEpilogInserter.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.66 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.67
--- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.66 Tue Jan 23 03:36:03 2007
+++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Thu Jan 25 16:12:41 2007
@@ -389,11 +389,12 @@
// Round up the size to a multiple of the alignment, but only if there are
// calls or alloca's in the function. This ensures that any calls to
// subroutines have their stack frames suitable aligned.
- if (FFI->hasCalls() || FFI->hasVarSizedObjects()) {
+ const MRegisterInfo *RegInfo = Fn.getTarget().getRegisterInfo();
+ if (!RegInfo->targetHandlesStackFrameRounding() &&
+ (FFI->hasCalls() || FFI->hasVarSizedObjects())) {
// When we have no frame pointer, we reserve argument space for call sites
// in the function immediately on entry to the current function. This
// eliminates the need for add/sub sp brackets around call sites.
- const MRegisterInfo *RegInfo = Fn.getTarget().getRegisterInfo();
if (!RegInfo->hasFP(Fn))
Offset += FFI->getMaxCallFrameSize();
More information about the llvm-commits
mailing list