Skip to main navigation Skip to search Skip to main content

Generalized instruction selection using SSA-graphs

  • Dietmar Ebner
  • , Florian Brandner
  • , Bernhard Scholz
  • , Andreas Krall
  • , Peter Wiedermann
  • , Albrecht Kadlec
  • Vienna University of Technology
  • University of Sydney

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Instruction selection is a well-studied compiler phase that translatesthe compiler's intermediate representation of programs to asequence of target-dependent machine instructions optimizing forvarious compiler objectives (e.g. speed and space). Most existinginstruction selection techniques are limited to the scope of a singlestatement or a basic block and cannot cope with irregular instructionsets that are frequently found in embedded systems.We consider an optimal technique for instruction selection thatuses Static Single Assignment (SSA) graphs as an intermediaterepresentation of programs and employs the Partitioned BooleanQuadratic Problem (PBQP) for finding an optimal instruction selection.While existing approaches are limited to instruction patternsthat can be expressed in a simple tree structure, we considercomplex patterns producing multiple results at the sametime including pre/post increment addressing modes, div-mod instructions,and SIMD extensions frequently found in embeddedsystems. Although both instruction selection on SSA-graphs andPBQP are known to be NP-complete, the problem can be solvedefficiently - even for very large instances.Our approach has been implemented in LLVM for an embeddedARMv5 architecture. Extensive experiments show speedups of upto 57% on typical DSP kernels and up to 10% on SPECINT 2000and MiBench benchmarks. All of the test programs could be compiledwithin less than half a minute using a heuristic PBQP solverthat solves 99.83% of all instances optimally.

Original languageEnglish
Title of host publicationLCTES'08 - Proceedings of the 2008 ACM SIGPLAN-SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems
Pages31-40
Number of pages10
DOIs
Publication statusPublished - 1 Dec 2008
Externally publishedYes
Event2008 ACM SIGPLAN-SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems, LCTES 2008 - Tucson, AZ, United States
Duration: 12 Jun 200813 Jun 2008

Publication series

NameProceedings of the ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES)

Conference

Conference2008 ACM SIGPLAN-SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems, LCTES 2008
Country/TerritoryUnited States
CityTucson, AZ
Period12/06/0813/06/08

Keywords

  • Code generation
  • Compiler
  • Instruction selection
  • PBQP

Fingerprint

Dive into the research topics of 'Generalized instruction selection using SSA-graphs'. Together they form a unique fingerprint.

Cite this