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

memmerge pass flushes too aggressively on certain barriers #4420

Open
charles-cooper opened this issue Dec 21, 2024 · 0 comments
Open

memmerge pass flushes too aggressively on certain barriers #4420

charles-cooper opened this issue Dec 21, 2024 · 0 comments
Assignees
Labels
bug - bytecode performance bug affecting bytecode performance (not correctness) venom

Comments

@charles-cooper
Copy link
Member

charles-cooper commented Dec 21, 2024

Version Information

  • vyper Version (output of vyper --version): 9c98b3e

What's your issue about?

the following venom program is resistant to the memory merge pass. the sequence mstore(64, mload(416)); mstore(96, mload(448)) should get merged to mcopy(64, 416, 64), but because of sequencing of the barriers, the optimization does not get applied.

function global {
main:
    invoke @test, 352
    %49 = mload 352
    mstore 448, %49
    %51 = mload 416
    mstore 64, %51
    %54 = mload 448  ; barrier, flushes mload 416 from list of potential copies
    mstore 96, %54
    stop
}

function test {
main:
    stop
}
@charles-cooper charles-cooper added bug - bytecode performance bug affecting bytecode performance (not correctness) venom labels Dec 21, 2024
@charles-cooper charles-cooper changed the title memerge pass flushes too aggressively on certain barriers memmerge pass flushes too aggressively on certain barriers Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - bytecode performance bug affecting bytecode performance (not correctness) venom
Projects
None yet
Development

No branches or pull requests

2 participants