Skip to content

Commit

Permalink
update README for whole pipeline tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nlsandler committed Feb 8, 2024
1 parent 125a59d commit b5d7fb7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/chapter_19/whole_pipeline/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
To validate that all optimization passes were run until the results converge, the test script inspects the assembly for any functions starting with `target`.
To validate that all optimization passes were run until the results converge, the test script inspects the assembly for any functions starting with `target`. Many of the tests in this chapter focus on validating constant-folding logic that we couldn't validate before we'd implemented copy propagation (like constant folding with chararacter types and negative numbers). Others validate copy-propagation logic that we couldn't validate before implementing dead storee limination.

In one test program (`alias_analysis_change.c`) we make sure that stores of specific constants were removed, just like we do for some dead store elimination tests. In the remaining test programs, we validate that each target function is optimized down to a single `Return` instruction, much like we do for other dead store elimination tests. Many of the tests in this chapter focus on validating constant-folding logic that we couldn't validate before we'd implemented copy propagation (like constant folding with chararacter types and negative numbers).
In one test program (`alias_analysis_change.c`) we make sure that stores of specific constants were removed, just like we do for some dead store elimination tests.

Some tests of constant folding validate that we remove all arithmetic instructions, conditional instructions, etc., similar to earlire constant-folding tests.

Some tests of copy propagation make sure that stores to a particular global variable were removed (because copy prop made a store to that variable dead) or uses of a particular global variable were removed (because copy prop replaced all uses of that variable).

In the remaining test programs, we validate that each target function is optimized down to a single `Return` instruction, much like we do for other dead store elimination tests.

To see what validateion we perform for each test program, see `test_framework/tacky/pipeline.py`.

0 comments on commit b5d7fb7

Please sign in to comment.