Safe code-motion of dangerous instructions during compiler optimization
Abstract
A compiler can perform aggressive code motion optimization by respecting value dependence of safety values inserted into the intermediate representation of a computer program. In one embodiment, the present invention includes converting a computer program into an intermediate representation, the intermediate representation containing at least one safety check ensuring the safety of at least one dangerous instruction. In one embodiment, the invention further includes defining a safety value in the intermediate representation as the safety check and including the safety value as a safety argument of the dangerous instruction. In one embodiment, it is determined that the safety check is redundant. In response, in one embodiment, the invention includes updating the safety argument of the dangerous instruction, and eliminating the safety check from the intermediate representation during the safety check elimination optimization. Other embodiments are described and claimed.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 2 · Forward citations: 11.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method comprising: converting, via a processor, a computer program authored in a type-safe and memory-safe programming language and stored in a memory coupled to the processor into an intermediate representation, the intermediate representation containing a first safety check of an object reference used in a first operation included in a first and a second instruction of the computer program, wherein the first safety check throws an exception to exit the program in a safe manner when the object reference is unsafe and the safety check comprises one of a null check, a zero check, a type check
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (11 of 11 total)
References Cited — Backward Prior Art (2)
Non-Patent Literature (2)
- Bellia et al (Higher Order Programming through Java Reflection, Concurrency Specification and Programming 2004, vol. 3, pp. 447-459, 2004).
- Suganuma et al., "Overview of the IBM Java Just-in-Time Compiler", IBM Systems Journal, vol. 39, No. 1, 2000.