Discovering Machine-Specific Code Improvements

Abstract

A compiler construction tool has been designed and built that automates much of the case analysis necessary to exploit special purpose instructions on a target machine. Given a suitable description of the target machine, the analysis identifies instruction sequences that are equivalent to single instructions. During code generation, these equivalences can be used to avoid inefficient sequences in favor of more efficient instructions. A working prototype of the instruction set analyzer needed in the framework outlined by (Giegerich 83) is presented. In contrast to the work presented in (Davidson and Fraser 80, 84), machine descriptions are analyzed entirely during compiler construction (i.e., once per compiler), rather than during code generation (i.e. , each time the compiler is used). (R Kessler 84) describes such a system for discovering equivalent instructions for instruction sequences of length 2. The techniques presented here can identify instruction sequences of arbitrary length that are equivalent to single instructions. This analysis has been applied to the descriptions of two machines, and the results have been used to replace hand-written case analysis routines in an otherwise table driven code generator. The translation of a programming language onto a target architecture requires analyses of both the language and the architecture. This paper describes a novel technique for identifying three kinds of idioms: set idioms, binding idioms, and composite idioms.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Dec 30, 1985
Accession Number
ADA166972

Entities

People

  • S. L. Graham

Organizations

  • University of California, Berkeley

Tags

Communities of Interest

  • Materials and Manufacturing Processes

DTIC Thesaurus Topics

  • Addressing
  • Algorithms
  • Analyzers
  • Compilers
  • Computations
  • Computer Programming
  • Computer Science
  • Computers
  • Computing System Architectures
  • Construction
  • Decomposition
  • Demographic Cohorts
  • Generators
  • Instructions
  • Language
  • Natural Languages
  • Programming Languages

Fields of Study

  • Computer science
  • Engineering

Readers

  • Computer Science.
  • Database Systems and Applications
  • Neural Network Machine Learning.