[PATCH] D137295: WebAssembly: Remove MachineFunction reference from MFI
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 2 21:37:14 PDT 2022
aheejin added a comment.
It's been a while and I don't remember why I put a pointer to`MF` as a member in `WebAssemblyFunctionInfo`, but if things work without it, it should be fine.
I think the reason I put `WasmEHInfo` in `MachineFunction` is, Wasm is not only a target but an exception mode <https://github.com/llvm/llvm-project/blob/8cdee2eadabfaada866a69ed7d0eda96b9567465/llvm/include/llvm/MC/MCTargetOptions.h#L25> (even though it is only being used by WebAssembly target), and also WinEHInfo <https://github.com/llvm/llvm-project/blob/8cdee2eadabfaada866a69ed7d0eda96b9567465/llvm/include/llvm/CodeGen/MachineFunction.h#L287-L289>, which contains info for WinEH EH mode, is there too.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp:31
const {
- WebAssemblyFunctionInfo *Clone =
- DestMF.cloneInfo<WebAssemblyFunctionInfo>(*this);
- Clone->MF = &DestMF;
- return Clone;
+ // FIXME: This is broken if WasmEHFuncInfo from the block references.
+ return DestMF.cloneInfo<WebAssemblyFunctionInfo>(*this);
----------------
What does this mean by "if WasmEHFuncInfo from the block reference"?
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.cpp:161
+
+ // FIXME: This link should be removed
+ if (WasmEHFuncInfo *WasmEHInfo = MF.getWasmEHFuncInfo()) {
----------------
Why? Which link?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137295/new/
https://reviews.llvm.org/D137295
More information about the llvm-commits
mailing list