Skip to content

feat[venom]: new DFTPass algorithm#4255

Merged
charles-cooper merged 149 commits intovyperlang:masterfrom
harkal:feat/dft_upgrade
Nov 12, 2024
Merged

feat[venom]: new DFTPass algorithm#4255
charles-cooper merged 149 commits intovyperlang:masterfrom
harkal:feat/dft_upgrade

Conversation

@harkal
Copy link
Copy Markdown
Collaborator

@harkal harkal commented Sep 24, 2024

What I did

How I did it

How to verify it

Commit message

this commit upgrades the DFT algorithm to allow for more instruction
movement and performs "multidimensional" fencing, which allows
instructions to be reordered across volatile instructions if there
is no effect barrier. since barriers do not truly live in the data
dependency graph, it introduces a heuristic which chooses which barrier
to recurse into first.

it also removes the use of order ids and sorting, which improves
performance.

Description for the changelog

Cute Animal Picture

image-4

harkal and others added 30 commits September 18, 2024 10:21
temp

more stack2mem

exception and usage

mem allocator

tests and fixes to allocator

fixes

lint allocator

more

stack top method

allocator fixes

lint

fixes and update tests

plug memory allocator

add types

cleanup and lint

exceptions handling
this commit adds a small heuristic for cleaning the input stack from
cfg_in, which is to pop the shallowest items first.

it also cleans up the code a little bit and adds stronger preconditions
to the code.

a further optimization would be to try to align the output stack as best
as possible at the jnz, but that belongs in the DFT pass.
if write_effect in last_write_effects and last_write_effects[write_effect] != inst:
self.barriers[inst].add(last_write_effects[write_effect])
if write_effect in last_read_effects:
self.barriers[inst].add(last_read_effects[write_effect])
Copy link
Copy Markdown
Member

@charles-cooper charles-cooper Oct 18, 2024

Choose a reason for hiding this comment

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

maybe some way to do it without the loop? e.g.

self.barriers[inst] |= (write_effects & last_read_effects)

@harkal harkal marked this pull request as ready for review October 30, 2024 09:12
@charles-cooper charles-cooper enabled auto-merge (squash) November 12, 2024 07:09
Copy link
Copy Markdown
Member

@charles-cooper charles-cooper left a comment

Choose a reason for hiding this comment

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

awesome. thank you!

@charles-cooper charles-cooper merged commit c32b9b4 into vyperlang:master Nov 12, 2024
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.

3 participants