-
-
Notifications
You must be signed in to change notification settings - Fork 800
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
feat[venom]: improve liveness computation #4301
Conversation
traversing in reverse topsort order improves stack scheduling slightly (codesize improvement of about 0.35%) this commit also adds a topsort method to CFGAnalysis, and speeds it up by only checking the terminator instruction instead of iterating over all the instructions in every basic block.
marking as draft since this seems to introduce a scheduler regression elsewhere 😱
|
it is redundant with CFGAnalysis cfg_out
this shaves 1.5% off bytecode size
shared code between remove_unreachable_blocks and sccp
@@ -1,8 +1,7 @@ | |||
from typing import Iterator, Optional | |||
|
|||
from vyper.codegen.ir_node import IRnode | |||
from vyper.utils import OrderedSet | |||
from vyper.venom.basicblock import CFG_ALTERING_INSTRUCTIONS, IRBasicBlock, IRLabel, IRVariable | |||
from vyper.venom.basicblock import IRBasicBlock, IRLabel, IRVariable |
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
vyper.venom.basicblock
vyper.venom.function
definition
import
@@ -1,8 +1,7 @@ | |||
from typing import Iterator, Optional | |||
|
|||
from vyper.codegen.ir_node import IRnode | |||
from vyper.utils import OrderedSet | |||
from vyper.venom.basicblock import CFG_ALTERING_INSTRUCTIONS, IRBasicBlock, IRLabel, IRVariable | |||
from vyper.venom.basicblock import IRBasicBlock, IRLabel, IRVariable |
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
vyper.venom.basicblock
vyper.venom.function
definition
import
@@ -1,8 +1,7 @@ | |||
from typing import Iterator, Optional | |||
|
|||
from vyper.codegen.ir_node import IRnode | |||
from vyper.utils import OrderedSet | |||
from vyper.venom.basicblock import CFG_ALTERING_INSTRUCTIONS, IRBasicBlock, IRLabel, IRVariable | |||
from vyper.venom.basicblock import IRBasicBlock, IRLabel, IRVariable |
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
vyper.venom.basicblock
vyper.venom.function
definition
import
superseded by #4330 |
traversing in reverse topsort order improves stack scheduling slightly (codesize improvement of about 0.35%)
this commit also adds a topsort method to CFGAnalysis, and speeds it up by only checking the terminator instruction instead of iterating over all the instructions in every basic block.
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