[PATCH] D11097: New EH representation for MSVC compatibility

David Majnemer david.majnemer at gmail.com
Wed Jul 22 09:41:52 PDT 2015

majnemer added inline comments.

Comment at: lib/IR/BasicBlock.cpp:337
@@ +336,3 @@
+bool BasicBlock::isSplittable() const {
+  return !isa<CatchEndPadInst>(getFirstNonPHI());
JosephTremoulet wrote:
> Surprised this is just CatchEndPad; don't CatchPad and TerminatePad have the same restrictions?
`CatchPad` can be split (for the purposes of `SplitBlockPredecessors`) by:

  # Creating a new BB
  # Cloning the `CatchPad` into the new BB
  # Moving relevant `PHI` nodes to the new BB
  # Hooking up relevant predecessors to unwind to the new BB

`TerminatePad` can be "split" using a similar mechanism.

The name of the function might need some work...


More information about the llvm-commits mailing list