[PATCH] D19995: Optimize access to global variable references in PIE mode when linker supports copy relocations for PIE
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri May 6 13:36:17 PDT 2016
rnk added a comment.
In http://reviews.llvm.org/D19995#423773, @joerg wrote:
> This looks like a huge step in the wrong direction to me. Copy relocations are one of the worst misfeatures of ELF. Please do not add any new dependencies.
I don't see any other way for us to regain the performance that copy relocations give us. If you have other ideas, we're open to them.
> That said, if the original motivation is simplifying access to variables of the main program (not in shared libraries), the linker can already optimize them.
I'm assuming you mean it can turn the GOT load into an RIP-relative lea, thereby saving a load? That still creates unnecessary register pressure. Sri can say more, but I think it is actually important for some of our applications (compression) to save the lea and reduce register pressure.
http://reviews.llvm.org/D19995
More information about the llvm-commits
mailing list