From 81b654d76444d747fdf1d053760e507b50f26e18 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Mon, 5 Oct 2026 15:38:06 -0700 Subject: Small peep to drop simple store-updates out of loops --- docs/2026_REBASE/slides.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/2026_REBASE/slides.js') diff --git a/docs/2026_REBASE/slides.js b/docs/2026_REBASE/slides.js index de888f13..9ed9729e 100644 --- a/docs/2026_REBASE/slides.js +++ b/docs/2026_REBASE/slides.js @@ -116,7 +116,7 @@ id:'memory',label:'9–17b · Values, memory, scheduling',section:'Chapters 9–17b',minutes:5,steps:2,demo:'aliases', body:state=>'

Memory is dataflow, too.

'+source(state.demo||'aliases',true)+'

Partition memory into
equivalence classes.

'+memoryPartition(state)+states(state.demo==='memory'?[ '
data[i]Array element memory is another slice.
', - '
t.sum / t.visitsSeparate field classes carry separate dependencies.
', + '
t.sum / t.visitsCarry values around the loop; store the final totals once.
', '
4*arg + 10Runtime result; the graph still contains loops.
' ]:[ '
p.x → Pair.xAll Pair.x fields share one equivalence class.
', @@ -127,9 +127,9 @@ '0:00–0:45: Briefly show Domains and Memory types, then return to Examples. Use the partition picture: Pair.x, Pair.y, and the rest are disjoint equivalence classes whose union is whole memory. The classes group locations across all instances, not one class per object.', '0:45–1:15: Run make -C chapter17b view. Paste Short alias example. Show that p.y changes while p.x does not, and the result becomes zero.', '1:15–3:15: Trace the Loads and Store through their field equivalence classes. Same-class accesses may alias; different classes cannot. MemMerge recombines the slices without emitting an instruction. Explain why writing p.y does not clobber p.x. Read-only access would not make a Load independent of memory.', - '3:15–4:30: Switch back to this slide, select Array + object loops, Copy code, then compile it in the same viewer. Jump Last, fold/unfold the loops, and inspect loop-carried memory and the sum and visits aliases.', + '3:15–4:30: Switch back to this slide, select Array + object loops, Copy code, then compile it in the same viewer. Jump Last: array writes still carry memory around the first loop. The second loop carries sum and visits as scalar Phis; their stores move after the loop and their memory Phis disappear.', '4:30–5:00: GCM uses these dependencies to choose legal placements; it does not guess ordering from source order. Return to slides.' - ],'

The graph viewer captures parsing/optimization/type checking, not GCM execution. The large graph has 54 nodes at its final checkpoint; do not step through all 319 frames.

Research context: Diwan, McKinley, and Moss, Type-Based Alias Analysis, PLDI 1998, sections 3.5–3.6 (p. 113). A runtime upper bound left at most an average 2.5% more heap loads eliminable beyond their analysis on eight Modula-3 benchmarks. This is a load-elimination bound, not a speedup percentage. More static opportunities did not translate into corresponding runtime gains. This supports choosing useful, inexpensive alias distinctions; it does not establish that this exact equivalence-class scheme is optimal for Java. The study is a close match to the recalled oracle experiment, not an identified IBM/Java paper.

') + ],'

The graph viewer captures parsing/optimization/type checking, not GCM execution. The large graph has 52 nodes at its final checkpoint; do not step through all 333 frames.

Research context: Diwan, McKinley, and Moss, Type-Based Alias Analysis, PLDI 1998, sections 3.5–3.6 (p. 113). A runtime upper bound left at most an average 2.5% more heap loads eliminable beyond their analysis on eight Modula-3 benchmarks. This is a load-elimination bound, not a speedup percentage. More static opportunities did not translate into corresponding runtime gains. This supports choosing useful, inexpensive alias distinctions; it does not establish that this exact equivalence-class scheme is optimal for Java. The study is a close match to the recalled oracle experiment, not an identified IBM/Java paper.

') }, { id:'inline',label:'18 · Functions and Calls',section:'Chapter 18',minutes:5,steps:2,demo:'inline', -- cgit v1.2.3