From c3958e34c0de21df52e57e47e4f47ffe6464f138 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sat, 3 Oct 2026 09:29:42 -0700 Subject: Graph updates; readme updates --- chapter09/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'chapter09/README.md') diff --git a/chapter09/README.md b/chapter09/README.md index 9c9eba07..5aa74a3b 100644 --- a/chapter09/README.md +++ b/chapter09/README.md @@ -187,6 +187,10 @@ Changes: ## Common SubExpressions via GVN +These diagrams focus on value dependencies. Routine control flow is omitted; +small True/False projections distinguish the two Returns in the first example. +Empty control slots can stand for omitted context, not missing compiler inputs. + ### Example 1 Here is a small example that illustrates how GVN enables finding common sub-expressions. @@ -245,6 +249,10 @@ return arg; While parsing the `while` loop it is not yet known that `step` is a constant and will not change. Therefore, without the post parse optimization we get the following: +The loop test and control backedge are omitted in both diagrams. The Phi's +data backedge remains, making the repeated additions and their replacement +easy to compare; its input 1 is the entry value and input 2 the next iteration. + ![Graph5](./docs/09-graph5.svg) Enabling the post parse worklist based optimization yields below. Notice that now the graph shows `arg+2` inside the -- cgit v1.2.3