Virtual method calls are overrated.
authorChris Lattner <sabre@nondot.org>
Thu, 12 Aug 2004 18:20:41 +0000 (18:20 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 12 Aug 2004 18:20:41 +0000 (18:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15694 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9BurgISel.cpp
lib/Target/SparcV9/SparcV9FrameInfo.cpp

index d837453e7bf03bb2578b49055ae56dafdca0cea0..3716edb625dd10ebe80391fba30f4343cceff7c9 100644 (file)
@@ -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
index 91b94883f692b237517b71f24f9e97fd6ffd6a33..6727aac29af6ce74b777be546aba6c1b199296be 100644 (file)
@@ -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;
 }