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: [PATCH] Avoid reevaluations in expand_builtin_mathfn*


On Tue, Jun 24, 2003 at 05:36:08PM -0600, Roger Sayle wrote:
> !   /* Always stabilize the argument list.  */
> !   switch (TREE_CODE (arg))
> !     {
> !     case VAR_DECL:
> !     case PARM_DECL:

Actually, even *_DECL need to be stabilized when they're volatile.

> !     case SAVE_EXPR:
> !     case REAL_CST:

And since save_expr already special-cases SAVE_EXPR and constants,
I guess you might as well call it all the time.  You could note when
save_expr returns its argument and avoid building tree lists, if you
like.

The solution of calling expand_call is good though.


r~


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