Speakers: Mike Saxon, Seronics Corp; Mark Hatch, Apollo Com- ... Speakers: Michael Braude, Gartner Group; Peter Langston, Bell ... Moderator: Mike Florio.
-1"" .~I!ftI!!.' Ie. (W~~ ...l ,,~. ..
\W.1i~tJ
U n lor ·F um TM
• • • • •
• • • • •
• • • • •
February 4-7, 1986 Anaheim Convention Center
Conference Proceedings
Sponsored by
us~group The Intemational Net'M>rk of UNIX Users
UniForum 1986 Conference Schedule Wednesday, February 5,1986
Technical #23 Moderator: Tom Houghton, AT& T
Technical Presentations & Panel Sessions
A Large UNIX Application Sizing Methodology Li-Jin W Chung, Ph.D., AT&T-IS .... . . . . . . . . . . .. . . . . . .. . ... 41
Panel #17 Distribution Channels Chair: Tom Neteldt, The Tandy Corporation Speakers: LaDonna Womochel, The Tandy Corporation; Steve Eddiger, SotTeam; Richard W Brown, Advanced Product Solutions . . ..... . ..... ...... ... . . .. ... .. . ...... . .... 231
Boeing Network Architecture Martin H. Ritchie, Boeing Computer Services .. . . ... . . ... .. . . 55 Document Interchange Architecture on a UNIX System Stanley P. Covington & Brian Doherty, Boeing Computer Services 71
Panel #18 Applications Overview: Beyond Basic Office Automation & Accounting Chair: Lee Sigler, Technology Decisions, Inc. Speakers: Mike Saxon, Seronics Corp; Mark Hatch, Apollo Computer; Richard H. Cobb, Martin Marietta Data Systems . ... . ... 231
Panel #24 Emerging Standards Chair: Heinz Lycklama, INTERACTIVE Systems Corp. Speakers: Mark Rawlins, Visual Engineering; Jim Isaak, Charles River Data Systems; Gary Lindgren, AT& T-IS, Bill Joy, Sun Microsystems; Laurence M. Brown, AT& T .. .. . ........ . . .. .. .. .... 236
Technical #19 Moderator: Martin Schoffstall Shared Network Database Techniques Prabhat K. Andleigh; Frank Farance, Farance Inc . . . . ... .. . . . . 1 Using Remote Procedure Calls (RPC) for a Distributed Clinical Information System Eric S. Bergan & Stephen G. Tolchin, The Johns Hopkins Hospital . ... . .. . . .. .. . ........ . . . . .. . 11 A Front-End TELNET/Rlogin Server Implementation George Powers, Excelan, Inc .... . ....... . .... .. ... . .. . . . 27 Panel #20 Building Fault Tolerant Systems Under UNIX Chair: Shirley Henry, Tolerant Systems Speakers: Kevin Conry, Parallel Computers; Mike Cassily, Sequoia Systems; Dale Shipley, Tolerant Systems ...... . . .. .. ...... 232 Panel #21 UNIX & Standard Multi-Vendor Networking Chair: Dick Swee, Charles River Data Systems Speakers: Ron Keil, General Motors; Arthur Miller, Motorola; Laurence M. Brown, AT& T; John Roy Cadwallader, International Computers Limited; Charles Robins, Rabbit Software; David R. Coffin, Intel Corp .. ..................... . .. . ... .. .. . .. 233 Panel #22 Integration of Office Automation Functions Chair: Robert Marsh, Plexus Computers, Inc. Speakers: Mike Milikan, Siebold Consulting; Erwin Morton, Syntactics Corp; Ed Scott, Sun Microsystems ................... . 235
Panel #25 Survival of the FiHest Chair: Gig Graham, VenturCom Inc. Speakers: Michael Braude, Gartner Group; Peter Langston, Bell CORE . ... ... . ......... . .. . . ... . . . . . ..... .... . .. . . . 237 Panel #26 Distributed UNIX Chair: Ron Fisher, INTERACTIVE Systems Corp. Speakers: William A. Jackson , Electronic Data Systems; Shirley Henry, Tolerant Systems; Gerald J. Popek, Locus Computing Corp . . .. . .. . . ........ .... . . .. . ...... . . . .. . . .. . . .. . 238 Technical #27 Moderator: Mike Florio A Man Machine Interface Management System for UNIX John D. Smart, CAP Group pic ... .. . .. .. .. .. . ............ 83 Transportable Applications Executive Dharitri Misra, Century Computing, Inc . .... ... .. . .. . ... . ... 93 Visual: GraphCap - A Device Interface Standard Greg Millar, Visual Engineering . .. ......... . .. . ..... . .... 105
Thursday, February 6,1986 Technical Presentations & Panel Sessions Panel #29 International Marketing Chair: Michael Dubrall, NCR Speakers: Kevin Gorey, UniSoft Systems; Pamela Geisler, Sphinx Ltd.; Brian Boyle, NOVON Research Corp .. ... . .. . . . .. .... 239 Panel #30 The Explosion of Application Migration Chair: Nick Copping, Hewlett-Packard Speakers: Robert H. Hishon, Hishon & Ranney; Bob French, Hewlett-Packard . . ....... . ............. . ...... . .. .. .. 240
UniForum 1986 Conference Proceedings -
Anaheim, CA
v
Conference Schedule CONTINUED
Technical #31 Moderator: David Buck, D.L. Buck & Associates RISC, MIPS and the Motion of Complexity John Mashey, MIPS Computer Systems ....... .. .. . ...... . 115 Optimizing Compilers Clinton F. Goss, Phi/on, Inc ... ... . ... .. .... . . .. . ... . . ... 125 Multicomputing Software from UNIX for Development to Realtime Execution Ray Naeini, Flexible Computer Corp . ... ... .... ... .. .. . ... 141 Panel #32 RISC Architecture Chair: Skip Stritter, MIPS Computer Systems Speakers: Martin Hopkins, IBM Watson Research Center; Ed Feustel, Prime Computer; Doug Jensen, Carnegie-Mellon University; Nick Treddenick, IBM Watson Research Center .... .. .... .. . 240 Panel #33 Office Networks Chair: Bruce Chittenden, The Santa Cruz Operation Speakers: Susan Dell'Aglio, AT& T-IS; Tom Stevens, CSRI; Steve Spanier, Excelan, Inc; Rocky Offner, The Santa Cruz Operation . ... ....... . ....... . ... .. . . .. . . . .... .. 242 Panel #34 Information Management: Perspectives on Full·Text Information Retrieval Chair: Peter Eddison, Fulcrum Technologies, Inc. Speakers: Barbara Johnson, CPT Corp; John W. Einberger, Reference Technology Inc; Ronald A. Murphy, BellSouth SeNices ... 243 Technical #35 Moderator: Doug Michels, The Santa Cruz Operation The Fourth Generation Make Glenn Fowler, Vitesse Electronic Corp . .. .. ... . . ... ... .... . 157 A Case Study on Compiler Portability for Mini and Microcomputers Gianluigi Castelli, University of Milan . .. . . . .... . .... . .. .... 171 Software Change Control System Dale Mosby & Steve Christiansen, Sequent Computer Systems . 183
Panel #36 Selecting a DBMS for UNIX Applications Chair: Nigel J. Button, NETI, Inc. Speakers: Carl F. Muller, Infosystems Technology, Inc; Michael O'Dell, Group L Corporation ... .244 Panel #37 UNIX and the PC: Cooperation or Collision? Chair: Jim Groff, Network Innovations Corp. Speakers: Shannon Jenkins, TouchStone Software Corp; Paul Stutler, COSI; Roger Sippi, Relational Database Systems . .... . 244 Panel #38 Co·Resident Operating Systems Chair: Michael E. Wi/ens, COSI Speakers: Charles R. Maule, Harris Corp; Carol Realini, Amdahl Corp; Patrick Curran, INTERACTIVE Systems Corp .. ... . ... . 245 Panel #39 A Secure UNIX System Chair: Lt. Col. Patrick Lanpher, The Pentagon Speakers: William Stewart, Gould CSD, Inc; Howard Israel, National Computer Security Center; Bruce Calkins, National Computer Security Center; Charles D. Flink, Agency Standard Host Programming Office and AT& T Technologies . . .. .. . . .. .. . .. . . . ... ...... 246
Friday, February 7, 1986 Technical Presentations & Panel Sessions Panel #41 AT&T Strategies & Directions Chair: Jean Yates, IDCIYates Ventures, Inc. Speakers: Kim Meyers, IDC . . .. .. . ... . . .... . . . .. . ... .. . 247 Panel #42 CAD/CAM/CAE Chair: Dr. Richard Davis, AT& T Speakers: Mike Sterling, Cimlinc Incorporated; James Clark, Si/icon Graphics; Edward C. Edwards, Boeing Computer Services . .. . 247 Technical #43 Moderator: Perry Flinn, MASSCOMP Flatlands: a /usr/group to ANSI C Standard Rick E. Cobb & Owen S. Medd, COSI, Inc . ... . . ... . . .... .. . 199 International UNIX/Hewlett·Packard's Solution to a Language· Independent System Karen S. Barnes, Hewlett-Packard Company .. . .. . ....... .. 209 ISO Standard Networking in a UNIX Environment Eric Spiewak, Charles River Data Systems .. .. . . ... . . .. . . .. 219
• /usr/group
Optimizing Compilers
Clinton F. Goss Mark S. Meretzky Benny Pollak
Philon, Inc. 641 Avenue of the Americas New York, NY 10011 (212) 807-0303
UniForum 1986 Conference Proceedings -
Anaheim, CA
125
1. Introduction Most software developers and systems integrators will need to select one or more compilers during the process of system design. To evaluate the competing claims made by compiler vendors such as Digital Research, Tartan Laboratories, and Philon, the systems designer who requires maximum performance from a computer system needs to know what to look for when choosing an optimizing compiler. This paper surveys many of the techniques used by an aggressive optimizing compiler to make a program faster and smaller. We begin by discussing the goals and the structure of a typical optimizer. We then outline some techniques to analyze and transform programs, giving simple code examples. Although our examples are in C, the same methods can be applied to programs in such diverse languages as COBOL, FORTRAN, BASIC, or Pascal. Finally, we examine the pragmatic issues of using an optimizer and report statistics on program improvements with various optimizations.
£. Goals of an Optimizing Compiler The primary goal of an optimizing compiler is to produce code which is smaller and/or runs faster than code produced by a non-optimizing compiler. In addition, a number of other goals may be important in a given environment. For example, the optimizer phase of a compiler may be designed so that it will compile code from several source languages. In addition, the optimizer could be built so that it could be easily "re-targeted" to produce code for differerent target machines. Finally, it may be desirable that the compiler pperate in various modes giving different degrees of optimization. The mode with no optimization produces slower and/or larger code, but the compiler runs faster since it does not expend effort tightening the code produced. Such fast compilers are typically chosen when developing code since the execution speed of the generated code is not important when debugging and testing. However, when compiling the production version of the program, the compiler should be run with full optimization. This last goal brings up a central requirement of an optimizing compiler: the behavior of the optimized version of the code must be the same as that of the unoptimized version. Just what "the same" means is not clearly defined in certain circumstances. For example, programs whose output depends on their own running speed (eg. using a delay loop) or whose correct operation depends on a compiler's implementation of some undefined language aspect (eg. the order of variables in memory) may not run the same. 3. structure of an Optimizing Compiler The typical compiler goes through two phases to produce code. The output of the first phase, or front end, is a translation of the program into an intermediate code. This code is roughly halfway between the high-level language of the original program and the native machine code of the computer. This version is then passed to the second phase of the compiler, or back end, where it is translated into relocatable object code. This code is then linked to
126
lusr/group
its runtime support library by a linker (alias link editor, loader, collector, etc.). Some compiler vendors use the same intermediate language in all their products, enabling them to construct compilers for new languages and machines out of combinations of interchangeable, standardized front and back ends. To generate tight code, an optimizing compiler includes one or more extra phases which can work at various levels of generated cod~. Ideally, each such optimization phase should output the same format code as it reads; this allows the optimization phases to be run at the option of the user, thus satisfying one of our design goals. Furthermore, if a compiler is designed with several such phases operating at different levels of the code, each optimization technique can be performed at a level best suited to it. The first optimization phase typically employed is one to improve the intermediate code before it is passed to the back end. This intermediate code optimizer (ICa) can be shared by all compilers that use the same intermediate code. There are some optimizations, however, that exploit features of a specific machine architecture and cannot be brought to bear until the back end translates the intermediate code into the final native code. An optimizing compiler can have an assembly code optimizer (ACa), that takes assembler as its input and performs optimizations on it. Finally, there are some optimizations that can only be performed when all the modules and libraries have been linked together. For that, yet another phase, a machine code optimizer (MCa), may be provided to operate on linked task images. Figure 1 summarizes the general layout of an optimizing compiler as we have described it. The next sections of this paper catalogue some of the more useful techniques which can be employed by optimizers. Since this paper is a survey of optimization possibilities, we concentrate on outlining the program transformations which can be performed and refer the reader to specific literature for the analysis methods which can be used to perform the transformations. The optimization techniques are loosely organized based on decreasing level of the code on which they operate. That is, techniques which manipulate intermediate code are presented first, followed by ones which operate on assembly and machine code. 4. Code Elimination It is often the case that useless code appears in a program. Such code seldom appears in the source code, as in the following example:
30:
goto 30; printf("UNREACHABLE"); return
where the print statement is never executed. However, useless code often arises after other optimization techniques have been applied.
UniForum 1986 Conference Proceedings - Anaheim, CA
127
There are two general approaches to eliminating useless code: forward elimination, which removes code that can never be executed, and backward elimi nation, which removes code that even if executed would perform no useful function. 4.1 Forward Elimination An optimizer can apply three techniques to identify code which can never be executed. They are listed in order of increasing thoroughness: Figure 1. structure of An Optimizing Compiler
+-------------+ I Front End I +-------------+
+---------------~-----------------+
I I II Intermediate Code I Intermediate Code Optimizer (ICO) I I ~~____+_-_-_-_-_-_-_--_-_-_-_-_-_-~-i-------------------+
'JI
+-------------+ Back End I +-------------+ :
+-------------~----------------+
II
Assembly Language I Assembly Code Optimizer (ACO) I I ~ +-------------------------------+ '\V \___" _ _ _ _ _ _1
+-------------+ Assembler I +-------------+
I Relocatable Module ~
+-------------+ Linker