This is the mail archive of the 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]

Re: Inconsistent initialization for pic_offset_table_rtx?

2016-02-09 18:45 GMT+03:00 Richard Earnshaw (lists) <>:
> On 09/02/16 14:56, Ilya Enkovich wrote:
>> I agree it looks inconsistent.  But I don't think PIC_OFFSET_TABLE_REGNUM is
>> supposed to return pseudo regno.  Using EBX_REG value for this macro was a
>> workaround for problem of NULL pic_offset_table_rtx usage in cost
>> functions. I think
>> we should try to initialize pic_offset_table_rtx with some pseudo
>> register in i386
>> target for cost estimation purposes and always return INVALID_REG for
> The ARM port has been using a pseudo for P_O_T_R for many years now.  It
> needs some care to establish it correctly in the prologue when needed,
> but otherwise works very well.  It means that leaf functions in
> particular can be made much more efficient as they can pick a
> call-clobbered register when that's desirable.

We may need it from middle-end when estimate statements cost.  So
initialization in
prologue is not enough (at least for i386 target).  Looks like those
cost estimation hooks
should take care of PIC register by themselves.


> R.
>> Thanks,
>> Ilya

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