[PATCH] Modify TER to not propagate expressions across call
Pat Haugen
pthaugen@linux.vnet.ibm.com
Fri Sep 10 23:01:00 GMT 2010
The following patch tries to limit TER such that it will not propagate
expressions across calls, which can extend lifetimes across calls and
result in suboptimal code due to additional save/restore of registers. I
tried allowing just BUILT_IN_MD builtins to be bypassed, but that still
didn't catch things like sqrt/powf which were seen in 435.gromacs
benchmark, so resorted to all builtins (no worse than what was being
done before).
Bootstrap/regtested on powerpc64-linux with no new regressions. OK for
mainline?
2010-09-10 Pat Haugen <pthaugen@us.ibm.com>
* tree-ssa-ter.c (temp_expr_table_d): Add call_cnt field.
(new_temp_expr_table): Allocate call_cnt vector.
(free_temp_expr_table): Free it.
(process_replaceable): Add call_cnt parm and set in vector.
(find_replaceable_in_bb): Skip replacement if def/use span a call.
(debug_ter): Dump call_cnt value, remove stderr uses.
-Pat
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ter.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100910/8c7c636f/attachment.ksh>
More information about the Gcc-patches
mailing list