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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Rau, B., Fisher, J.: Instruction-Level Parallel Processing: History, Overview, and Perspective. The Journal of Supercomputing 7, 9–50 (1993)
Park, J., Schlansker, M.: On Predicated Execution. Tech. Rep. HPL-91-58, Hewlett-Packard Laboratories, Palo Alto CA (May 1991)
Dehnert, J., Towle, R.: Compiling for the Cydra 5. The Journal of Supercomputing 1/2, 181–228 (1993)
Hu, P.: Static Analysis for Guarded Code. In: Languages, Compilers, and Run- Time Systems for Scalable Computers, pp. 44–56 (2000)
Philips Electronics North America Corporation, TriMedia TM1000 Preliminary Data Book (1997)
Analog Devices, ADSP-2106x SHARC User’s Manual (1995)
Intel, IA-64 Architecture Software Developer’s Manual, Vol 1: IA-64 Application Architecture, Revision 1.1 (July 2000)
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)
Leupers, R.: Retargetable Code Generation for Digital Signal Processors. Kluwer Academic Publishers, Dordrecht (1997)
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)
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)
Kästner, D.: Retargetable Code Optimisation by Integer Linear Programming. PhDthesis, Saarland University (2000)
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)
Larus, J., Schnarr, E.: EEL: Machine-Independent Executable Editing. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 291–300 (1995)
Theiling, H.: Extracting Safe and Precise Control Flow from Binaries. In: 7th International Conference on Real-Time Computing Systems and Applications (July 2000)
Cifuentes, C., Simon, D., Fraboulet, A.: Assembly to High-Level Language Translation, August 1998, pp. 228–237 (1998)
Cifuentes, C.: Interprocedural Data Flow Decompilation. Tech. Rep. 4(2) (June 1996)
Warter, N.J., Mahlke, S.A., Hwu, W.-M.W., Rau, B.R.: Reverse If-Conversion. ACM SIGPLAN Notices 28(6), 290–299 (1993)
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)
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)
Hoogerbrugge, J., Augusteijn, L.: Instruction Scheduling for TriMedia (1999)
Martin, F.: Generation of Program Analyzers. PhD thesis, Saarland University (1999)
Kästner, D.: TDL: A Hardware and Assembly Description Language. Tech. Rep. TDL1.4, Transferbereich 14, Saarland University (2000)
Decker, B.: Generic Reconstruction of Control Flow for Guarded Code from Assembly. Master’s thesis, Saarland University (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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