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

[interp] Move from stack based to fully local var based design #46037

Merged
merged 1 commit into from Jan 8, 2021

Commits on Jan 6, 2021

  1. [interp] Move from stack based to fully local var based design

    Instead of having instructions that push and pop from the stack, every instruction has explicit dreg and sregs.
    
    While the purpose of this PR is mainly to make it easier to implement more advanced optimization in the future, it also has noticeable performance implications. The code is simplified because we no longer need to update and save the SP. However, the code for each instruction is bloated due to the addition of explicit source and destination offsets. This is counteracted by the reduction of the total number of instructions, since ldloc/stloc and moves become redundant and they are mostly optimized away, even in this implementation state. Here are the total number of executed opcodes as part of running the corlib test suite with the interp https://gist.github.com/BrzVlad/d62f504930b75cba4b870e6dbd947e90.
    BrzVlad committed Jan 6, 2021
    Copy the full SHA
    ef59fcf View commit details
    Browse the repository at this point in the history