You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.
With #39 , we'll have gas_charge AST nodes, explicitly charging gas. Each such charge leads to a computation (comparison, conditional branch and a subtraction) at the LLVM-IR level (#54). However, these charges can potentially be combined into a single computation. For example, expressions leading to a straight line sequence (until a branch) with all static charges can be combined into one static charge.
Such opportunities to combine gas charges must be explored and optimized.
The text was updated successfully, but these errors were encountered:
Another pattern to look for: When computing SizeOf a literal, if the literal's type guarantees a size statically, then replace that. This can help DCE do better. (such as eliminate dead loads since the only reason not-to is not knowing how much to charge).
With #87, more thought is needed on performing this optimization. For example:
gas_charge 10
let a = builtin div x y in
gas_charge 20
...
Cannot be replaced by a leading gas_charge 30 because a possible exception at the div will then impact the "gas remaining" (i.e., it'll be different than if the interpreter executed the code).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
With #39 , we'll have
gas_charge
AST nodes, explicitly charging gas. Each such charge leads to a computation (comparison, conditional branch and a subtraction) at the LLVM-IR level (#54). However, these charges can potentially be combined into a single computation. For example, expressions leading to a straight line sequence (until a branch) with all static charges can be combined into one static charge.Such opportunities to combine gas charges must be explored and optimized.
The text was updated successfully, but these errors were encountered: