命令スケジューリングとは?
命令スケジューリングは、プロセッサのパイプラインでのストールを減らすために機械命令の順序を組み替えるコンパイラの最適化です。メモリロードのような遅い操作を待つ間に生じる隙間を埋めるため、独立した処理を移動させます。並べ替えはデータ依存を尊重しなければならず、観測される結果は変わりません。
なぜ重要か
現代のCPUは命令をパイプラインで実行するため、順序の悪いコードはパイプラインをアイドルにします。スケジューリングはその無駄になったサイクルを取り戻し、ホットループを目に見えて高速化できます。
関連ガイド
What Is Register Allocation?Register allocation is the compiler step that decides which program values are kept in fast CPU registers and…
What Is Peephole Optimization?Peephole optimization improves code by examining a small sliding window of instructions and replacing ineffic…
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…