diff options
author | Chris Lattner <sabre@nondot.org> | 2004-08-12 18:20:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-08-12 18:20:41 +0000 |
commit | df86f308152a44b6bbe804cb870738950b41dcef (patch) | |
tree | 946e9174daf05953388ac6d0455ee964982417bb /llvm/lib/Target/SparcV9 | |
parent | e64f008fe3740745e388034fb9463f74d1920923 (diff) | |
download | bcm5719-llvm-df86f308152a44b6bbe804cb870738950b41dcef.tar.gz bcm5719-llvm-df86f308152a44b6bbe804cb870738950b41dcef.zip |
Virtual method calls are overrated.
llvm-svn: 15694
Diffstat (limited to 'llvm/lib/Target/SparcV9')
-rw-r--r-- | llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp b/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp index d837453e7bf..3716edb625d 100644 --- a/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp +++ b/llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp @@ -2494,8 +2494,8 @@ static void CreateCodeForVariableSizeAlloca(const TargetMachine& target, numElementsVal->getType(), isValid); assert(isValid && "Unexpectedly large array dimension in alloca!"); int64_t total = numElem * tsize; - if (int extra= total % target.getFrameInfo()->getStackFrameSizeAlignment()) - total += target.getFrameInfo()->getStackFrameSizeAlignment() - extra; + if (int extra= total % SparcV9FrameInfo::StackFrameSizeAlignment) + total += SparcV9FrameInfo::StackFrameSizeAlignment - extra; totalSizeVal = ConstantSInt::get(Type::IntTy, total); } else { // The size is not a constant. Generate code to compute it and diff --git a/llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp b/llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp index 91b94883f69..6727aac29af 100644 --- a/llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp +++ b/llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp @@ -7,9 +7,7 @@ // //===----------------------------------------------------------------------===// // -// Interface to stack frame layout info for the UltraSPARC. Starting offsets -// for each area of the stack frame are aligned at a multiple of -// getStackFrameSizeAlignment(). +// Interface to stack frame layout info for the UltraSPARC. // //===----------------------------------------------------------------------===// @@ -57,9 +55,9 @@ SparcV9FrameInfo::getDynamicAreaOffset(MachineFunction& mcInfo, bool& pos) const // dynamic-size alloca. pos = false; unsigned optArgsSize = mcInfo.getInfo()->getMaxOptionalArgsSize(); - if (int extra = optArgsSize % getStackFrameSizeAlignment()) - optArgsSize += (getStackFrameSizeAlignment() - extra); + if (int extra = optArgsSize % 16) + optArgsSize += (16 - extra); int offset = optArgsSize + FirstOptionalOutgoingArgOffsetFromSP; - assert((offset - OFFSET) % getStackFrameSizeAlignment() == 0); + assert((offset - OFFSET) % 16 == 0); return offset; } |