skip to main content
article
Free Access

Peephole optimization as a targeting and coupling tool

Published:01 August 1989Publication History
Skip Abstract Section

Abstract

The term peephole optimization is used to mean the pattern matching and conditional replacement performed on small sections of the intermediate form.

The circular dependence between the code generation phases implies that local optimals are rarely global optimals. There are several reactions: (1) accept the local optimal, (2) develop intermediate goals whose achievement suggest global optimality, (3) retain the choices so that the decisions can be made later, (4) optimize the object code by replacing awkward or overly constrained segments of code with improved ones. Optimizing the object code has several advantages. First, code generation is greatly simplified. The code generator is allowed to forgo case analysis and utilize only a subset of the machine's instructions and addressing modes [BD88,DF84a,DF84b,DF87]. Second, a phase ordering problem often encountered in optimizations is reduced.

References

  1. All86 V.H. Allan. A Critical Analysis of the Global Optimization Problem for Horizontal Microcode. PhD thesis, Computer Science Department, Colorado State University, Fort Collins, 1986.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. AM87 V.H. Allan and R.A. Mueller. Phase Coupling for Horizontal Microcode Generation. In Proceedings of the 20th Microprogramming Workshop (MICRO-20), Colorado Springs, CO, December 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. AM88 V.H. Allan and R.A. Mueller. Compaction with general synchronous timing. IEEE Transactions on Software Engineering, 14(5):595-599, May 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. AN88 A. Aiken and A. Nicolau. Optimal Loop Parallelization. In Proceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementation, pages 308-317, Atlanta, Georgia, June 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. BD88 M.E. Benitez and J.W. Davidson. A portable global optimizer and linker. SIG- PLAN '88 Conference on Programming Language Design and Implementation, 23(7):329-338, July,1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Cat82 R.G.G. Cattell. Formalization and Automatic Derivation of Code Generators. UMI Research Press, Ann Arbor, Michigan, 1982.]]Google ScholarGoogle Scholar
  7. Das80 S. Dasgupta. Some Aspects of High-Level Microprogramming. Computing Surveys, 12(3):295-324, Sept 1980.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Dav86 J.W. Davidson. A retargetable instruction reorganizer, SIGPLAN Notices, Proceedings of the Sigplan 86 Symposium on Compiler Construction, 21(7):234-241, 1986.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Dav88 S. Davidson. High-Level Microprogramming Languages. In S. Habib, editor, Microprogramming and Firmware Engineering Methods, Van Nostrand Reinhold, New York, NY, 1988.]]Google ScholarGoogle Scholar
  10. DB86 G. Davies and S. Bowsher. Algorithms for pattern matching. Software Practice and Ezperience, 16(6):576-601, June 1986.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. DeW76 D. J. Dewitt. A Machine-Independent Approach to the Production of Optimal Horizontal Microcode. PhD thesis, Department of Computer and Communication Sciences, University of Michigan, Ann Arbor, MI, 1976.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. DF84a J.W. Davidson and C.W. Fraser. Automatic generation of peephole optimizations. SIGPLAN Notices, Proceedings of the Sigplan 84 Symposium on Compiler Construction, 19(6):111-116, 1984.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. DF84b J.W. Davidson and C.W. Fraser. Code selection through object code optimization. Transactions of Programming Languages and Systems, 6(4):505-526, October 1984.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. DF87 J.W. Davidson and C.W. Fraser. Automatic inference and fast interpretation of peephole optimization rules. Sojtware- Practice and Ezperience, 17(11):801-812, November 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. GF85 M. Ganapathi and C.N. Fischer. Affix grammar driven code generation. ACM TOPLAS, 7(4):56G599, Ott 1985.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. GFH82 M. Ganapathi, C.N. Fischer, and L. Hennessy, J. Retargetable compiler code generation. Computing Surveys, 14(4):573- 592, Dee 1982.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Gur89 R.P. Gurd. Microcoding Tools: Bit Slice Software. Sigmicro Newsletter, 20(2), 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. JRS89 JRS. JRS: Integrated Design Automation System. Sigmicro Newsletter, 20(l), March 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. KT79 J. Kim and C.J. Tan. Register Assignment Algorithms for Optimizing Microcode Compilers - Part I. Technical Report RC 7639, IBM, Computer Sciences Department, IBM T.J. Watson Research Center, Yorktown Heights, NY, May 1979.]]Google ScholarGoogle Scholar
  20. Lev81 B.W. Leverett. Register Allocation in Optimizing Compilers. PhD thesis, Computer Science Department, Carnegie- Mellon University, Pittsburgh, PA, 1981.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. SDWX87 B. Su, S. Ding, J. Wang, and J. Xia. Microcode Compaction with Timing Constraints. In Proceedings of the 20 Microprogramming Workshop (MICRO-20), Colorado Springs, CO, December 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Veg82 S.R. Vegdahl. Local Code Generation and Compaction in Optimizing Microcode Compilers. PhD thesis, Department of Computer Science, Carnegie-Mellon University, Pittsburgh, PA, 1982.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Wil89 D. Wilburn. Microcoding tools: metastep. Sigmicro Newsletter, 20(2), 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. You88 J.L. Young. The Software Foundry: Almost too Good to Be True. Electronics, 47-48, January 21, 1988.]]Google ScholarGoogle Scholar

Index Terms

  1. Peephole optimization as a targeting and coupling tool

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM SIGMICRO Newsletter
            ACM SIGMICRO Newsletter  Volume 20, Issue 3
            Sep. 1989
            253 pages
            ISSN:1050-916X
            DOI:10.1145/75395
            Issue’s Table of Contents
            • cover image ACM Conferences
              MICRO 22: Proceedings of the 22nd annual workshop on Microprogramming and microarchitecture
              August 1989
              253 pages
              ISBN:0897913248
              DOI:10.1145/75362

            Copyright © 1989 Author

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 August 1989

            Check for updates

            Qualifiers

            • article
          • Article Metrics

            • Downloads (Last 12 months)11
            • Downloads (Last 6 weeks)0

            Other Metrics

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!