[all-commits] [llvm/llvm-project] 1a3e23: WebAssembly: Stop changing MCAsmInfo's ExceptionsT...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Wed Jul 2 16:18:42 PDT 2025
Branch: refs/heads/users/arsenm/webassembly/stop-overwriting-mcasminfo-exceptions-type
Home: https://github.com/llvm/llvm-project
Commit: 1a3e23f72ac94179afc5ec183d3acf711f15ef7a
https://github.com/llvm/llvm-project/commit/1a3e23f72ac94179afc5ec183d3acf711f15ef7a
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2025-07-03 (Thu, 03 Jul 2025)
Changed paths:
M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp
M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp
M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h
M llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.h
M llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
M llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.h
Log Message:
-----------
WebAssembly: Stop changing MCAsmInfo's ExceptionsType based on flags
Currently wasm adds an extra level of options that work backwards
from the standard options, and overwrites them. The ExceptionModel
field in TM->Options is the standard user configuration option for the
exception model to use. MCAsmInfo's ExceptionsType is a constant for the
default to use for the triple if not explicitly set in the TargetOptions
ExceptionModel. This was adding 2 custom flags, changing the MCAsmInfo
default, and overwriting the ExceptionModel from the custom flags.
These comments about compiling bitcode with clang are describing a toolchain
bug or user error. TargetOptions is bad, and we should move to eliminating it.
It is module state not captured in the IR. Ideally the exception model should either
come implied from the triple, or a module flag and not depend on this side state.
Currently it is the responsibility of the toolchain and/or user to ensure the same
command line flags are used at each phase of the compilation. It is not the backend's
responsibilty to try to second guess these options.
-wasm-enable-eh and -wasm-enable-sjlj should also be removed in favor of the standard
exception control. I'm a bit confused by how all of these fields are supposed to interact,
but there are a few uses in the backend that are directly looking at these flags instead
of the already parsed ExceptionModel which need to be cleaned up.
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