[PATCH] D14614: [WinEH] Find root frame correctly in CLR funclets

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 06:58:21 PST 2015


JosephTremoulet created this revision.
JosephTremoulet added reviewers: rnk, majnemer, AndyAyers, pgavlin.
JosephTremoulet added a subscriber: llvm-commits.

The value that the CoreCLR personality passes to a funclet for the
establisher frame may be the root function's frame or may be the parent
funclet's (mostly empty) frame in the case of nested funclets.  Each
funclet stores a pointer to the root frame in its own (mostly empty)
frame, as does the root function itself.  All frames allocate this slot at
the same offset, measured from the post-prolog stack pointer, so that the
same sequence can accept any ancestor as an establisher frame parameter
value, and so that a single offset can be reported to the GC, which also
looks at this slot.

This change allocate the slot when processing function entry, and records
its frame index on the WinEHFuncInfo object, then inserts the code to
set/copy it during prolog emission.


http://reviews.llvm.org/D14614

Files:
  include/llvm/CodeGen/WinEHFuncInfo.h
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86FrameLowering.h
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/WinEH/wineh-coreclr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14614.40045.patch
Type: text/x-patch
Size: 12629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151112/03a3fea4/attachment.bin>


More information about the llvm-commits mailing list