Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!tut.cis.ohio-state.edu!purdue!decwrl!argosy!ian From: ian@argosy.UUCP (Ian L. Kaplan) Newsgroups: comp.arch Subject: Re: Compile Times on BIG Basic Blocks Message-ID: <560@argosy.UUCP> Date: 7 May 90 18:22:08 GMT References: <7942@granola.ai.mit.edu> <9124@pt.cs.cmu.edu> Sender: news@argosy.UUCP Reply-To: ian@bear.UUCP (Ian L. Kaplan) Organization: MasPar Computer Corporation, Sunnyvale, CA Lines: 37 In article <9124@pt.cs.cmu.edu> ram@wb1.cs.cmu.edu (Rob MacLachlan) writes: > >It's pretty silly to get worked up about compiler algorithms that perform >badly on large basic blocks; all large blocks means is that the program is >very simple, giving the optimizers an embarassment of riches. > >If these algorithms really were optimal, and if it really were important to >extend optimality across as large an extent of the program as possible, then >there might be some reason for concern. However neither is true. All you >need to do is limit the extent of the intra-block optimization, either with >a window or by gratuitously splitting blocks. > >The really nasty problems in flow analysis are those which blow up with >program *complexity*, not simplicitly. > > Rob 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. Ian Kaplan ian@maspar.com