On Thu, Apr 1, 2010 at 8:10 PM, Andrew Haley <a...@redhat.com> wrote:
> 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.

Yes, and after register allocation, i.e. too late for Guozhi.

Basically there is no place right now to stuff a pass like that.
Question is: Is this optimization really, reallyreallyreally so target
specific that a target-independent pass is not the better option?

Ciao!
Steven

Reply via email to