This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Tweak loop peeling limits


> I don't know exactly why, but just peeling the loops showed up to
> be almost as effective as unrolling them in some tests on x86_64.
> I call it a magic :-).

I suppose that must have to do with peculiarities of the x86_64
microarchitecture - that it can do non-taken branches in otherwise
straightline code quickly, but can't predict taken branches in a loop
as effectively.
If that is the case, naiive unrolling should also work fine for x86_64.

But for processors where the actual instruction count is still an issue,
there is no substitute for getting rid of some compares and branches.


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