diff options
Diffstat (limited to 'docs/chapter18')
| -rw-r--r-- | docs/chapter18/README.ja.md | 2 | ||||
| -rw-r--r-- | docs/chapter18/README.md | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/chapter18/README.ja.md b/docs/chapter18/README.ja.md index 380ea2f9..9b42f91e 100644 --- a/docs/chapter18/README.ja.md +++ b/docs/chapter18/README.ja.md @@ -221,6 +221,6 @@ code.driver(CodeGen.Phase.LocalSched); その後 [ListScheduler](../../src/main/java/com/seaofnodes/simple/ListScheduler.java) が各ブロックを順序付けます。未スケジュールの局所依存を数え、準備のできた演算を選び、依存が満たされるにつれてそのユーザーを準備済みにします。Phi は入口に、制御移動は出口に属します。ここには機械のタイミングモデルがなく、さまざまな改善の余地がありますが、この章の範囲外です。目標は、引き続き合法な実行順序です。 -[Eval2](../../src/test/java/com/seaofnodes/simple/Eval2.java) はそのスケジュールを実行し、IR の演算を、無制限の値スロットを持つ命令として扱います。各呼び出しには独自のフレームがあるため、同じノードの再帰的な呼び出しも異なる値を保持します。呼び出し時には、呼び出し元のフレームと復帰地点を保存し、呼び出される側のフレームを作り、選ばれた関数に移ります。return 時には呼び出し元を復元し、その CallEnd に値を渡します。Region では、結果を代入する前に、選ばれたすべての Phi 入力を読みます。そのため並列代入は正しさを保ちます。 +[Eval2](../../src/test/java/com/seaofnodes/simple/Eval2.java) は、この章から以前の `Evaluator` とその専用テストスケジューラを置き換えます。コンパイラが作ったスケジュールを実行し、IR の演算を、無制限の値スロットを持つ命令として扱います。各呼び出しには独自のフレームがあるため、同じノードの再帰的な呼び出しも異なる値を保持します。呼び出し時には、呼び出し元のフレームと復帰地点を保存し、呼び出される側のフレームを作り、選ばれた関数に移ります。return 時には呼び出し元を復元し、その CallEnd に値を渡します。Region では、結果を代入する前に、選ばれたすべての Phi 入力を読みます。そのため並列代入は正しさを保ちます。 これでスケジュールされた関数からなる実行可能なプログラムができましたが、演算はまだ機械に依存しません。[第19章](../chapter19/README.ja.md)では、スケジューリング前に命令選択を挿入します。これらの理想的な演算は、選んだ CPU のレジスタ制約と呼び出し規約を持つ命令になります。 diff --git a/docs/chapter18/README.md b/docs/chapter18/README.md index 570caf75..d8b238f8 100644 --- a/docs/chapter18/README.md +++ b/docs/chapter18/README.md @@ -363,7 +363,9 @@ belong at entry and control transfers at exit. There is room for all sorts of improvements - there is no machine timing model here, but this is out of scope for this chapter. The goal remains a legal execution order. -[Eval2](../../src/test/java/com/seaofnodes/simple/Eval2.java) executes that schedule, +[Eval2](../../src/test/java/com/seaofnodes/simple/Eval2.java) replaces the earlier +`Evaluator` and its separate test scheduler starting in this chapter. It executes +the compiler's schedule, treating IR operations as instructions with an unlimited supply of value slots. Each invocation has its own frame, so recursive invocations of the same nodes keep distinct values. At a call it saves the caller's frame and return |
