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: VRP speedup


> Jan Hubicka wrote:
> >> On Sun, 2006-12-03 at 15:21 +0100, Jan Hubicka wrote:
> >>> +   return tcmp == boolean_true_node; 
> >> I would not do that, I would just do integer_onep (tcmp).
> >> As I don't trust fold_binary_to_constant returning always
> >> boolean_true_node.
> > 
> > It is what old code did and I must say I can't figure out way how the
> > fold_binary_to_constant can correctly behave otherwise. 
> 
> It might want to return a true value with a different (typedef) type,
> for better debugging purposes.  Therefore, I believe that tests against
> boolean_{true,false}_node are wrong.

The folder gets the intended type as operand, so I think it should cast
the constant to the given type and thus end up with the specific
boolean_true_node anyway.
But it is not what it is doing now as pointed out by Andrew, so I will
update the vrp code gesting nonzero_type_node in the other cases too (in
general most of the folder cast can be turned into the fast_lt_compare,
I just didn't do it in first patch as it is not always trivial to do,
but I have incremental patch for it)

Honza
> 
> -- 
> Mark Mitchell
> CodeSourcery
> mark@codesourcery.com
> (650) 331-3385 x713


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