[PATCH] D81689: [WebAssembly] New-style command support
Dan Gohman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 13:08:21 PDT 2020
sunfish marked 6 inline comments as done.
sunfish added inline comments.
================
Comment at: lld/wasm/Driver.cpp:476
+ }
+ }
}
----------------
sbc100 wrote:
> Can we make this a separate change? Its seems pretty distinct.
Ok, I've removed it, and I'll submit it in a separate patch.
================
Comment at: lld/wasm/MarkLive.cpp:76
- }
- }
}
----------------
sbc100 wrote:
> Is this just a de-duplication with the code below? It is related to this change to independent?
I guess it is deduplication and possibly separable, but it's closely related to the rest of the patch.
Previously, when the input didn't have a `__wasm_call_ctors` call, we'd treat the init functions as dead code and delete them. With this patch, when the input doesn't have a `__wasm_call_ctors` call, we assume it's wasm-ld's job to insert `__wasm_call_ctors` calls. So it no longer makes sense to say "if `__wasm_call_ctors` is live then the init functions are live". The init functions are now just always live.
================
Comment at: lld/wasm/Writer.cpp:1190
+ WasmSym::callCtors->getName() != config->entry &&
+ !config->exportedSymbols.count(WasmSym::callCtors->getName())) {
+ log("-- createCommandExportWrappers");
----------------
sbc100 wrote:
> Can you replace these 2 lines with `WasmSym::callCtors->isExported()` ?
Done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81689/new/
https://reviews.llvm.org/D81689
More information about the llvm-commits
mailing list