This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/43129] Simplify global variable's address loading with option -fpic



------- Comment #1 from carrot at google dot com  2010-03-16 06:23 -------
This optimization uses one less register (the register hold the GOT base), to
get this beneficial the ideal place for it should be before register
allocation.

Usually expand pass generates instructions to load global variable's address
from GOT entry for each access of the global variable. Later cse/gcse passes
can remove many of them. In order to precisely model the cost, this
optimization should be put after some cse/gcse passes.

So what is the best place for this optimization? Is there any existed pass can
be enhanced with this optimization? Or should I add a new pass?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43129


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]