Straight path optimization for compilers
Abstract
A pragma is defined to indicate straight path optimization for compilers (SPOC). The pragma is inserted into source code to identify the most common case for a branch point in a program flow, determined by analysis of performance data or simple prediction. The compiler employs this information to optimize the common case as a straight path through the function assembler code, removing unnecessary jumps and the nonoptimized case from the function body. The resulting executable code is more compact and executes faster.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 15 · Forward citations: 23.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method of implementing straight path optimization for compilers, comprising: within source code for a program, inserting a compiler directive at a beginning of source code for a selected path from a branch within the program, wherein the compiler directive designates a path from among at least two alternative paths from the branch to be straight path optimized; and responsive to detecting the compiler directive during compilation of the source code, generating sequential executable instructions for a path designated to be straight path optimized by the compiler directive and placing the ge
- Claim 2Depends on #1
The method of claim 1, further comprising: emplo
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗