[PATCH] D14996: [WinEH] Avoid infinite loop in BranchFolding for multiple single block funclets

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 16:07:39 PST 2015


andrew.w.kaylor updated this revision to Diff 41688.
andrew.w.kaylor added a comment.

It turns out that there was a case I was overlooking.  It looks more or less like this:

BB1:

  call ; from invoke, handled by BB2 and BB3
  jmp BB4

BB2:

  ; EH pad

BB3:

  ; EH pad

BB4:

  ; whatever

We'd like BB1 to fall through to BB4 in this case.  To do that, we need to look past any EH pads to see if the opportunity is present.

Also, it appears that isEHFuncletEntry isn't reliable at this point for some reason but isEHPad is.


Repository:
  rL LLVM

http://reviews.llvm.org/D14996

Files:
  lib/CodeGen/BranchFolding.cpp
  test/Transforms/BranchFolding/single-block-funclets.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14996.41688.patch
Type: text/x-patch
Size: 4365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151203/6fb79805/attachment.bin>


More information about the llvm-commits mailing list