Skip to main content

Reconstructing Control Flow from Predicated Assembly Code

  • Conference paper
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

Predicated instructions are a feature more and more common in contemporary instruction set architectures. Machine instructions are only executed if an individual guard register associated with the instruction evaluates to true. This enhances execution efficiency, but comes at a price: the control flow of a program is not explicit any more. Instead instructions from the same basic block may belong to different execution paths if they are subject to disjoint guard predicates. Postpass tools processing machine code with the purpose of program analyses or optimizations require the control flow graph of the input program to be known. The effectiveness of postpass analyses and optimizations strongly depends on the precision of the control flow reconstruction. If traditional reconstruction techniques are applied for processors with predicated instructions, their precision is seriously deteriorated. In this paper a generic algorithm is presented that can precisely reconstruct control flow from predicated assembly code. The algorithm is incorporated in the Propan system that enables high-quality machine-dependent postpass optimizers to be generated from a concise hardware specification. The control flow reconstruction algorithm is machine-independent, and automatically derives the required hardware-specific knowledge from the machine specification. Experimental results obtained for the Philips TriMedia TM1000 processor show that the precision of the reconstructed control flow is significantly higher than with reconstruction algorithms that do not specifically take predicated instructions into account.

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. Rau, B., Fisher, J.: Instruction-Level Parallel Processing: History, Overview, and Perspective. The Journal of Supercomputing 7, 9–50 (1993)

    Article  Google Scholar 

  2. Park, J., Schlansker, M.: On Predicated Execution. Tech. Rep. HPL-91-58, Hewlett-Packard Laboratories, Palo Alto CA (May 1991)

    Google Scholar 

  3. Dehnert, J., Towle, R.: Compiling for the Cydra 5. The Journal of Supercomputing 1/2, 181–228 (1993)

    Article  Google Scholar 

  4. Hu, P.: Static Analysis for Guarded Code. In: Languages, Compilers, and Run- Time Systems for Scalable Computers, pp. 44–56 (2000)

    Google Scholar 

  5. Philips Electronics North America Corporation, TriMedia TM1000 Preliminary Data Book (1997)

    Google Scholar 

  6. Analog Devices, ADSP-2106x SHARC User’s Manual (1995)

    Google Scholar 

  7. Intel, IA-64 Architecture Software Developer’s Manual, Vol  1: IA-64 Application Architecture, Revision 1.1 (July 2000)

    Google Scholar 

  8. Zivojnovic, V., Velarde, J., Schläger, C., Meyr, H.: DSPSTONE: A DSPOriented Benchmarking Methodology. In: Proceedings of the International Conference on Signal Processing Applications and Technology (1994)

    Google Scholar 

  9. Leupers, R.: Retargetable Code Generation for Digital Signal Processors. Kluwer Academic Publishers, Dordrecht (1997)

    MATH  Google Scholar 

  10. Kästner, D., Langenbach, M.: Code Optimization by Integer Linear Programming. In: Jähnichen, S. (ed.) CC 1999. LNCS, vol. 1575, pp. 122–137. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  11. Kästner, D.: PROPAN: A Retargetable System for Postpass Optimisations and Analyses. In: Proceedings of the ACM SIGPLAN Workshop on Languages, Compilers and Tools for Embedded Systems (June 2000)

    Google Scholar 

  12. Kästner, D.: Retargetable Code Optimisation by Integer Linear Programming. PhDthesis, Saarland University (2000)

    Google Scholar 

  13. Kästner, D., Wilhelm, S.: Generic Control Flow Reconstruction from Assembly Code. In: Proceedings of the ACM SIGPLAN Joined Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES 2002) and Software and Compilers for Embedded Systems (SCOPES 2002) (June 2002)

    Google Scholar 

  14. Larus, J., Schnarr, E.: EEL: Machine-Independent Executable Editing. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 291–300 (1995)

    Google Scholar 

  15. Theiling, H.: Extracting Safe and Precise Control Flow from Binaries. In: 7th International Conference on Real-Time Computing Systems and Applications (July 2000)

    Google Scholar 

  16. Cifuentes, C., Simon, D., Fraboulet, A.: Assembly to High-Level Language Translation, August 1998, pp. 228–237 (1998)

    Google Scholar 

  17. Cifuentes, C.: Interprocedural Data Flow Decompilation. Tech. Rep. 4(2) (June 1996)

    Google Scholar 

  18. Warter, N.J., Mahlke, S.A., Hwu, W.-M.W., Rau, B.R.: Reverse If-Conversion. ACM SIGPLAN Notices 28(6), 290–299 (1993)

    Article  Google Scholar 

  19. Kästner, D.: ILP-based Approximations for Retargetable Code Optimization. In: Proceedings of the 5th International Conference on Optimization: Techniques and Applications, (ICOTA 2001) (2001)

    Google Scholar 

  20. Allen, J., Kennedy, K., Porterfield, C., Warren, J.: Conversion of control dependenceto data dependence. In: Conference record of the 10th ACM Symposium on Principles of Programming Languages (POPL), pp. 177–189 (1983)

    Google Scholar 

  21. Hoogerbrugge, J., Augusteijn, L.: Instruction Scheduling for TriMedia (1999)

    Google Scholar 

  22. Martin, F.: Generation of Program Analyzers. PhD thesis, Saarland University (1999)

    Google Scholar 

  23. Kästner, D.: TDL: A Hardware and Assembly Description Language. Tech. Rep. TDL1.4, Transferbereich 14, Saarland University (2000)

    Google Scholar 

  24. Decker, B.: Generic Reconstruction of Control Flow for Guarded Code from Assembly. Master’s thesis, Saarland University (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

Decker, B., Kästner, D. (2003). Reconstructing Control Flow from Predicated Assembly Code. 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_7

Download citation

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

  • 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