[all-commits] [llvm/llvm-project] 21ecc0: WebAssembly: Take the exception model from the mod...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Wed Sep 30 00:04:44 PDT 2026


  Branch: refs/heads/users/arsenm/wasm/eh-passes-read-exception-model-flag
  Home:   https://github.com/llvm/llvm-project
  Commit: 21ecc0ccc9c2ed96953383cbe9eece3d14637ded
      https://github.com/llvm/llvm-project/commit/21ecc0ccc9c2ed96953383cbe9eece3d14637ded
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    M llvm/lib/CodeGen/WasmEHPrepare.cpp
    M llvm/lib/Target/WebAssembly/WebAssembly.h
    M llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyCodeGenPassBuilder.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyExceptionInfo.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
    M llvm/lib/Transforms/Utils/LowerInvoke.cpp
    A llvm/test/CodeGen/WebAssembly/exception-model.ll
    A llvm/test/CodeGen/WebAssembly/wasm-eh-prepare-exception-model.ll
    M llvm/test/CodeGen/WebAssembly/wasm-eh-prepare.ll
    A llvm/test/Transforms/LowerInvoke/respect-exception-model-flag.ll

  Log Message:
  -----------
  WebAssembly: Take the exception model from the module flag

The WebAssembly EH passes chose whether and how to run from
MCAsmInfo::getExceptionHandlingType() and TargetOptions::ExceptionModel,
A module that asked for Wasm EH through the module flag alone would have
its invokes rewritten by LowerInvoke before WasmEHPrepare ran.

Schedule the passes unconditionally and read the module flag inside the
passes instead. Passes for other models can noop on the models they are
not intended for.

Co-authored-by: Claude Opus 5 <noreply at anthropic.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list