Optimal floating-point expression translation method based on pattern matching
Abstract
Embodiments of the present invention include code generation methods. In one embodiment, a table of patterns is generated. Each pattern in the table includes an FMA (fused multiply-add) DAG (Directed Acyclic Graph), a canonical form equivalent of the FMA DAG, and a shape corresponding to the canonical form equivalent. Incoming floating-point expressions are matched against the patterns in the table during compilation of a program to obtain optical sequences of FMA, FMS (fused multiply-subtract), and FNMA (fused negate multiply-add) instructions as compiled instructions for computing the floating point expressions.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 6 · Forward citations: 8.
Claims (3 — 1 Independent, 2 Dependent)
- Claim 1Independent Claim
A computer implemented code generation method, comprising: a compiler generating a table of patterns, each pattern in the table comprising an FMA (fused multiply-add) DAG (Directed Acyclic Graph), a canonical form equivalent of the FMA DAG, and a shape corresponding to the canonical form equivalent; and matching a DAG representing incoming floating point expressions in a source code program received by the compiler against the patterns in the table of patterns during compilation of the program; the compiler generating a sequence of optimized FMA instructions to compute the floating-point expre
- Claim 2Depends on #1
The method of claim 1 , wherein generating the table of patterns occurs once during compilation of the compiler.
- Claim 3Depends on #1
The method of claim 1 , wherein the FMA DAG comprises a sequence of FMA instructions that form a Directed Acyclic Graph.
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (8 of 8 total)
References Cited — Backward Prior Art (6)
Non-Patent Literature (5)
- A. Aho, S. Johnson, J. Ullman "Code Generation for Expressions with Common Subexpressions", 1977, Journal of the ACM (JACM).
- Andersson, Niclas et al., "Overview and industrial application of code generator generators", Journal of Systems and Software, vol. 32, Issue 3, Mar. 31, 1996, pp. 185-214.
- International Preliminary Report on Patentability received for PCT Patent Application No. PCT/RU2006/000152, mailed on Oct. 9, 2008, 10 pages.
- International Search Report and Written Opinion received for PCT Patent Application No. PCT/RU2006/000152, mailed on Jan. 23, 2007, 13 pages.
- K. Keutzer "DAGON: Technology binding and Local Optimization by DAG Matching", 1987, 24th conference on Design Automation.