Re: Estimating loop iterations

glen herrmannsfeldt <>
8 May 2005 22:57:00 -0400

          From comp.compilers

Related articles
Estimating loop iterations (drizzle) (2005-05-06)
Re: Estimating loop iterations (glen herrmannsfeldt) (2005-05-07)
Re: Estimating loop iterations (sandya) (2005-05-07)
Re: Estimating loop iterations (2005-05-08)
Re: Estimating loop iterations (glen herrmannsfeldt) (2005-05-08)
| List of all articles for this month |

From: glen herrmannsfeldt <>
Newsgroups: comp.compilers,comp.lang.fortran
Date: 8 May 2005 22:57:00 -0400
Organization: Compilers Central
References: 05-05-030 05-05-032 05-05-040
Keywords: Fortran, history, optimize, comment
Posted-Date: 08 May 2005 22:57:00 EDT

Trevor Jenkins wrote:
> On 7 May 2005 16:58:29 -0400, John Levine commented:

>>[I heard that FREQUENCY went away both because nobody used it and
>>because at least with 1960 optimizing technology, it didn't tell the
>>compiler anything useful. -John]

> I heard that the reason it was taken away after the first few FORTRAN
> compilers implemented it round the wrong way ... but it didn't affect the
> quality of the code produced. Also programmers were found to be poor at
> determining which execution paths are actually followed,

Well, FREQUENCY has two, somewhat unrelated uses. One was for
relative branch frequency. For processors that do static branch
prediction (and I don't believe the 704 was one) with instruction or
prefix bits, it could be used.

The other use is for DO loops where it specifies the expected number
of iterations. There might be some things optimizers could do
differently based on that number. That seems to be the use that the
OP was asking about.

-- glen
[The point of the branch prediction was for the Fortran three-way arithmetic
IF, to tell it which test to put first. Pretty marginal. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.