SSA CFG Codegen: make function return label slot handling explicit#16501
Conversation
d6c853e to
0b95d6a
Compare
0b95d6a to
a213789
Compare
a213789 to
101f235
Compare
101f235 to
68b3040
Compare
68b3040 to
a765904
Compare
a765904 to
3782d10
Compare
|
Can you maybe explain in more detail what is the benefit of this explicit tracking? Or what is the problem with the current implicit approach? I am having trouble understanding why is this even needed. |
The implicit approach required the code transform to lie about stack heights and do manual shuffling at return sites, bypassing the layout generator. Making it explicit lets the existing layout/shuffle infrastructure handle it uniformly, which is simpler and eliminates a TODO: solidity/libyul/backends/evm/ssa/CodeTransform.cpp Lines 345 to 365 in 6313134 Beyond that it also
|
blishko
left a comment
There was a problem hiding this comment.
Seems good to me! I have some questions about the changes in the tests.
3782d10 to
fd17507
Compare
a75dd5e to
64e221f
Compare
The function return label (the address the callee jumps back to) is now tracked as an explicit
FunctionReturnLabelslot on the virtual stack throughout a function's CFG, rather than being treated as an implicit/invisible slot below the tracked stack.