[PATCH] D40738: Don't use Wasm function sections for more than one function

Dan Gohman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 1 10:55:26 PST 2017


sunfish accepted this revision.
sunfish added a comment.
This revision is now accepted and ready to land.

I think that was copied from LinuxTargetInfo before we figured out our current object file strategy. On native platforms, it's an icache optimization, because startup functions are all called around the same time, and then never used again. However, this doesn't really apply to WebAssembly. It is possible that WebAssembly may eventually want to put everything called during startup at the beginning, so that clever browser engines can start running code even before the whole module is downloaded, however the optimization here wouldn't be sufficient. So this change looks good.


Repository:
  rC Clang

https://reviews.llvm.org/D40738





More information about the cfe-commits mailing list