[llvm-commits] [llvm] r82750 - /llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h

Bob Wilson bob.wilson at apple.com
Fri Sep 25 00:30:55 CDT 2009

Author: bwilson
Date: Fri Sep 25 00:30:55 2009
New Revision: 82750

URL: http://llvm.org/viewvc/llvm-project?rev=82750&view=rev
Update the description of MachineFrameInfo's OffsetAdjustment.  The value of
this adjustment does not change the direction or the signs of the object
offsets, and the details of the offset calculations can be target-specific.
Also mention that for most targets this value is only used to generate debug


Modified: llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h?rev=82750&r1=82749&r2=82750&view=diff

--- llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFrameInfo.h Fri Sep 25 00:30:55 2009
@@ -133,11 +133,14 @@
   uint64_t StackSize;
   /// OffsetAdjustment - The amount that a frame offset needs to be adjusted to
-  /// have the actual offset from the stack/frame pointer.  The calculation is 
-  /// MFI->getObjectOffset(Index) + StackSize - TFI.getOffsetOfLocalArea() +
-  /// OffsetAdjustment.  If OffsetAdjustment is zero (default) then offsets are
-  /// away from TOS. If OffsetAdjustment == StackSize then offsets are toward
-  /// TOS.
+  /// have the actual offset from the stack/frame pointer.  The exact usage of
+  /// this is target-dependent, but it is typically used to adjust between
+  /// SP-relative and FP-relative offsets.  E.G., if objects are accessed via
+  /// SP then OffsetAdjustment is zero; if FP is used, OffsetAdjustment is set
+  /// to the distance between the initial SP and the value in FP.  For many
+  /// targets, this value is only used when generating debug info (via
+  /// TargetRegisterInfo::getFrameIndexOffset); when generating code, the
+  /// corresponding adjustments are performed directly.
   int OffsetAdjustment;
   /// MaxAlignment - The prolog/epilog code inserter may process objects 

More information about the llvm-commits mailing list