Kaveh R. GHAZI - Re: PATCH: CALL_EXPR representation part 2/9 (builtins.c and fold-const (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

On Sat, 10 Feb 2007, Sandra Loosemore wrote:

Here's part 2 of the CALL_EXPR representation changes. This is by far the largest chunk, consisting of changes to builtins.c and fold-const.c.

See my part 0 message for a high-level overview of what has changed. Additionally, when I submitted the patch for the original version of the changes to the LTO branch, I was asked to make stylistic changes to consistently use NULL_TREE or NULL_RTX (as appropriate) instead of constant 0 throughout builtins.c. So that's also contributed to making this patch extra-gigantic. :-)

-Sandra

Hi Sandra,

This part is really big so I may have missed something, but it looks like some (many?) of the calls to validate_arglist() were removed in builtins.c by your patch, instead to be replaced by explicit requests via CALL_EXPR_ARG* and validation of particular arguments via validate_arg().

Sometimes the CALL_EXPR_ARG* appears before the validate check, I'm not sure if that is dangerous or not. What if there was no prototype issued and argument is missing? Will GCC crash in these cases?

I'm also concerned because the validate_arglist() function not only checks the expected arguments but also ensures that no extra ones appear via the VOID_TYPE at the end. That guards against something like sqrt(4.0, x++), where we would substitute 2.0 and omit the extra argument with side-effects. Does your patch preserve this check? It's so big I can't tell. :-) Thanks, --Kaveh

Kaveh R. Ghazi ghazi@caip.rutgers.edu


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