summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-09-25 05:30:55 +0000
committerBob Wilson <bob.wilson@apple.com>2009-09-25 05:30:55 +0000
commit6263778d2cf4afb6e71ccab5bd5f1c3c2e42c65a (patch)
tree5476992fc4db10a7243ffca401ae20f5d6c81533 /include
parent6acaaa8f32a52772952c2171ad8ee1f7a896a1c9 (diff)
downloadllvm-6263778d2cf4afb6e71ccab5bd5f1c3c2e42c65a.tar.gz
llvm-6263778d2cf4afb6e71ccab5bd5f1c3c2e42c65a.tar.bz2
llvm-6263778d2cf4afb6e71ccab5bd5f1c3c2e42c65a.tar.xz
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 info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineFrameInfo.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/MachineFrameInfo.h b/include/llvm/CodeGen/MachineFrameInfo.h
index 05ab49961d..b5479ba09f 100644
--- a/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/include/llvm/CodeGen/MachineFrameInfo.h
@@ -133,11 +133,14 @@ class MachineFrameInfo {
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