This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: tree-ssa alias constraints
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Sat, 31 Dec 2005 11:03:54 -0500
- Subject: Re: tree-ssa alias constraints
- References: <d11daf7ffe03be0ec5c0f668f30eee34@physics.uc.edu>
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.