This is the mail archive of the gcc@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]

Re: Loop unrolling


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



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