This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Improve cost computation in ivopts


On Tue, 9 Nov 2004, Zdenek Dvorak wrote:
>
> 	* fold-const.c (fold): Attempt to use ptr_difference_const whenever
> 	one of the arguments of MINUS_EXPR is an address.
> 	(get_core): New function.
> 	(ptr_difference_const): Handle case when one of the operands is a
> 	pointer.
> 	* tree-ssa-loop-ivopts.c (determine_base_object): Fold &*addr.
> 	(ptr_difference_cost): Pass addresses instead of objects to
> 	ptr_difference_const.

This is OK for mainline.  The fold-const.c parts are correct and the
tree-ssa-loop-ivopts.c changes look obvious once the first bits are
approved.  My one suggestion is that "get_core" is a rather cryptic
function name (and it has nothing to do with memory allocation :),
perhaps get_inner_reference_2 would be an improvement?

Thanks.

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]