[PATCH] D13774: [CodeGen] Mark setjmp/catchret MBBs address-taken

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 08:09:28 PDT 2015


JosephTremoulet created this revision.
JosephTremoulet added reviewers: rnk, majnemer, andrew.w.kaylor.
JosephTremoulet added subscribers: llvm-commits, pgavlin.

This ensures that BranchFolding (and similar) won't remove these blocks.

Also allow AsmPrinter::EmitBasicBlockStart to process MBBs which are
address-taken but do not have BBs that are address-taken, since otherwise
its call to getAddrLabelSymbolTableToEmit would fail an assertion on such
blocks.  I audited the other callers of getAddrLabelSymbolTableToEmit
(and getAddrLabelSymbol); they all have BBs known to be address-taken
except for the call through getAddrLabelSymbol from
WinException::create32bitRef; that call is actually now unreachable, so
I've removed it and updated the signature of create32bitRef.

This fixes PR25168.

http://reviews.llvm.org/D13774

Files:
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/AsmPrinter/WinException.cpp
  lib/CodeGen/AsmPrinter/WinException.h
  lib/Target/X86/X86FrameLowering.cpp
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/late-address-taken.ll
  test/CodeGen/X86/win-catchpad-csrs.ll
  test/CodeGen/X86/win-catchpad.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13774.37486.patch
Type: text/x-patch
Size: 7782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151015/d1322cec/attachment.bin>


More information about the llvm-commits mailing list