[LLVMdev] gp/GOT

Reed Kotler rkotler at mips.com
Sat Oct 29 14:18:52 PDT 2011

Regarding MIPS PIC code:

Currently the MIPS compiler loads gp at the beginning of a function even 
if it never needs it.
Similarly it reloads gp after function calls even if it is never used again.

I need to check if in the function there are any variable references 
using the GOT.

Is there any magic function or variable that will tell me this answer 
beyond just me going through all the IR for the function?



More information about the llvm-dev mailing list