1. A method to perform speculative code motion within a single static form partial redundancy elimination (SSAPRE) optimization, within an compiler, comprising the steps of: (1) accessing a static single assignment (SSA) representation of a computer program; (2) obtaining an SSA graph of the hypothetical variable from said SSA representation of said computer program, wherein said SSA graph comprises a plurality of connected components; (3) using a heuristic to determine a plurality of points to enable speculation within each of said plurality of connected components of said SSA graph; and (4) performing the SSAPRE optimization whereby setting a down.sub.-- safety flag to true for a .PHI. function of each of said determined plurality of points within each of said plurality of connected components of said SSA graph; whereby the compiler can produce more efficient executable program code from said SSA graph by speculating at each of said determined plurality of points where said down.sub.-- safety flag is true.