Skip to content

Fix redundant ops#7636

Merged
xunilrj merged 4 commits into
masterfrom
xunilrj/fix-redundant-ops
Jun 3, 2026
Merged

Fix redundant ops#7636
xunilrj merged 4 commits into
masterfrom
xunilrj/fix-redundant-ops

Conversation

@xunilrj
Copy link
Copy Markdown
Contributor

@xunilrj xunilrj commented May 26, 2026

Description

We have been considering any NOOP, and others, as redundant, but in reality they are only redundant if their const def registers are not read by the immediate op.

This PR takes this into consideration.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@xunilrj xunilrj self-assigned this May 26, 2026
@xunilrj xunilrj requested a review from a team as a code owner May 26, 2026 09:42
@xunilrj xunilrj temporarily deployed to fuel-sway-bot May 26, 2026 09:42 — with GitHub Actions Inactive
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 26, 2026

Merging this PR will improve performance by 10.44%

⚡ 1 improved benchmark
✅ 24 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
tokens_for_program 653.5 µs 591.7 µs +10.44%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing xunilrj/fix-redundant-ops (7575fe5) with master (cf225be)

Open in CodSpeed

@xunilrj xunilrj force-pushed the xunilrj/fix-redundant-ops branch from 3026b1f to 3d86c20 Compare May 27, 2026 18:24
@xunilrj xunilrj temporarily deployed to fuel-sway-bot May 27, 2026 18:24 — with GitHub Actions Inactive
@xunilrj xunilrj requested a review from ironcev May 28, 2026 07:42
@ironcev
Copy link
Copy Markdown
Member

ironcev commented May 31, 2026

👍

@xunilrj xunilrj enabled auto-merge (squash) May 31, 2026 11:07
Comment thread sway-core/src/asm_generation/fuel/optimizations/misc.rs Outdated
Comment thread sway-core/src/asm_generation/fuel/optimizations/misc.rs Outdated
@xunilrj xunilrj force-pushed the xunilrj/fix-redundant-ops branch from da9fcf1 to 7575fe5 Compare June 2, 2026 21:48
@xunilrj xunilrj deployed to fuel-sway-bot June 2, 2026 21:48 — with GitHub Actions Active
@xunilrj xunilrj requested a review from ironcev June 2, 2026 21:49
@xunilrj xunilrj merged commit ac933ff into master Jun 3, 2026
42 checks passed
@xunilrj xunilrj deleted the xunilrj/fix-redundant-ops branch June 3, 2026 12:25
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