Basic Block とは?
basic block は、先頭に単一の入口、末尾に単一の出口を持ち、その間に分岐の出入りがない、最大長の命令の並びです。実行がある basic block に入ると、その中の各命令は順に実行されます。コンパイラは、解析と最適化のための control flow graph を構築する際に、basic block をノードとして使います。
なぜ重要か
制御が basic block の途中に飛び込めないため、多くの最適化はそれを 1 つの不可分な単位として扱えます。ほとんどのコンパイラのデータフロー解析における基本的な粒度です。
関連ガイド
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 Register Allocation?Register allocation is the compiler step that decides which program values are kept in fast CPU registers and…