This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 7/7] ira.c validate_equiv_mem
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: Alan Modra <amodra at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 23 Mar 2016 01:03:18 +0100
- Subject: Re: [PATCH 7/7] ira.c validate_equiv_mem
- Authentication-results: sourceware.org; auth=none
- References: <20160321013723 dot GC22605 at bubble dot grove dot modra dot org> <20160321014311 dot GJ22605 at bubble dot grove dot modra dot org>
On 03/21/2016 02:43 AM, Alan Modra wrote:
+enum valid_equiv { valid_none, valid_combine, valid_reload };
+
Might be worth documenting that each step represents a superset of the
previous one.
+ ret = valid_combine;
+ if (! MEM_READONLY_P (memref)
+ && ! RTL_CONST_OR_PURE_CALL_P (insn))
+ return valid_none;
+ }
The gcc style is actually not to have a space after unary "!". None of
the code in this file follows that, but I think you may want to change
that as you modify things in your patches, and have new code follow the
recommended style.
@@ -3536,7 +3557,8 @@ update_equiv_regs (void)
{
/* Note that the statement below does not affect the priority
in local-alloc! */
- REG_LIVE_LENGTH (regno) *= 2;
+ if (note)
+ REG_LIVE_LENGTH (regno) *= 2;
That's a very suspicious comment. It would be worth testing whether
REG_LIVE_LENGTH has any effect on our current register allocation at
all, and remove this code if not.
Otherwise looks good for stage 1.
Bernd