[all-commits] [llvm/llvm-project] 9f8b25: [WebAssembly] Ensure terminate pads are a single BB

Heejin Ahn via All-commits all-commits at lists.llvm.org
Mon Jan 11 17:59:01 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9f8b25769efa409ffc3b85f1c8043d2fcb4f185e
      https://github.com/llvm/llvm-project/commit/9f8b25769efa409ffc3b85f1c8043d2fcb4f185e
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2021-01-11 (Mon, 11 Jan 2021)

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

  Log Message:
  -----------
  [WebAssembly] Ensure terminate pads are a single BB

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.

Reviewed By: dschuff, tlively

Differential Revision: https://reviews.llvm.org/D94045




More information about the All-commits mailing list