llvm-project/llvm/test/CodeGen/MIR/Generic
Reid Kleckner 9ea2c01264 [codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_REL
Summary:
Before this change, LLVM would always describe locals on the stack as
being relative to some specific register, RSP, ESP, EBP, ESI, etc.
Variables in stack memory are pretty common, so there is a special
S_DEFRANGE_FRAMEPOINTER_REL symbol for them. This change uses it to
reduce the size of our debug info.

On top of the size savings, there are cases on 32-bit x86 where local
variables are addressed from ESP, but ESP changes across the function.
Unlike in DWARF, there is no FPO data to describe the stack adjustments
made to push arguments onto the stack and pop them off after the call,
which makes it hard for the debugger to find the local variables in
frames further up the stack.

To handle this, CodeView has a special VFRAME register, which
corresponds to the $T0 variable set by our FPO data in 32-bit.  Offsets
to local variables are instead relative to this value.

This is part of PR38857.

Reviewers: hans, zturner, javed.absar

Subscribers: aprantl, hiraditya, JDevlieghere, llvm-commits

Differential Revision: https://reviews.llvm.org/D52217

llvm-svn: 343543
2018-10-01 21:59:45 +00:00
..
basic-blocks.mir
expected-colon-after-basic-block.mir
expected-mbb-reference-for-successor-mbb.mir
frame-info.mir [codeview] Emit S_FRAMEPROC and use S_DEFRANGE_FRAMEPOINTER_REL 2018-10-01 21:59:45 +00:00
global-isel-properties.mir
invalid-jump-table-kind.mir
lit.local.cfg
llvm-ir-error-reported.mir
llvmIR.mir
llvmIRMissing.mir
machine-basic-block-ir-block-reference.mir
machine-basic-block-redefinition-error.mir
machine-basic-block-undefined-ir-block.mir
machine-basic-block-unknown-name.mir
machine-function-missing-body.mir
machine-function-missing-function.mir
machine-function-missing-name.mir
machine-function-redefinition-error.mir
machine-function.mir
multiRunPass.mir
parse-integer-true-false.mir
register-info.mir
runPass.mir