From b5d7fb73ae76613f1c3bc637bae56c37258de640 Mon Sep 17 00:00:00 2001 From: Nora Sandler Date: Thu, 8 Feb 2024 19:52:23 +0000 Subject: [PATCH] update README for whole pipeline tests --- tests/chapter_19/whole_pipeline/README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/chapter_19/whole_pipeline/README.md b/tests/chapter_19/whole_pipeline/README.md index 53a42901..ff2762b2 100644 --- a/tests/chapter_19/whole_pipeline/README.md +++ b/tests/chapter_19/whole_pipeline/README.md @@ -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). \ No newline at end of file +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`. \ No newline at end of file