Skip to content

perf(semantic): inline enter_kind CFG statement handling#17433

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/12-27-perf_semantic_inline_enter_kind_cfg_statement_handling
Dec 28, 2025
Merged

perf(semantic): inline enter_kind CFG statement handling#17433
graphite-app[bot] merged 1 commit intomainfrom
c/12-27-perf_semantic_inline_enter_kind_cfg_statement_handling

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Dec 28, 2025

Ref #18098

Copy link
Contributor Author

camc314 commented Dec 28, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the C-performance Category - Solution not expected to change functional behavior, only performance label Dec 28, 2025
@graphite-app graphite-app bot changed the base branch from c/12-27-perf_semantic_inline_enter_kind_for_tstypereference_ to graphite-base/17433 December 28, 2025 16:27
@camc314 camc314 marked this pull request as ready for review December 28, 2025 16:28
@camc314 camc314 requested a review from Dunqing as a code owner December 28, 2025 16:28
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 28, 2025

CodSpeed Performance Report

Merging #17433 will not alter performance

Comparing c/12-27-perf_semantic_inline_enter_kind_cfg_statement_handling (4a9b302) with main (d08356e)1

Summary

✅ 42 untouched
⏩ 3 skipped2

Footnotes

  1. No successful run was found on main (4a9b302) during the generation of this report, so d08356e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@camc314 camc314 force-pushed the c/12-27-perf_semantic_inline_enter_kind_cfg_statement_handling branch from c4effd2 to 61bb03e Compare December 28, 2025 16:53
@camc314 camc314 force-pushed the graphite-base/17433 branch from eaf8531 to a1cd171 Compare December 28, 2025 16:53
@camc314 camc314 changed the base branch from graphite-base/17433 to c/12-27-perf_semantic_inline_enter_kind_for_tstypereference_ December 28, 2025 16:53
@camc314 camc314 force-pushed the c/12-27-perf_semantic_inline_enter_kind_cfg_statement_handling branch from 61bb03e to ed105c6 Compare December 28, 2025 17:09
@camc314 camc314 changed the base branch from c/12-27-perf_semantic_inline_enter_kind_for_tstypereference_ to graphite-base/17433 December 28, 2025 17:10
@camc314 camc314 requested review from Copilot and removed request for Dunqing December 28, 2025 18:42
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 28, 2025
@camc314 camc314 self-assigned this Dec 28, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes performance by inlining CFG (Control Flow Graph) statement handling instead of using a centralized approach. The refactoring moves enter_statement calls from the centralized enter_kind method directly into individual statement visitor methods.

  • Removes the centralized CFG statement handling logic from enter_kind
  • Adds inline control_flow! macro calls to each statement visitor method after enter_node
  • Creates new visitor method overrides for statements that previously used default walking behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@camc314 camc314 added 0-merge Merge with Graphite Merge Queue A-semantic Area - Semantic and removed A-semantic Area - Semantic 0-merge Merge with Graphite Merge Queue labels Dec 28, 2025
@camc314 camc314 force-pushed the graphite-base/17433 branch from a1cd171 to d08356e Compare December 28, 2025 20:01
@camc314 camc314 force-pushed the c/12-27-perf_semantic_inline_enter_kind_cfg_statement_handling branch from ed105c6 to 27acfd6 Compare December 28, 2025 20:01
@camc314 camc314 changed the base branch from graphite-base/17433 to c/12-27-perf_semantic_inline_enter_kind_for_tstypereference_ December 28, 2025 20:01
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 28, 2025

Merge activity

Base automatically changed from c/12-27-perf_semantic_inline_enter_kind_for_tstypereference_ to main December 28, 2025 20:08
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 28, 2025
@graphite-app graphite-app bot force-pushed the c/12-27-perf_semantic_inline_enter_kind_cfg_statement_handling branch from 27acfd6 to 4a9b302 Compare December 28, 2025 20:08
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 28, 2025
@graphite-app graphite-app bot merged commit 4a9b302 into main Dec 28, 2025
27 checks passed
@graphite-app graphite-app bot deleted the c/12-27-perf_semantic_inline_enter_kind_cfg_statement_handling branch December 28, 2025 20:14
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants