Abstract
Speculative execution of instructions is one of the primary means for enhancing program performance of superscalar and VLIW machines. One of the pitfalls of such compile-time speculative scheduling of instructions is that it may cause run-time exceptions that did not exist in the original version of the program.
As opposed to run-time hardware or software interception of such exceptions, we suggest that the compiler will analyze and prove the safety of those instructions that are candidates for speculative execution, rejecting the ones that have even a slight chance of causing an exception.
Load (moving a memory operand to a register) instructions are important candidates for speculative execution, since they precondition any follow-on computation on load-store architectures. To enable speculative loads, an algorithmic scheme for proving the safety of such instructions is presented and analyzed. Given a (novel) memory layout scheme which is specially tailored to support safe memory accesses, it has been observed that a significant part of load instructions can be proven safe and thus can be made eligible for speculative execution.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
A.V. Aho, R. Sethi, and J.D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley, 1985.
B. Alpern, M.N. Wegman, and F.K. Zadeck. Detecting equality of variables in programs. In ACM Symposium on Principles of Programming Languages, pages 1–11, 1988.
D. Bernstein and M. Rodeh. Global instruction scheduling for superscalar machines. In SIGPLAN Conference on Programming Languages Design and Implementation, pages 241–255, 1991.
P.P. Chang, S.A. Mahlke, W.Y. Chen, N.J. Warter, and W.W. Hwu. IMPACT: An architectural framework for multiple-issue processors. In IEEE Conference on Computer Architecture, pages 266–275, 1991.
K. Ebcioglu. Some design ideas for a VLIW architecture for sequential-natured software. In IFIP Conference on Parallel Processing, 1988.
J.R. Ellis. Bulldog: A Compiler for VLIW Architectures. PhD thesis, Yale University, February 1985.
K. Ebcioglu and T. Nakanati. A new compilation technique for parallelizing regions with unpredictable branches on a VLIW architecture. In Workshop on Languages and Compilers for Parallel Computing, 1989.
R. Gupta and M.L. Soffa. Region scheduling: An approach for detecting and redistributing parallelism. IEEE Transactions on Software Engineering, 16(4):421–431, 1990.
J.L. Hennessy. Program optimization and exception handling. In ACM Symposium on Principles of Programming Languages, pages 200–206, 1981.
J.L. Hennessy and T. Gross. Postpass code optimization of pipeline constraints. ACM Transactions on Programming Languages and Systems, 5:422–448, 1983.
K. Kennedy. Safety of code motion. Intern. J. Computer Math., 3:117–130, 1972.
K. Kennedy. A survey of data flow analysis techniques. In S.S. Muchnick and N.D. Jones, editors, Program Flow Analysis: Theory and Applications, chapter 1, pages 5–54. Prentice-Hall, 1981.
G.A. Kildall. A unified approach to global program optimization. In ACM Symposium on Principles of Programming Languages, pages 194–206, 1973.
J.B. Kam and J.D. Ullman. Global data flow analysis and iterative algorithms. Journal of the ACM, 23(1):158–171, 1976.
J.R. Larus. Restructuring Symbolic Programs for Concurrent Execution on Multiprocessors. PhD thesis, University of California, 1989.
E.W. Myers. A precise inter-procedural data flow algorithm. In ACM Symposium on Principles of Programming Languages, pages 219–230, 1981.
J.H. Reif and H.R. Lewis. Symbolic evaluations and the global value graph. In ACM Symposium on Principles of Programming Languages, pages 104–118, 1977.
B.K. Rosen, M.N. Wegman, and F.K. Zadeck. Global value numbers and redundant computations. In ACM Symposium on Principles of Programming Languages, pages 12–27, 1988.
S. Sagiv, N. Francez, M. Rodeh, and R. Wilhelm. A logic-based approach to data flow analysis problems. In P. Deransart and J. Maluszynkski, editors, LNCS 456, 2nd Workshop on Programming Language Implementation and Logic Programming. Springer-Verlag, 1990.
M.D. Smith, M.S. Lam, and M.A. Horowitz. Boosting beyond static scheduling in a superscalar processor. In IEEE Conference on Computer Architecture, pages 344–354, 1990.
H. Warren. Instruction scheduling for the IBM RISC System/6000. IBM Journal on Research and Development, pages 85–92, 1990.
M.N. Wegman and F.K. Zadeck. Constant propagation with conditional branches. In ACM Symposium on Principles of Programming Languages, 1985.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bernstein, D., Rodeh, M., Sagiv, M. (1992). Proving safety of speculative load instructions at compile-time. In: Krieg-Brückner, B. (eds) ESOP '92. ESOP 1992. Lecture Notes in Computer Science, vol 582. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55253-7_4
Download citation
DOI: https://doi.org/10.1007/3-540-55253-7_4
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55253-6
Online ISBN: 978-3-540-46803-5
eBook Packages: Springer Book Archive