Skip to main content

Code Instruction Selection Based on SSA-Graphs

  • Conference paper
Book cover Software and Compilers for Embedded Systems (SCOPES 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2826))

Included in the following conference series:

Abstract

Instruction selection for embedded processors is a challenging problem. Embedded system architectures feature highly irregular instruction sets and complex data paths. Traditional code generation techniques have difficulties to fully utilize the features of such architectures and typically result in inefficient code.

In this paper we describe an instruction selection technique that uses static single assignment graphs (SSA-graphs) as underlying data structure for selection. Patterns defined as graph grammar guide the instruction selection to find (nearly) optimal results. We present an approach which maps the pattern matching problem to a partitioned boolean quadratic optimization problem (PBQP). A linear PBQP solver computes optimal solutions for almost all nodes of a SSA-graph.

We have implemented our approach in a production DSP compiler. Our experiments show that our approach achieves significant better results compared to classical tree matching.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Biswas, S., Balachandran, A., Dhamdhere, D.M.: Efficient retargetable code generation using bottom-up tree pattern matching. Computer Languages 15(3), 127–140 (1990)

    Article  Google Scholar 

  2. Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Zadeck, F.K.: An efficient method of computing static single assignment form. In: ACM (ed.) POPL1989. Proceedings of the 16th annual ACM symposium on Principles of programming languages, Austin, TX, pp. 25–35. ACM Press, New York (1989)

    Chapter  Google Scholar 

  3. Eckstein, E., Scholz, B.: Address mode selection. In: Proceedings of the International Symposium of Code Generation and Optimization (CGO 2003), San Francisco, March 2003. IEEE/ACM (2003)

    Google Scholar 

  4. Anton Ertl, M.: Optimal code selection in DAGs. In: Principles of Programming Languages (POPL 1999) (1999)

    Google Scholar 

  5. Fraser, C., Henry, R., Proebsting, T.: BURG – fast optimal instruction selection and tree parsing. ACM SIGPLAN Notices 27(4), 68–76 (1992)

    Article  Google Scholar 

  6. Fraser, C.W., Hanson, D.R.: A code generation interface for ANSI c. Software - Practice and Experience 21(9), 963–988 (1991)

    Article  Google Scholar 

  7. Gerlek, M.P., Stoltz, E., Wolfe, M.: Beyond induction variables: Detecting and classifying sequences using a demand-driven SSA form. ACM Transactions on Programming Languages and Systems 17(1), 85–122 (1995)

    Article  Google Scholar 

  8. Emmelmann, R.L.H., Schröer, F.-W.: Beg - a generator for efficient back ends. In: SIGPLAN 1999 Conference on Programming Language Design and Implementation, pp. 227–237 (1989)

    Google Scholar 

  9. Leupers, R.: Code generation for embedded processors. In: ISSS, pp. 173–179 (2000)

    Google Scholar 

  10. Liao, S., Devadas, S., Keutzer, K., Tjiang, S.: Instruction selection using binate covering for code size optimization. In: International Conference on Computer Aided Design, pp. 393–401. IEEE Computer Society Press, Los Alamitos (1995)

    Google Scholar 

  11. Proebsting, T.A.: Least-cost instruction selection in dags is np-complete, http://research.microsoft.com/~toddpro/papers/proof.htm

  12. Scholz, B., Eckstein, E.: Register allocation for irregular architecture. In: Proceedings of Languages, Compilers, and Tools for Embedded Systems (LCTES 2002) and Software and Compilers for Embedded Systems (SCOPES 2002), Berlin. ACM, New York (2002)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Eckstein, E., König, O., Scholz, B. (2003). Code Instruction Selection Based on SSA-Graphs. In: Krall, A. (eds) Software and Compilers for Embedded Systems. SCOPES 2003. Lecture Notes in Computer Science, vol 2826. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39920-9_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-39920-9_5

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20145-8

  • Online ISBN: 978-3-540-39920-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics