[PATCH] D45904: [CodeExtractor] Allow extracting blocks with exception handling

Sergey Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 20 14:03:29 PDT 2018


sdmitriev created this revision.
Herald added subscribers: llvm-commits, eraman.

This is a CodeExtractor improvement which adds support for extracting blocks which have exception handling constructs if that is legal to do. CodeExtractor performs validation checks to ensure that extraction is legal when it finds invoke instructions or EH pads (landingpad, catchswitch, or cleanuppad) in blocks to be extracted.

I have also added an option to allow extraction of blocks with alloca instructions, but no validation is done for allocas. CodeExtractor caller has to validate it himself before allowing alloca instructions to be extracted. By default allocas are still not allowed in extraction blocks.


Repository:
  rL LLVM

https://reviews.llvm.org/D45904

Files:
  include/llvm/Transforms/Utils/CodeExtractor.h
  lib/Transforms/Utils/CodeExtractor.cpp
  test/Transforms/CodeExtractor/inline_eh.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45904.143380.patch
Type: text/x-patch
Size: 10588 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180420/0a0b8ccd/attachment.bin>


More information about the llvm-commits mailing list