# MiniC Compiler LAB5a (Control Flow Graph in SSA Form) & LAB5b (Smart Register Allocation), CAP 2023-24 # Authors Augustin LUCAS # Contents Extension implemented : Optimizing swap - Cycles of size 1 : skip - Cycles of size 2 : use 3 XOR operations to swap the registers values without any temporary register use # Test design No tests were added since some of the `students`' tests from lab4 still failed to execute properly. # Known bugs Failing tests: - `./TP04/tests/students/ext-for-fortran/test_imbricated_for.c` - `./TP04/tests/students/ext-for-fortran/test_for.c` - `./TP04/tests/students/base/test_nested_while.c` - `./TP04/tests/students/base/test_fibonacci.c` - `./TP04/tests/provided/dataflow/df03.c` The bug seems to be related to the handling of Offsets because a lot more tests will fail if temporaries are only assigned to memory (no registers). This can be done by commenting `TP05/SmartAllocator.py:124`. This seems to affect `while` and `for` loops as well as regular variables (because variables may not be stored/loaded correctly).