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


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 ....

I really don't see what's wrong with something like:

	for (i = 0; i < n; i++)
		__asm__ ("");

for doing empty loops.

-- 
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com,	617-354-5416 (office),	617-354-7161 (fax)


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