Project Stage 2 (Part 4): Testing and Results
Testing the Pass With the logic in place, I tested the pass using the provided test cases. 1. Extracting the Test Cases cp /public/spo600-test-clone.tgz ~/test-clone cd ~/test-clone tar -xvf spo600-test-clone.tgz 2. Compiling the Test Programs Then I used the modified GCC, I compiled the test programs: ~/gcc-install/bin/gcc -fdump-tree-ctyler test-clone-arch-prune.c -o prune-test ~/gcc-install/bin/gcc -fdump-tree-ctyler test-clone-arch-noprune.c -o noprune-test 3. Results With test case : test-clone-arch-prune. This test involved two functions that were equivalent after optimizations. The expectiation was for the pass to emit the message: PRUNE: test_function indicating that the clone could be safely removed. The .ctytler dump file showed: PRUNE: test_function And to the test case test-clone-arch-noprune. The expected diagnostic message was NOPRUNE: test_function Unfortunately, this test did not pass as expected Challenges Gimple Variations : The pass misint...