[PATCH] D96659: [WebAssembly] Add new relocation for location relative data

Yuta Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 23:52:57 PST 2021


kateinoigakukun added a comment.

In D96659#2572750 <https://reviews.llvm.org/D96659#2572750>, @aardappel wrote:

> This generally looks nice to me.. but my reservations on how useful this is beyond a singular use case still stand: https://github.com/WebAssembly/tool-conventions/issues/162

I couldn't come up with another use case. But without this reloc type, every frontend compiler using relative-ptr needs to work around this issue, so I think adding a new reloc type is meaningful. (I know only a few compilers are using relative-ptr, but ...)
And also, in my investigation, using relative-ptr makes Swift's binary size about 5% smaller than absolute-ptr one. Binary size is one of the most sensitive aspects in wasm binary, so we want to use relative ptr on wasm64.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96659/new/

https://reviews.llvm.org/D96659



More information about the llvm-commits mailing list