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 --- chapter05/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'chapter05/README.md') diff --git a/chapter05/README.md b/chapter05/README.md index c507df07..426da6fb 100644 --- a/chapter05/README.md +++ b/chapter05/README.md @@ -297,6 +297,10 @@ if( arg==1 ) return a; ``` +The next two diagrams focus on the value rewrite. The unchanged `if` and +Region are omitted; Phi input 1 is the true arm and input 2 the false arm. +The Phis still use the same Region in the compiler's graph. + Pre-peephole we have: ![Graph4](./docs/05-graph4.svg) @@ -359,6 +363,10 @@ reason this pair of opposing rewrites terminates. ## More examples + +The next two simple `if` examples also omit control flow to highlight the +resulting values. Their Phi inputs retain the true/false order above. + ```java int c = 3; int b = 2; @@ -383,6 +391,9 @@ return a+b; ![Graph7](./docs/05-graph7.svg) +For nested branches, the control paths and Regions are shown so each Phi's +incoming paths remain clear: + ```java int a=1; if( arg==1 ) -- cgit v1.2.3