diff options
| author | Cliff Click <cliffc@acm.org> | 2026-10-03 09:29:42 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2026-10-03 09:29:42 -0700 |
| commit | c3958e34c0de21df52e57e47e4f47ffe6464f138 (patch) | |
| tree | aa9ae69508ed9e6b9a73237922edbe13442a5238 /chapter09/README.md | |
| parent | 41ae6269689e2b3cde9f7ac4227923d4085dceda (diff) | |
| download | Simple-c3958e34c0de21df52e57e47e4f47ffe6464f138.tar.gz Simple-c3958e34c0de21df52e57e47e4f47ffe6464f138.zip | |
Graph updates; readme updates
Diffstat (limited to 'chapter09/README.md')
| -rw-r--r-- | chapter09/README.md | 8 |
1 files changed, 8 insertions, 0 deletions
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. +  Enabling the post parse worklist based optimization yields below. Notice that now the graph shows `arg+2` inside the |
