[PATCH] D15630: [WinEH] Update LCSSA to handle catchswitch with handlers inside and outside a loop

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 16:41:50 PST 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.

When a try block occurs inside a loop with one catch handler that continues in the loop and another that exits the loop, the catchswitch instruction (which returns a token value) will be used by blocks inside and outside the loop.  This causes the LCSSA pass to want to create a PHI node in the block outside the loop to reference the catchswitch, but that isn't allowed.

This patch updates the LCSSA pass and the Loop::isLCSSAForm function to skip over token values.

Repository:
  rL LLVM

http://reviews.llvm.org/D15630

Files:
  lib/Analysis/LoopInfo.cpp
  lib/Transforms/Utils/LCSSA.cpp
  test/CodeGen/X86/catch-lcssa.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15630.43195.patch
Type: text/x-patch
Size: 6604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151218/6dc8cf78/attachment.bin>


More information about the llvm-commits mailing list