[PATCH] D15779: [ELF] - Implemented optimization for R_X86_64_GOTPCREL relocation.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 15:49:57 PST 2016


ruiu added a comment.

This is not a comment for this particular patch, but in general, pieces of code for code relaxation are scattered to many places -- you have multiple calls of canXXX and call optimizeXXX at some place. It tend to hard to understand. Each patch doesn't increase complexity that much, but when they accumulate, they look being entangled.

Can we separate code relaxation from relocation application? I think that we can create a function that visits all relocations and rewrite code and possibly relocations to relax code, and call that function before applying relocations. Then when we are applying relocations, we don't need to think about code relaxation at all. Anyway, I'd like to find some way to reduce complexity of relocation application.


http://reviews.llvm.org/D15779





More information about the llvm-commits mailing list