[PATCH] D50653: [WebAssembly] Add isEHScopeReturn instruction property

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 11:28:14 PDT 2018


aheejin created this revision.
aheejin added reviewers: dschuff, majnemer.
Herald added subscribers: llvm-commits, sunfish, jgravelle-google, sbc100.

So far, `isReturn` property is used to mean both a return instruction
from a functon and the end of an EH scope, a scope that starts with a EH
scope entry BB and ends with a catchret or a cleanupret instruction.
Because WinEH uses funclets, all EH-scope-ending instructions are also
real return instruction from a function. But for wasm, they only serve
as the end marker of an EH scope but not a return instruction that
exits a function. This mismatch caused incorrect prolog and epilog
generation in wasm EH scopes. This patch fixes this.

This patch is in the same vein with https://reviews.llvm.org/rL333045, which splits
`MachineBasicBlock::isEHFuncletEntry` into `isEHFuncletEntry` and
`isEHScopeEntry`.


Repository:
  rL LLVM

https://reviews.llvm.org/D50653

Files:
  include/llvm/CodeGen/MachineBasicBlock.h
  include/llvm/CodeGen/MachineInstr.h
  include/llvm/MC/MCInstrDesc.h
  include/llvm/Target/Target.td
  lib/CodeGen/Analysis.cpp
  lib/Target/WebAssembly/WebAssemblyInstrControl.td
  lib/Target/X86/X86InstrCompiler.td
  test/CodeGen/WebAssembly/exception.ll
  utils/TableGen/CodeGenInstruction.cpp
  utils/TableGen/CodeGenInstruction.h
  utils/TableGen/InstrDocsEmitter.cpp
  utils/TableGen/InstrInfoEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50653.160408.patch
Type: text/x-patch
Size: 9088 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180813/79902bd5/attachment.bin>


More information about the llvm-commits mailing list