[RFC] Fix PR rtl-optimization/54315 (partially)

Eric Botcazou ebotcazou@adacore.com
Sat Oct 20 23:42:00 GMT 2012


> The patch was fully tested on x86_64-suse-linux, where it removes half of
> the useless stores in the original testcase for PR rtl-optimization/54315,
> and manually tested for arm-linux-gnueabi (for now), where it also removes
> stores for small structures.  Comments?
>
> 2012-10-08  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* calls.c (expand_call): Don't deal specifically with BLKmode values
> 	returned in naked registers.
> 	* expr.h (copy_blkmode_from_reg): Adjust prototype.
> 	* expr.c (copy_blkmode_from_reg): Rename first parameter into TARGET and
> 	make it required.  Assert that SRCREG hasn't BLKmode.  Add a couple of
> 	short-circuits for common cases and be prepared for sub-word registers.
> 	(expand_assignment): Call copy_blkmode_from_reg for BLKmode values
> 	returned in naked registers.
> 	(store_expr): Likewise.
> 	(store_field): Likewise.

Applied after testing on x86_64-suse-linux and mips64el-linux-gnu, where it 
also removes stores for small structures (at least for n32).

-- 
Eric Botcazou



More information about the Gcc-patches mailing list