|reducible loops firstname.lastname@example.org (1992-02-24)|
|Re: reducible loops email@example.com (Raul Deluth Miller-Rockwell) (1992-02-25)|
|Re: reducible loops firstname.lastname@example.org (1992-02-26)|
|Re: reducible loops email@example.com (1992-02-26)|
|Re: reducible loops firstname.lastname@example.org (1992-02-26)|
|Re: reducible loops email@example.com (1992-02-27)|
|Re: reducible loops firstname.lastname@example.org (1992-02-28)|
|Re: reducible loops idacrd!desj@uunet.UU.NET (1992-03-09)|
|Re: reducible loops email@example.com (1992-03-10)|
|From:||idacrd!desj@uunet.UU.NET (David desJardins)|
|Organization:||IDA Center for Communications Research|
|Date:||Mon, 9 Mar 1992 03:25:59 GMT|
In article 92-02-110 Preston Briggs writes:
>Most techniques would say this is is a loop nest with 2 loops, ABCDE and BDE.
>BDE is just an inner loop, contained entirely within the larger ABCDE.
I think another poster said this too. But I think the problem is deeper
than that. My impression is that you can turn any code into a collection
of loops. The problem is that if you get the wrong loops your code will
Suppose that I fill out conditions a and b and statements C and E as
j = 1
i = 1
if (i .lt. 100) then
i = i + 1
if (j .lt. 100) then
j = j + 1
i = 1
Now it is pretty clear that (AB) is the inner loop. If you optimize for
(BD) to be the inner loop, and 99% of the time it is executed exactly
once, you are going to have terrible performance.
Admittedly (AB) is not `irreducible.' But so what? The job of the
compiler is supposed to be a practical one of generating code which runs
fast rather than an academic one of identifying a particular kind of
Of course, maybe this problem is just too hard. But if your compiler
makes decisions like the one you are talking about before looking at what
the code is doing, then you have no chance to get it right.
Return to the
Search the comp.compilers archives again.