1. A code generation method, comprising: 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 incoming floating point expressions against the patterns in the table of patterns during compilation of a program.