[PATCH] [WinEH] Split blocks at calls to llvm.eh.begincatch.

Andy Kaylor andrew.kaylor at intel.com
Mon Apr 27 16:57:13 PDT 2015


Hi rnk, majnemer,

This patch introduces code to split basic blocks before calls to llvm.eh.begincatch (and any adjacent operands) in order to allow catch handlers and cleanup code to be more easily distinguished during later processing.

The patch also replaces all calls to BasicBlock::splitBasicBlock() with a call to llvm::SplitBlock() because the latter is able to preserve the DominatorTree whereas the former does not.  This causes a change in block names, because llvm::SplitBlock() doesn't provide a parameter to name the split block.  Obviously we could rename the block after SplitBlock returns, but that didn't seem necessary to me.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9311

Files:
  lib/CodeGen/WinEHPrepare.cpp
  test/CodeGen/WinEH/cppeh-demote-liveout.ll
  test/CodeGen/WinEH/cppeh-mixed-catch-and-cleanup.ll
  test/CodeGen/WinEH/cppeh-shared-empty-catch.ll
  test/CodeGen/WinEH/seh-catch-all.ll
  test/CodeGen/WinEH/seh-simple.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9311.24516.patch
Type: text/x-patch
Size: 17565 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150427/0d7bb2e0/attachment.bin>


More information about the llvm-commits mailing list