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

Clean up variable-related cruft in new SSA passes #1959

merged 2 commits into from Sep 24, 2018


None yet
2 participants

jhogberg commented Sep 20, 2018

When we first set out to rewrite the assembly passes in SSA format we weren't sure whether we'd want to be able to add annotations to variables. To play it safe we used variable names everywhere instead of the whole #b_var{} record so it would be trivial to add the field later on, but at the cost of having to pack and unpack the name pretty often.

It turns out we didn't need these annotations in the end, so this PR cleans things up.

jhogberg added some commits Sep 20, 2018

Consistently use #b_var{} instead of var_name()
We chose to refer to variables through their var_name() because we
anticipated the need to annotate them, but it turned out we didn't
really need that, and many things become a lot cleaner if the
entire #b_var{} is used to represent variables.
beam_ssa_recv: Remove redundant {var, _} wrapping
Now that variables are represented as #b_var{}, there's no longer
any risk of colliding with anything else.

@jhogberg jhogberg added the team:VM label Sep 20, 2018

@jhogberg jhogberg self-assigned this Sep 20, 2018


ypaq approved these changes Sep 21, 2018

@jhogberg jhogberg merged commit 672a164 into erlang:master Sep 24, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
license/cla Contributor License Agreement is signed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment