Skip to content

Conversation

@eytan-starkware
Copy link
Contributor

@eytan-starkware eytan-starkware commented Dec 2, 2025

Add Tracing to Lowering Optimizations

TL;DR

Added tracing support to the lowering optimization phase to improve debugging capabilities.

What changed?

  • Added tracing dependency to cairo-lang-lowering crate
  • Created debug and trace macros in the optimizations module with an "optimization" target
  • Added debug logging for optimization phase application
  • Updated Cargo.lock with the new dependency

How to test?

Run the compiler with tracing enabled to see optimization logs:

RUST_LOG=optimization=debug cargo run -- compile <file>

Why make this change?

This change improves the observability of the optimization process, making it easier to debug and understand which optimizations are being applied during compilation. The targeted logging will help developers track optimization behavior without cluttering logs with unrelated information.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

eytan-starkware commented Dec 2, 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.

4 participants