On 28/03/10 15:45, Carrot Wei wrote:
> Hi
> 
> The detailed description of the optimization is at
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43129. This is an ARM
> specific optimization.
> 
> 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?

The obvious place is machine-dependent reorg, which is a very late pass.

Andrew.

Reply via email to