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

chore: fix some TODOs, cleanup #11

Merged
merged 1 commit into from
Apr 27, 2024
Merged

chore: fix some TODOs, cleanup #11

merged 1 commit into from
Apr 27, 2024

Conversation

DaniPopes
Copy link
Member

No description provided.

@@ -755,20 +774,19 @@ impl<'a, 'ctx> Builder for EvmLlvmBuilder<'a, 'ctx> {
self.imul(lhs, rhs)
}

// - [Avoid using arithmetic intrinsics](https://llvm.org/docs/Frontend/PerformanceTips.html)
// - [Don't use usub.with.overflow intrinsic](https://github.com/rust-lang/rust/pull/103299)
// - [for unsigned add overflow the recommended pattern is x + y < x](https://github.com/rust-lang/rust/pull/124114#issuecomment-2066173305)
Copy link
Member Author

Choose a reason for hiding this comment

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

should improve runtime perf a bit as canonical form is better for optimizations

@@ -13,8 +13,6 @@ use std::{
path::{Path, PathBuf},
};

// TODO: Add `nuw`/`nsw` flags to stack length arithmetic.
Copy link
Member Author

Choose a reason for hiding this comment

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

no point, llvm figures it out on its own most of the time and it's not worth the effort otherwise

@DaniPopes DaniPopes merged commit a30e664 into main Apr 27, 2024
12 checks passed
@DaniPopes DaniPopes deleted the dani/fix-todos branch April 27, 2024 08:06
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