[PATCH] D41315: [WebAssembly] Output functions individually

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 10:22:54 PST 2018


sbc100 added inline comments.


================
Comment at: wasm/InputFunction.h:35
+
+  uint32_t getSize() const { return 0; }
+  uint32_t getOutputIndex() const { return OutputIndex.getValue(); };
----------------
ruiu wrote:
> IIUC, since wasm functions don't exist in the regular virtual address space, it is always considered zero in size. Defining this function seems a bit pointless to me because functions don't have the notion of "size" at all in webassembly. Can you remove this function?
removed getSize()




================
Comment at: wasm/InputFunction.h:46
+  const WasmFunction &Function;
+  int32_t OutputOffset = 0;
+  std::vector<WasmRelocation> Relocations;
----------------
ruiu wrote:
> Not sure if I understand this, but is `Offset` a correct term for wasm functions? I think functions have indices, but they don't have output offsets in a normal sense (because they do not exist in the regular address space).
This is the offset of the bytes for this function withing the output CODE section.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D41315





More information about the llvm-commits mailing list