Skip to content

Comments

Optimized Assembly + New Test Suite + Bug Fixes#44

Open
sidrasali wants to merge 26 commits intomainfrom
fix-bugs
Open

Optimized Assembly + New Test Suite + Bug Fixes#44
sidrasali wants to merge 26 commits intomainfrom
fix-bugs

Conversation

@sidrasali
Copy link
Contributor

Changes in this PR:

  • Added precomputed assembly results based on each possible combination of optimizations. This way, whenever a user selects a set of optimizations in the optimization tab, these selections are also reflected in the assembly output
  • Improved optimization order based on a heuristic solution to the phase ordering problem
  • Added instruction count to the export of results so it can be displayed in the optimization view
  • Set up this test suite from "Writing a C Compiler" by Nora Sandler as additional verification for the compiler + Updated README with instructions on how to run the test suite
    Results of running the test suite: 2 test cases failed. These were due to:
    1. Conditional statement not being parsed with correct precedence (fixed ✅)
    2. Blocks having their own scope during IdentifierResolution. Fix: define an inner scope for compound statements but not for blocks, since blocks may already belong to an outer scope (✅)
  • Added exact location of error to exceptions (was missing for some).

... & other small improvements

@sidrasali sidrasali requested a review from JoudiAlakkad October 4, 2025 14:22
@github-actions
Copy link

github-actions bot commented Oct 4, 2025

@sidrasali sidrasali changed the title Precompute All Assembly + New Test Suite + Bug Fixes Optimize Assembly + New Test Suite + Bug Fixes Oct 4, 2025
@sidrasali sidrasali changed the title Optimize Assembly + New Test Suite + Bug Fixes Optimized Assembly + New Test Suite + Bug Fixes Oct 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants