Static Single Assignment とは?
static single assignment、すなわち SSA は、すべての変数が正確に 1 回だけ代入され、再代入のたびに新しいバージョン名が作られるコンパイラの中間表現です。制御フローが合流する箇所では、特別な phi ノードがどのバージョンがその地点に到達するかを選びます。この単一定義の性質により、データ依存が明示的になり追跡しやすくなります。
なぜ重要か
SSA 形式は、各値にたどるべき単一で曖昧さのない定義があるため、多くの最適化をより単純かつ高速にします。現代のコンパイラの定数伝播やデッドコード除去といったパスの基盤です。
関連ガイド
What Is a Control Flow Graph?A control flow graph represents a function as basic blocks connected by edges showing every path execution ca…
What Is Common Subexpression Elimination?Common subexpression elimination removes redundant computations by reusing a previously computed result inste…
What Is a Basic Block?A basic block is a straight-line sequence of instructions with one entry and one exit, used as the unit of an…