[PATCH] D37333: [ELF, draft] - Combine GOTPLT and GOT slots.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 14:09:59 PDT 2017


ruiu added a comment.

When you attempt to implement a documented ABI, please include a reference to the ABI. It seems you are implementing this: https://github.com/hjl-tools/x86-psABI/blob/68edce4f22070cc83ebc4a5df4b74222300dd24d/linker-optimization.tex

So, IIUC, this optimization aims to reduce the number of relocations for an interruptible function from 2 to 1. I'm skeptical if that makes some noticeable difference in performance because .got.plt isn't usually that big, and processing relocations is usually fast. IIRC, in lld (modulo the difference between static and dynamic linkers), we can process millions of relocations in a few seconds, so that's not slow at least.

We don't have to implement all optimizations that the ABI defines. We instead want to implement some of them that have non-marginal performance improvement. You presumably could see a difference in performance in a benchmark for the sake of benchmark, but my feeling is that I don't want to implement it unless someone comes to us with some numbers such as "we want to use this optimization because it makes our application starts up XX% faster" or something like that.

So, what is the motivation of implementing it? If it is because the ABI defines it, I don't think I'm convinced that we want it.


https://reviews.llvm.org/D37333





More information about the llvm-commits mailing list