Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove unused parts of native compiler #1205

Merged
merged 17 commits into from
Jan 12, 2025

Conversation

yi-sun
Copy link
Collaborator

@yi-sun yi-sun commented Jan 11, 2025

Removes:

  • DslIr::Loop
  • exp_bits<V> and other assorted exp_bits functions
  • HintBitsU
  • assert_ne
  • LessThanV, LessThanVI
  • get_ptr, get_ref, ptr_at
  • Ref
  • Array<C, V>.assert_len()

Closes INT-2994, INT-3014

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Array::Dyn(ptr, len) => {
if self.flags.debug {
let valid = self.lt(index, len.clone());
self.assert_var_eq(valid, C::N::ONE);
Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to keep debug, a useful check here that is not lt is that index != len (since most index-out-of-bounds happen at len). I had used this to find some bugs at some point.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, unfortunately I also removed assert_ne in this PR since it was only used once in the entire codebase (to check non-zero). I'll come back to revisit this.

@yi-sun yi-sun force-pushed the feat/native-load-store-block branch from 7e00bd1 to 1cae05e Compare January 12, 2025 05:57
Base automatically changed from feat/native-load-store-block to native-cleanup January 12, 2025 06:06
@yi-sun yi-sun force-pushed the feat/native-remove-unused branch from 975f6a2 to 1618343 Compare January 12, 2025 06:09
Copy link

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (-342 [-9.0%]) 3,461 (-35208 [-4.7%]) 711,284 (-4503679 [-15.0%]) 25,510,945 - - -
fibonacci_program (-39 [-0.6%]) 6,044 1,500,137 51,505,102 - - -
regex_program (+715 [+3.9%]) 19,101 4,190,904 165,028,173 - - -
ecrecover_program (-23 [-0.9%]) 2,606 285,401 15,092,297 - - -

Commit: 1618343

Benchmark Workflow

@yi-sun yi-sun merged commit 431d5ea into native-cleanup Jan 12, 2025
22 checks passed
@yi-sun yi-sun deleted the feat/native-remove-unused branch January 12, 2025 06:18
yi-sun added a commit that referenced this pull request Jan 12, 2025
* chore: remove unused Loop opcode

* chore: remove unused exp_bits<V> function

* chore: remove unused HintBitsU

* chore: remove unused functions

* chore: remove unused

* feat: remove assert_ne from Var

* fix: lint

* feat: remove LessThanV, LessThanVI

* chore: add comments

* fix: spelling of committed

* chore: remove unused get_ref

* chore: remove unused get_ref

* chore: remove unused ptr_at

* fix: cache address

* feat: remove Ref

* feat: remove assert_len

* fix: lint
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