Loop unrolling

Horst von Brand vonbrand@inf.utfsm.cl
Tue Jun 2 09:42:00 GMT 1998


Tim Hollebeek <tim@wagner.princeton.edu> said:
> Stephen Williams writes ...
> > pfeifer@dbai.tuwien.ac.at said:
> > > As a matter of fact, is there still any strong reason not to delete
> > > empty loops in general? 

> > As a matter of fact, there is. Us embedded programmers are sometimes
> > compelled to write timing loops. I guess we should (and I usually do)
> > make those loops non-empty, but still ....

[...]

> It seems to me that such a timing loop relies on the loop generating the
> same code, and as such is better as an explicit asm statement.  Linux,
> for example, gets this right.

I wholeheartedly agree.
-- 
Dr. Horst H. von Brand                       mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513




More information about the Gcc mailing list