[PATCH] D94045: [WebAssembly] Ensure terminate pads are a single BB

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 4 15:50:34 PST 2021


aheejin created this revision.
aheejin added reviewers: dschuff, tlively.
Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100.
aheejin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This ensures every single terminate pad is a single BB in the form of:

  %exn = catch $__cpp_exception
  call @__clang_call_terminate(%exn)
  unreachable

This is a preparation for HandleEHTerminatePads pass, which will be
added in a later CL and will run after CFGStackify. That pass duplicates
terminate pads with a `catch_all` instruction, and duplicating it
becomes simpler if we can ensure every terminate pad is a single BB.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94045

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyUtilities.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyUtilities.h
  llvm/test/CodeGen/WebAssembly/exception.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94045.314469.patch
Type: text/x-patch
Size: 10324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210104/f9fe03c5/attachment.bin>


More information about the llvm-commits mailing list