diff options
author | Björn Gustavsson <[email protected]> | 2015-04-18 05:53:16 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-04-22 10:14:54 +0200 |
commit | 2e2d583a49939026ec9b959f9b7941d3c2d084f2 (patch) | |
tree | fea392fcb28695b0b129c2f2de36d40377e604ed /lib/compiler/src/compiler.app.src | |
parent | 0971feb23d553bb51b04eb78fbf76c4bc19b4b93 (diff) | |
download | otp-2e2d583a49939026ec9b959f9b7941d3c2d084f2.tar.gz otp-2e2d583a49939026ec9b959f9b7941d3c2d084f2.tar.bz2 otp-2e2d583a49939026ec9b959f9b7941d3c2d084f2.zip |
Move rewriting of bs_match from beam_clean to beam_z
The actual bs_match_string instruction has four operands:
bs_match_string {f,Lbl} Ctxt NumBits {string,ListOfBytes}
However, v3_codegen emits a more compact representation where
the bits to match are packaged in a bitstring:
bs_match_string {f,Lbl} Ctxt Bitstring
Currently, beam_clean:clean_labels/1 will rewrite the compact
representation to the final representation. That is unfortunate
since clean_labels/1 is called by beam_dead, which means that
the less compact representation will be introduced long before
it is actually needed by beam_asm. It will also complicate any
optimizations that we might want to do.
Move the rewriting of bs_match_string from beam_clean:clean_labels/1
to the beam_z pass, which is the last pass executed before
beam_validator and beam_asm.
Diffstat (limited to 'lib/compiler/src/compiler.app.src')
0 files changed, 0 insertions, 0 deletions