Commit 4b8181c5 by Bin Cheng Committed by Bin Cheng

gcse.c (struct bb_data): Add new fields, old_pressure, live_in and backup.


	* gcse.c (struct bb_data): Add new fields, old_pressure, live_in
	and backup.
	(get_regno_pressure_class): Add prototype.
	(update_bb_reg_pressure): New.
	(should_hoist_expr_to_dom): Add new parameter from.
	Monitor the change of reg pressure and use it to drive hoisting.
	(hoist_code): Update LIVE and reg pressure information.
	(calculate_bb_reg_pressure): Initialize live_in and backup.

	* gcc.dg/hoist-register-pressure-3.c: New test.

From-SVN: r193425
parent 6ba9e401
2012-11-12 Bin Cheng <bin.cheng@arm.com>
* gcse.c (struct bb_data): Add new fields, old_pressure, live_in
and backup.
(get_regno_pressure_class): Add prototype.
(update_bb_reg_pressure): New.
(should_hoist_expr_to_dom): Add new parameter from.
Monitor the change of reg pressure and use it to drive hoisting.
(hoist_code): Update LIVE and reg pressure information.
(calculate_bb_reg_pressure): Initialize live_in and backup.
2012-11-12 Oleg Endo <olegendo@gcc.gnu.org>
* doc/md.texi (Standard Pattern Names For Generation): Fix swapped
2012-11-12 Bin Cheng <bin.cheng@arm.com>
* gcc.dg/hoist-register-pressure-3.c: New test.
2012-11-11 Oleg Endo <olegendo@gcc.gnu.org>
* gcc.target/sh/sh4a-fprun.c: Add test_sinf and test_cosf noinline
......
/* { dg-options "-Os -fdump-rtl-hoist" } */
/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */
#define BUF 100
int a[BUF];
void com (int);
void bar (int);
int foo (int x, int y, int z)
{
/* "x+y" won't be hoisted if "-fira-hoist-pressure" is disabled,
because its rtx_cost is too small. */
if (z)
{
a[1] = a[0] + a[2] + a[3] + a[4] + a[5] + a[6];
a[2] = a[1] + a[3] + a[5] + a[5] + a[6] + a[7];
a[3] = a[2] + a[5] + a[7] + a[6] + a[7] + a[8];
a[4] = a[3] + a[7] + a[11] + a[7] + a[8] + a[9];
a[5] = a[5] + a[11] + a[13] + a[8] + a[9] + a[10];
a[6] = a[7] + a[13] + a[17] + a[9] + a[10] + a[11];
a[7] = a[11] + a[17] + a[19] + a[10] + a[11] + a[12];
com (x+y);
}
else
{
bar (x+y);
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment