[PATCH] D53383: [PowerPC] Make no-PIC default to match GCC - LLVM

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 25 13:06:48 PDT 2018


stefanp added a comment.

@joerg 
When you say that we produce quite bad position dependent code do you mean in terms of performance or in terms of correctness? At this point I have not seen any issues with the no-PIC code.  If you have an example of this bad code please share the test case.
Also, changing the default option to no-PIC does not mean that everything we do will become no-PIC. For example, the way that the TOC is handled on PPC remains position independent. However, going from PIC to no-PIC does offer a number of opportunities (for example in in-lining). 
With respect to PIE I'm not sure what the difference is between PIE and static relocation models in terms of code generation. Is there any reason why you would prefer PIE in this case? Do you have an example that shows it to be better than say no-PIC?

@jedilyn 
You are correct that PIC is the only model on AIX. However, the object model (COFF) on AIX is different so the idea of PIC / no-PIC does not mean the same thing it does on Linux anyway. Also AIX is currently not supported for LLVM. If we decide to support it we can look at the options then. However, since AIX only uses one object model and there is no PIC/ no-PIC difference we will probably just end up ignoring the option anyway.


https://reviews.llvm.org/D53383





More information about the llvm-commits mailing list