[PATCH, IRA]: Fix PR 48927 - Issues with "enable" attribute and IRA register preferences

Vladimir Makarov vmakarov@redhat.com
Tue May 10 19:01:00 GMT 2011


On 05/08/2011 03:39 PM, Uros Bizjak wrote:
> Hello!
>
> Attached patch fixes changed register allocation where "enabled"
> attribute is used. The core of the problem was with IRA, where IRA
> does not look at "enabled" attribute when scanning through
> alternatives string to perform various tasks (including register
> allocation preferences).
>
> Attached patch teaches IRA to handle "enabled" attribute. In effect,
> the patch skips current alternative in the same way as when "#"
> character is found.
>
> 2011-05-08  Uros Bizjak<ubizjak@gmail.com>
>
> 	PR rtl-optimization/48927
> 	* ira-conflicts.c (commutative_constraint_p): Use
> 	recog_data.alternative_enabled_p to disable alternatives where
> 	"enabled" attribute is false.
> 	(get_dup_num): Ditto.
> 	* ira-lives.c (single_reg_class): Ditto.
> 	(ira_implicitly_set_insn_hard_regs): Ditto.
>
> Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
> {,-m32} with and without -with-fpmath=avx. Also, the patch fixes both
> i386 scan-asm failures when the patch to merge *vec_concatv4si_1_avx
> and *vec_concatv4si_1 patterns is applied (please see the PR [1] for
> details).
>
> OK for mainline?
>
> [1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48927
>
It is ok for me too, Uros.  Sorry for the delay with the answer -- I was 
on vacation last week.

Attribute enabled is more and more actively used and I should check 
other places in IRA where the attribute should be checked.  Fortunately, 
ira-costs.c already uses it (it is most critical place).  Otherwise, we 
could have a very bad performance code.

Thanks for working on this.



More information about the Gcc-patches mailing list