This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lra] Cleanup the use of offmemok and don't count spilling cost for it
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>, gcc-patches at gcc dot gnu dot org
- Cc: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>, vogt at linux dot vnet dot ibm dot com, Jeff Law <law at redhat dot com>, Vladimir N Makarov <vmakarov at redhat dot com>, Robin Dapp <rdapp at linux dot vnet dot ibm dot com>
- Date: Mon, 4 Jul 2016 15:12:13 +0200
- Subject: Re: [lra] Cleanup the use of offmemok and don't count spilling cost for it
- Authentication-results: sourceware.org; auth=none
- References: <cfd17ab9-b740-6516-6212-41361177a8a5@foss.arm.com> <0d4316cc-8ee3-b5cc-9c26-50365ff82201@redhat.com> <20160627162614.GA30612@linux.vnet.ibm.com> <4f0aadf8-f12e-4ef3-c4d5-c97e31a89b87@foss.arm.com> <bcc5bf63-6d5d-3516-221d-33276fe5ae71@foss.arm.com> <f5afe3a5-aa9b-9aa5-33ef-299298f21a27@foss.arm.com> <57737646.30704@linux.vnet.ibm.com> <n99oa6jisu6.fsf@foss.arm.com> <8c973240-26b0-d58b-555e-512d4503522e@foss.arm.com>
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