aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-12-01 10:38:20 +0100
committerBjörn Gustavsson <[email protected]>2017-12-06 10:05:47 +0100
commit2e5d6201bb044508eb8523da208caac459c8a124 (patch)
tree75b423df86dced30a80c70ec89226e904cafc08d /lib/observer/test
parent68b7cd0820362667fe77f0065a2ac06989580eb5 (diff)
downloadotp-2e5d6201bb044508eb8523da208caac459c8a124.tar.gz
otp-2e5d6201bb044508eb8523da208caac459c8a124.tar.bz2
otp-2e5d6201bb044508eb8523da208caac459c8a124.zip
v3_codegen: Avoid excessive stack frame allocation
A 'case' or 'if' that does not occur last in a function clause will always force a stack frame. The reasoning behind this is that in most uses of 'case' there will be a function call from within the 'case'. When there is a function call, the stack frame is needed both to save the continuation pointer and to save any X registers that will need to survive the call. When there is no function call from a 'case', the resulting stack frame is annoying. There will be register shuffling, and the existence of the stack frame may thwart many optimizations (for example, in beam_dead). Therefore, add an extra pass to v3_codegen to avoid creating a stack frame when not needed. https://bugs.erlang.org/browse/ERL-514
Diffstat (limited to 'lib/observer/test')
0 files changed, 0 insertions, 0 deletions