Skip to content

[Opt] Add TI_DUMP_CFG to dump CFG graph during optimization passes#318

Merged
hughperkins merged 11 commits into
mainfrom
hp/dump-cfg
Dec 18, 2025
Merged

[Opt] Add TI_DUMP_CFG to dump CFG graph during optimization passes#318
hughperkins merged 11 commits into
mainfrom
hp/dump-cfg

Conversation

@hughperkins

@hughperkins hughperkins commented Dec 14, 2025

Copy link
Copy Markdown
Collaborator

Issue: #

Brief Summary

Honor TI_DUMP_CFG=1 to dump CFG graph during optimization passes

  • dumps the statements as well as the graph, to facilitae reading
  • dumps to file to facilitate browsing through various cfg graphs, and also easily usable by Cursor
  • handles adding phase name to filename, so multiple passes don't overwrite each other

Using TI_DUMP_CFG instad of TI_DUMP_IR or TI_DUMP_SIMPLIFY, because these are fairly specialist files, and no point in writing them out systematically with TI_DUMP_IR I feel.

Example outputs:

Screenshot 2025-12-14 at 00 14 56 Screenshot 2025-12-14 at 00 15 00 ](url)

copilot:summary

Walkthrough

copilot:walkthrough

@hughperkins hughperkins marked this pull request as ready for review December 14, 2025 05:15
@hughperkins hughperkins enabled auto-merge (squash) December 18, 2025 00:38
@hughperkins hughperkins merged commit 226e558 into main Dec 18, 2025
45 of 46 checks passed
@hughperkins hughperkins deleted the hp/dump-cfg branch December 18, 2025 01:32
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.

3 participants