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


On Tue, Jun 02, 1998 at 02:48:08PM -0700, Joe Buck wrote:
> Yup.  I suppose if anyone really cares about keeping RMS happy, loops
> could be flagged as "the user wrote this loop" vs. "the compiler wrote
> this loop".

No, as I'd like to see things of the form

#define destroy_pte(PTR)

	for (i = 0; i < PAGE_SIZE/sizeof(pte); ++i)
		destroy_pte(base+i);

where destroy_pte is defined in some target-specific header, be
eliminated as well.

> This might also keep embedded programmers who believed the gcc manual
> and wrote timing loops happy.

How often does this occur do you think?  Given that there are
any number of ways to write an empty loop that cannot be
removed, I would think this would not be much of an issue.

If someone actually bitches, I suppose we could provide a switch
to disable the optimization, but I would prefer that it be on by
default.


r~


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