Skip to content

20260515 cse dominance trick#485

Closed
prozacchiwawa wants to merge 15 commits into
mainfrom
20260515-cse-dominance-trick
Closed

20260515 cse dominance trick#485
prozacchiwawa wants to merge 15 commits into
mainfrom
20260515-cse-dominance-trick

Conversation

@prozacchiwawa

@prozacchiwawa prozacchiwawa commented May 18, 2026

Copy link
Copy Markdown
Contributor

Note

Low Risk
Single redundant dialect flag assignment in module compile setup; no auth or I/O changes, and behavior should match the prior unconditional cse_dominance = true unless future stepping logic alters the dialect.

Overview
Module compilation now sets dialect.cse_dominance = true again inside the stepping branch of module_compile_opts, in addition to the existing unconditional enable at the start of that helper.

That flag switches the CSE optimizer to the corrected dominance rules (see before_cse_dominance_fix in cse.rs) instead of the legacy if-branch overlap behavior. The change is scoped to chialisp module builds, which already force int_fix, optimization, and a minimum stepping of 26 when stepping is present.

Reviewed by Cursor Bugbot for commit bed807f. Bugbot is set up for automated code reviews on this repo. Configure here.

@prozacchiwawa
prozacchiwawa marked this pull request as ready for review May 18, 2026 16:15
@prozacchiwawa
prozacchiwawa marked this pull request as draft May 18, 2026 16:15
Comment thread src/compiler/optimize/cse.rs
@prozacchiwawa
prozacchiwawa marked this pull request as ready for review May 18, 2026 18:20
@prozacchiwawa
prozacchiwawa changed the base branch from 20260514-tricky-cse-assign to main June 30, 2026 17:26

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bed807f. Configure here.

Comment thread src/compiler/compiler.rs
if stepping < 26 {
dialect.stepping = Some(26);
}
dialect.cse_dominance = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant CSE dominance assignment

Low Severity

The new dialect.cse_dominance = true inside the if let Some(stepping) block is a dead store. cse_dominance is already set to true unconditionally just above, so this assignment never changes behavior and only duplicates the existing enablement for modules.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit bed807f. Configure here.

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.

1 participant