Transfer: an unfamiliar optimization - Internet Explorer
Address
https://freetolearn.world/compiler-optimizer-reading-10.html
free to learn.world
← Compiler Optimizer

Static school reading · Terminal implementation

Transfer: an unfamiliar optimization

Read here, then implement your own optimizer in the learner project. This page does not execute code, save answers or award results. Use the terminal tools to preserve first attempts, source versions, help and revisions.

The named U08/U09 reduction defect has passed an independent focused public-interface recheck. The owner package’s broader pending-review statements describe its original scope; the complete documented terminal route has since been exercised in a source-aware owner run. Browser and human learning are not claimed.

Get the learner project on GitHub
Setup, nine lessons and contracts

Transfer: an unfamiliar optimization

A foreign pass rewrites a packet-window kernel. Investigate it without a worked diagnosis, then replace its faulty behavior while retaining useful optimization.

Prerequisites: U01–U08. Create your own work/project.mjs; no project implementation is supplied. API.md specifies its interface.

Establish an original witness

Your project receives the original program and an inspectable transform. Read the IR and the transform, state a hypothesis and search for an input satisfying the declared signature. Require valid source and target programs, normal returns and a value or heap discrepancy.

The precise issue is not given here. Use the integer, control-flow and effect rules already established. A familiar-looking algebraic transformation is not evidence that its premises hold.

Retain the original program and input before reducing. The automated check will regenerate the target itself; an invented target or a manually edited output is not accepted.

Commit item 09a.

Reduce, explain and repair

Return a structurally smaller source that still exposes the discrepancy through the same foreign transform. This supplied program contains irrelevant executable work: decrease its block, definition/instruction or operand count under structuralMeasure. Shortening names, reformatting JSON, or changing only an unused literal cannot satisfy this final-project requirement. Different valid structural reductions are welcome. Explain which semantic premise fails, why your reduced example isolates it and which alternatives you ruled out.

Return a repair function that emits checked Editor artifacts. The repair may conservatively decline the problematic transformation, but it must preserve genuine optimization wins on the supplied scalar kernel. Returning every input unchanged is not a useful optimizer.

The checker tests your witness, reduced source, repaired boundary behavior and retained wins. Your explanation has a separate rubric review; passing mechanical checks does not certify the causal argument.

Deliver a portable investigation

node cli.mjs question 09b
node cli.mjs answer 09b work YOUR_LETTER --help-used none
node cli.mjs check 09 work --help-used none
node cli.mjs export work final-investigation.json
node cli.mjs restore final-investigation.json restored-work
node cli.mjs check 09 restored-work --help-used "restored my own work"

State the input domain you checked and distinguish it from untested cases. Describe the cost model and at least one legitimate optimization retained by the repair. Keep original and revised attempts, and disclose help.

This is a local course project with a bounded verifier. It is not evidence of general LLVM compatibility or universal compiler correctness. The course itself also remains a local candidate until its learner flow, human tryout and authorized public release are verified.

Return to setup and delivery limits

Course overviewInternet
Mission.txt - Notepad

Learning without paywalls.

Find what people pay to learn.
Build a great course. Give it away.

One course at a time.

Usage & privacy

Start