[all-commits] [llvm/llvm-project] 35f5f7: [WebAssemblly] Fix rethrow's argument computation
Heejin Ahn via All-commits
all-commits at lists.llvm.org
Sat Feb 13 03:43:47 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 35f5f797a616c0eb8d6ae23ca24e3b80d3e3efdf
https://github.com/llvm/llvm-project/commit/35f5f797a616c0eb8d6ae23ca24e3b80d3e3efdf
Author: Heejin Ahn <aheejin at gmail.com>
Date: 2021-02-13 (Sat, 13 Feb 2021)
Changed paths:
M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.cpp
M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.h
M llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td
M llvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll
M llvm/test/CodeGen/WebAssembly/exception.mir
Log Message:
-----------
[WebAssemblly] Fix rethrow's argument computation
Previously we assumed `rethrow`'s argument was always 0, but it turned
out `rethrow` follows the same rule with `br` or `delegate`:
https://github.com/WebAssembly/exception-handling/pull/137
https://github.com/WebAssembly/exception-handling/issues/146#issuecomment-777349038
Currently `rethrow`s generated by our backend always rethrow the
exception caught by the innermost enclosing catch, so this adds a
function to compute that and replaces `rethrow`'s argument with its
computed result.
This also renames `EHPadStack` in `InstPrinter` to `TryStack`, because
in CFGStackify we use `EHPadStack` to mean the range between
`catch`~`end`, while in `InstPrinter` we used it to mean the range
between `try`~`catch`, so choosing different names would look clearer.
Doesn't contain any functional changes in `InstPrinter`.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D96595
More information about the All-commits
mailing list