Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!snorkelwacker!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.arch Subject: Re: Compile Times on BIG Basic Blocks Message-ID: Date: 9 May 90 17:15:50 GMT References: <7942@granola.ai.mit.edu> <9124@pt.cs.cmu.edu> <560@argosy.UUCP> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 36 In-reply-to: ian@argosy.UUCP's message of 7 May 90 18:22:08 GMT In article <560@argosy.UUCP> ian@argosy.UUCP (Ian L. Kaplan) writes: | In article <9124@pt.cs.cmu.edu> ram@wb1.cs.cmu.edu (Rob MacLachlan) writes: | Like most gross generalizations, this one is wrong. Very large | basic blocks can and do arise in non-trivial programs. For example, | Fortran 8x programs that contain array expressions can generate very | large basic blocks. In "scalar" Fortran code these array expressions | would have been expressed as loops and conditional statements. As Mr. | MacLachlan suggests, we would see many small basic blocks. However, | Fortran is starting to move away from scalar expressions toward vector | expressions. Calculations in scalar Fortran that were done in loops | and if statements can now be written as array expressions or WHERE | statements in Fortran 8x. This can reduce a routine that used to | contain a number of basic blocks to a single basic block. Before this | is discarded as an artifact of Fortran 8x, I would also like to point | out that vectorizing compilers do much the same sort of thing: by | converting loops into vector expressions they remove basic blocks. | | Sometimes people seem to forget that the world is not made up | entirely of "C" users. Umm, aren't we forgetting what a basic block is? It is a section of straight-line code that has no entrances except for the top, and except for the last statement contains no conditionals or branches. Array expressions would typically generate a loop around a small inner basic block, unless you completely unroll the loop. Unrolling extermely large array loops completely is not typically a reasonable thing to do. Unless it is fully unrolled, a new small basic block is formed, so that the assertion that fortran 8x array ops makes a large basic block is false. -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA Catproof is an oxymoron, Childproof is nearly so