[PATCH] D85062: [WebAssembly] GC constructor functions in otherwise unused archive objects
Dan Gohman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 30 20:39:41 PDT 2020
sunfish marked 3 inline comments as done.
sunfish added inline comments.
================
Comment at: lld/test/wasm/Inputs/ctor-start.s:6
+ .functype _start () -> ()
+ call usethis
+ end_function
----------------
sbc100 wrote:
> Extra spaces there and in other `.s` files?
These were tabs, because that's what LLVM emits. I've now changed them to single plain spaces.
================
Comment at: lld/wasm/MarkLive.cpp:62
+ InputFile *file = sym->getFile();
+ bool needInitFunctions = file && !file->isLive() && sym->isDefined();
+
----------------
sbc100 wrote:
> So here we are detecting the first time a given object is marked as live and then marking its init functions at that time.
>
> The guess this is inherently iterative since queuing the init functions creates more marking work?
Yes, it's iterative in the same way that the broader mark-and-sweep is iterative. When it sees an edge to something that's already live, it doesn't traverse that edge.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85062/new/
https://reviews.llvm.org/D85062
More information about the llvm-commits
mailing list