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

Re: [lra] Cleanup the use of offmemok and don't count spilling cost for it


On 06/30/2016 07:24 PM, Jiong Wang wrote:
From my understanding, "offmemok" is used to represent a memory operand
who's address we want to reload, and searching of it's reference location
seems confirmed my understanding as it's always used together with MEM_P
check.

So this patch does the following modifications:

  * Only set offmemok to true if MEM_P is also true, as otherwise offmemok
    is not used.
>   * Remove redundant MEM_P check which was used together with offmemok.

I really dislike this part. The various _ok variables say what is acceptable - the type of the operand doesn't really factor into that. I think the code becomes more confusing when merging the two.

  * Avoid the addition of spilling cost if offmemok be true as an address
    calculation reload is not spilling.

This part seems to be plausible. I am however unclear how this would fix the ICE (if it does - Andreas?) since it only seems to modify cost computations. What exactly is preventing the correct sequence of events (reloading the address) from triggering without this patch?


Bernd


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