[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: %destructor feedback

From: Joel E. Denny
Subject: Re: %destructor feedback
Date: Tue, 6 Dec 2005 22:16:12 -0500 (EST)

On Wed, 7 Dec 2005, Frank Heckenbach wrote:

And doesn't it also prevent the compiler from putting e in a
register (when applied to a local variable), thus pessimizing the
code generated?

If the variable is unused except for the one reference within YYUSE(), how much of an impact will it have if the compiler is unable to put it in a register?

And what about the yyunused variable? If it's declared locally, some
version of a compiler or lint may find that it's assigned a value
that's never used

It is used at the next YYUSE() execution:

  static int yyunused;
  #define YYUSE(e) yyunused = &(e) && yyunused

, and if declared globally, a compiler cannot
readily optimize away the spurious assignment.

Unless YYUSE() appears in a short loop (not in bison, I believe), wouldn't the performance penalty be trivial?

I ask these questions out of ignorance, but if you wouldn't mind entertaining them anyway, I'd appreciate it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]