Re: Fwd: GCC Optimization for expressions

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

 



On 2008-12-01 13:02:21 -0800, Ian Lance Taylor wrote:
> "Nirav Shah" <nirav4ever4u@xxxxxxxxx> writes:
> 
> > No expression is evaluated in loop nor any particular intermediate
> > result is used more than once. Given this, can I get benefit in terms
> > of lesser clock cycle to execute the computation if done in a single
> > statement as compared to done over multiple statements with local
> > variables?
> 
> No.  When optimizing, the compiler converts your program into an
> internal representation in SSA form.  The number of local variables
> used in the original program is irrelevant to the generated code.

This may be what GCC currently does, but this is a bug when extended
precision is used to evaluate an expression.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux