[PATCH] D44301: [WebAssembly] Add missing --demangle and --initial/max-memory args

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 9 15:28:09 PST 2018


sbc100 added a comment.

I think perhaps we should just drop the max-memory flag completely?  At least until we know they its needed.  emscripten doesn't need it and nor does the wasm waterfall.



================
Comment at: wasm/Writer.cpp:120
   uint32_t NumMemoryPages = 0;
+  uint32_t MaxMemoryPages = UINT32_MAX;
 
----------------
I'm OK with 0 meaning no max.  Especially if i means you can avoid adding an duplicate getInteger helper for options?

TBH, I'm torn about weather to just remove this option though.  Do you know of any users who what to set a max? 


================
Comment at: wasm/Writer.cpp:618
+  if (MemoryPtr < Config->InitialMemory)
+    MemoryPtr = Config->InitialMemory;
   uint32_t MemSize = alignTo(MemoryPtr, WasmPageSize);
----------------
Should probably error out if InitialMemory is not enough, rather than just making it bigger.

Also, should we have have these value specific in page size?

If not we should error out if user specified a non-aligned value (like we do for StackSize).



Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44301





More information about the llvm-commits mailing list