[PATCH] D12434: [WinEH] Teach SimplfyCFG to eliminate empty cleanup pads.

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 09:01:15 PDT 2015


andrew.w.kaylor created this revision.
andrew.w.kaylor added reviewers: majnemer, rnk, JosephTremoulet.
andrew.w.kaylor added a subscriber: llvm-commits.
andrew.w.kaylor set the repository for this revision to rL LLVM.

These changes introduce a new routine in SimplifyCFG to eliminate trivially empty cleanup pads from the exception handling chain.

There are a couple of places where it seemed like this could benefit from refactoring, but it seemed best for review purposes to simply note that and follow up after discussion of the basic implementation.

I also am making no attempt to handle PHI nodes.  It seems unlikely that anything would put a PHI node at the top of an empty cleanup pad, but I don't know of anything that prevents it.  This may need to be addressed later.  Similarly, I think it's possible, but unlikely, for a lifetime intrinsic to appear in an otherwise empty cleanup pad.

Repository:
  rL LLVM

http://reviews.llvm.org/D12434

Files:
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/Transforms/SimplifyCFG/empty-cleanuppad.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12434.33431.patch
Type: text/x-patch
Size: 18529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150828/496bae7f/attachment.bin>


More information about the llvm-commits mailing list