|metaprograms in gcc email@example.com (2001-09-11)|
|Re: metaprograms in gcc firstname.lastname@example.org (Srineet) (2001-09-11)|
|Re: metaprograms in gcc email@example.com (Aaron Gray) (2001-09-11)|
|Re: metaprograms in gcc firstname.lastname@example.org (Douglas Gregor) (2001-09-20)|
|From:||Douglas Gregor <email@example.com>|
|Date:||20 Sep 2001 00:29:13 -0400|
|Posted-Date:||20 Sep 2001 00:29:13 EDT|
Anil Kumar Tappetla wrote:
> Hi, does gcc use template programs to unroll loops in c++. which all
> compilers DONOT use metaprograms for loop unrolling. also, does gcc
> implement constant folding (it should,i guess).thanks.. anil.
Optimizations such as loop unrolling that are implemented via template
metaprogramming are generally not implemented by a compiler. Instead,
they are implemented in C++ library code: when the compiler evaluates
the metaprogram it ends up generating the unrolled code after
performing a large amount of inlining.
I haven't seen any production compilers that internally use template
metaprograms for optimization. We have been experimenting with such a
system (which uses a user-extensible template metaprogram for a
generic simplification component), but currently I know of no other
research projects that do this.
Return to the
Search the comp.compilers archives again.