[PATCH] D44313: [WebAssembly] Implement GC for imports

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 14 11:59:22 PDT 2018


ncw added inline comments.


================
Comment at: wasm/Symbols.cpp:68
+  // Assume any other kind of symbol is live (we don't track liveness for
+  // undefined data, or for synthetic data symbols with no InputSegment).
   return true;
----------------
sbc100 wrote:
> I think this was nicer how you had it before.  Why not just use a single bit on the symbol base class?  Especially since we are about to add undefined data to the final output.. we don't want to repeat the ImportLive again.
> 
> I also don't have a problem with the Live bit of a symbol mirroring the Live bit on the segment it points too, I think both concepts are useful.
> 
> For this kind of switch case, I think we are moving towards just using dyn_cast<>.
I know! But you can't please everyone... I pulled it out of Symbol and into the derived classes in order to try and please Rui's request to remove the Live bit from Symbol.

Would we all be happy to have an "ImportLive" bit in the Symbol base class?

(I used a switch just to avoid a six-way if chain...)


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44313





More information about the llvm-commits mailing list