-
-
Notifications
You must be signed in to change notification settings - Fork 865
feat[venom]: venom command line parameters #4757
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
base: master
Are you sure you want to change the base?
Conversation
AssignElimination(ac, fn).run_pass() | ||
CSE(ac, fn).run_pass() | ||
def _run_passes(fn: IRFunction, flags: VenomOptimizationFlags, ac: IRAnalysesCache) -> None: | ||
passes = OPTIMIZATION_PASSES.get(flags.level, OPTIMIZATION_PASSES[OptimizationLevel.O2]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better to fail with a key lookup error since it indicates a mistake in the optimization passes dict (or how we have constructed flags.level)
if field.name == "venom_flags": | ||
# Skip venom_flags - we'll handle it after optimization level is merged | ||
continue | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can dedent this - no need for else since the if
branch hits continue
if args.no_inlining: | ||
settings.venom_flags.disable_inlining = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we do it like this?
if args.no_inlining: | |
settings.venom_flags.disable_inlining = True | |
settings.venom_flags.disable_inlining = args.no_inlining |
|
||
# Disable flags - default False means optimization is enabled | ||
# These are used to override the defaults for the optimization level | ||
disable_inlining: bool = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure there is anything to be done atm but i am concerned about long term drift between these fields and the relevant code in vyper_compile.py and vyper_json.py
What I did
How I did it
How to verify it
Commit message
Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)
Description for the changelog
Cute Animal Picture