Take one ADD site and one XOR site. For each:
- Write the identity the pass used, as algebra, and check it holds modulo 2³².
- Find the site in the substituted IR and in the substituted disassembly. Note which IR values are dead.
- Say what the backend did between those two files.
- Then find the same site in the
-O1metrics and say what is left.
Then the part that carries the marks: write two sentences about what you have established, one of which begins “this does not show that”.
A1 is published now and is built from exactly this exercise on a pair you have not seen.
Files
| File | What it is |
|---|---|
baselines/demo_substitution.ll | clean O0 IR — the comparator |
s01_ollvm_sub/target_function.ll | post-pass substituted IR, all 24 sites |
baselines/demo_substitution_disassembly.txt | clean x64, AT&T order |
s01_ollvm_sub/demo_substitution_disassembly.txt | substituted x64, Intel order |