Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e3c8523
test that disables optional passes
HodanPlodky Aug 13, 2026
2b6d944
fix for remove unused variables (removing insts with read effect)
HodanPlodky Aug 13, 2026
7809019
fix for the case sccp does not guarantee that
HodanPlodky Aug 14, 2026
06ff659
test with proper fuzz
HodanPlodky Aug 14, 2026
e42e9a1
remove poors man fuzzing from the normal tests
HodanPlodky Aug 14, 2026
038cd56
lint
HodanPlodky Aug 14, 2026
84c1a5b
check for spaces that do not have alias analysis
HodanPlodky Aug 17, 2026
26a8a63
removed check if it ran (does not change the validity of the test)
HodanPlodky Aug 17, 2026
4a8f25f
lint
HodanPlodky Aug 17, 2026
73f093c
monkey patch in context to remove interference
HodanPlodky Aug 25, 2026
da07d23
Merge branch 'master' into fix/venom/pass-disable-testing
HodanPlodky Aug 26, 2026
6da9c9f
added RemoveUnusedVariablesPass pass to the fuzzed passes and fixed bugs
HodanPlodky Aug 27, 2026
c3159ac
removed temp test
HodanPlodky Aug 27, 2026
4ef25da
lint
HodanPlodky Aug 27, 2026
770ee21
Merge branch 'master' into fix/venom/pass-disable-testing
HodanPlodky Aug 28, 2026
73616d0
Merge branch 'master' into fix/venom/pass-disable-testing
HodanPlodky Aug 31, 2026
64a85d4
lint
HodanPlodky Aug 31, 2026
3d4fc91
fix for insts that have effects outside of the alias
HodanPlodky Aug 31, 2026
ad1f1f6
assert for the retpc in inliner and correct format in tests
HodanPlodky Sep 1, 2026
79130e8
used retpc_param instead of param in dalloca test
HodanPlodky Sep 1, 2026
7b90af6
another param -> retpc_param
HodanPlodky Sep 1, 2026
a4ba5ba
cleanup few asserts
HodanPlodky Sep 1, 2026
63390ae
removed fixes since they are moved into different PR
HodanPlodky Sep 3, 2026
c281bcd
Merge branch 'master' into fix/venom/pass-disable-testing
HodanPlodky Sep 8, 2026
19cb681
Merge branch 'master' into fix/venom/pass-disable-testing
HodanPlodky Sep 15, 2026
fdb5b41
Merge branch 'master' into fix/venom/pass-disable-testing
HodanPlodky Sep 21, 2026
bb1663d
Merge branch 'master' into fix/venom/pass-disable-testing
HodanPlodky Sep 25, 2026
b8a6d8e
Merge branch 'master' into fix/venom/pass-disable-testing
HodanPlodky Sep 30, 2026
0a2db65
Merge branch 'master' into fix/venom/pass-disable-testing
HodanPlodky Oct 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions tests/functional/examples/thirdparty/test_thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ def get_example_vy_filenames():

@pytest.mark.parametrize("vy_filename", get_example_vy_filenames())
def test_compile(vy_filename):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Retain the legacy StackTooDeep xfail

In the regular test matrix where --experimental-codegen is absent, this test compiles through the legacy backend, so implementation_v_700.vy still reaches the documented StackTooDeep: Unsupported dup depth 17 failure. The compiler changes in this commit are confined to the Venom backend and cannot fix that legacy path; removing the filename-specific xfail therefore makes every non-experimental matrix job fail when this parameter is collected.

Useful? React with 👍 / 👎.

if vy_filename == "curvefi/amm/stableswap/implementation/implementation_v_700.vy":
pytest.xfail("StackTooDeep: Unsupported dup depth 17")

with open(dir_path / vy_filename) as f:
source_code = f.read()
compiler.compile_code(source_code)
93 changes: 93 additions & 0 deletions tests/functional/examples/thirdparty/test_thirdparty_fuzz.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import glob
from pathlib import Path

import pytest
from hypothesis import HealthCheck, Phase, given, settings
from hypothesis import strategies as st

import vyper.compiler as compiler
from vyper.venom.passes import (
CSE,
SCCP,
AffineFoldingPass,
AlgebraicOptimizationPass,
AssertCombinerPass,
AssertEliminationPass,
AssignElimination,
BranchOptimizationPass,
DeadStoreElimination,
DFTPass,
InternalReturnCopyForwardingPass,
LoadElimination,
Mem2Var,
MemMergePass,
MemoryCopyElisionPass,
OverflowEliminationPass,
PhiEliminationPass,
ReadonlyInvokeArgCopyForwardingPass,
ReduceLiteralsCodesize,
RemoveUnusedVariablesPass,
RevertToAssert,
TailMergePass,
)

dir_path = Path(__file__).parent


def get_example_vy_filenames():
return glob.glob("**/*.vy", root_dir=dir_path, recursive=True)


pass_to_disable = [
AffineFoldingPass,
AlgebraicOptimizationPass,
AssertCombinerPass,
AssertEliminationPass,
AssignElimination,
BranchOptimizationPass,
CSE,
DeadStoreElimination,
DFTPass,
InternalReturnCopyForwardingPass,
ReduceLiteralsCodesize,
LoadElimination,
Mem2Var,
MemMergePass,
MemoryCopyElisionPass,
OverflowEliminationPass,
PhiEliminationPass,
ReadonlyInvokeArgCopyForwardingPass,
RevertToAssert,
SCCP,
TailMergePass,
RemoveUnusedVariablesPass,
]

any_passes = st.lists(st.sampled_from(pass_to_disable), min_size=2, max_size=10, unique=True)


@pytest.mark.parametrize("vy_filename", get_example_vy_filenames())
@settings(
suppress_health_check=[HealthCheck.function_scoped_fixture],
max_examples=10,
phases=[Phase.generate],
)
@given(passes_to_disable=any_passes)
@pytest.mark.fuzzing
def test_compile_pass_fuzz(vy_filename, passes_to_disable, compiler_settings, monkeypatch):
if not compiler_settings.experimental_codegen:
pytest.skip()
Comment on lines +78 to +79

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Enable Venom in the fuzz workflow

In the checked fuzzing job at .github/workflows/test.yml:281-290, pytest is invoked with -m "fuzzing" but without --experimental-codegen; that option is store_true and therefore the compiler_settings fixture leaves experimental codegen disabled. Consequently every instance of this newly added test takes this skip, so none of the pass-disable combinations run in CI.

Useful? React with 👍 / 👎.


with open(dir_path / vy_filename) as f:
source_code = f.read()

with monkeypatch.context() as m:
run = []

def temp(*args, **kwargs):
run.append(True)
Comment on lines +85 to +88

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict generated passes to the active optimization pipeline

When this test is invoked with experimental codegen and the default gas/O2 optimization level, generated entries such as AssertEliminationPass, OverflowEliminationPass, ReduceLiteralsCodesize, and TailMergePass are not present in PASSES_O2, so their patched methods are never called. Because the run tracking list is not checked, examples containing only those passes pass vacuously, while mixed examples disable only part of the generated subset; filter the strategy by the selected pipeline or assert that every selected pass actually ran.

Useful? React with 👍 / 👎.


for pass_to_disable in passes_to_disable:
m.setattr(pass_to_disable, "run_pass", temp)

compiler.compile_code(source_code)
Loading