On Sat, 2005-12-31 at 02:12 -0500, Andrew Pinski wrote:
> I noticed that we add a constraint for each variable that is assigned 
> to the
> return value of a function call even though that information is useless 
> for
> non pointers? 
>  Is there a reason why we do this?

Laziness.

> --------------------------------------------------------
> 
> It seems like we are spending extra time to try to figure out the 
> constraints

Quantify "extra time".

> on these variables than what we should be doing.

The amount of time processing these constraints is basically nothing.
They get processed during build_constraint_graph, and that's it.

> 
> The reason for this processing is the following code in 
> tree-ssa-structalias.c:
>            /* Only care about operations with pointers, structures
>               containing pointers, dereferences, and call expressions.  
> */
>            if (POINTER_TYPE_P (TREE_TYPE (lhsop))
>                || AGGREGATE_TYPE_P (TREE_TYPE (lhsop))
>                || TREE_CODE (rhsop) == CALL_EXPR)
> 
> Or I am missing that a constraint that can happen?

In IPA mode, for example, you still need to process the function call,
regardless of what the return value is.



Reply via email to