[patch] More TRUNC_MOD_EXPR folding

James A. Morrison ja2morri@csclub.uwaterloo.ca
Sat Jun 18 22:17:00 GMT 2005


Jeffrey A Law <law@redhat.com> writes:

> On Sat, 2005-06-18 at 15:51 -0400, James A. Morrison wrote:
> > Jeffrey A Law <law@redhat.com> writes:
> > 
> > > The transformations in VRP use range data that is not currently
> > > available to the folder.
> > > 
> > > The stuff that was added to the folder is a trivial case that really,
> > > really, really is better handled by the VRP stuff I recently checked
> > > in.
> > > 
> > > jeff
> >  
> >  So far all the transformations in simplify_using_ranges could be replaced if
> > VRP had a way to hook into tree_expr_nonnegative_p.  I currently thinking
> > of possible ways to do this, but I am no where near any patches yet.
> I would instead suggest working the other way.  VRP has a lot more
> ability to discover, then propagate range information through the
> SSA graph.  tree_expr_nonnegative_p should be querying that global
> range information when its available.
> 
> jeff

 This would be fine.  I would only need to change return 0 at the end of
tree_expr_nonnegative_p to return vrp_nonnegative_p and have vrp_nonnegative_p
do the right thing.  I was thinking of a hook in case there is some other
optimization that may hook into that function.  I don't know of any offhand
though. 

-- 
Thanks,
Jim

http://www.csclub.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim



More information about the Gcc-patches mailing list