diff options
author | Vlad Ureche <vlad.ureche@gmail.com> | 2013-02-03 23:47:44 +0100 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@gmail.com> | 2013-02-05 15:52:52 +0100 |
commit | e5c0e59373897d9f9dc6c49f8458666e88419586 (patch) | |
tree | 7e78e237d3db3c33e2feff4d811084aedfb9dd9b /test/partest | |
parent | 3d318be51f8e8cdec314565920327486212f5020 (diff) | |
download | scala-e5c0e59373897d9f9dc6c49f8458666e88419586.tar.gz scala-e5c0e59373897d9f9dc6c49f8458666e88419586.tar.bz2 scala-e5c0e59373897d9f9dc6c49f8458666e88419586.zip |
SI-7060 More conservative dead code elim marking
In dead code elimination, a DROP instruction that gets marked as useful
and can be reached via several paths needs to also mark all the reaching
definitions as useful, else we'll get unbalanced stacks on the two paths.
A simplistic example:
```
BB1:
CALL X // useful, leaves a LONG on the stack
JUMP BB3
BB2:
LOAD_FIELD Y // not useful
JUMP BB3
BB3:
DROP LONG // useful because "CALL X" is useful
// but unless we mark "LOAD_FIELD Y" as useful too
// we'll get unbalanced stacks when reaching BB3
```
This patch addresses the unbalanced stack problem by adding all the
reaching definitions of a useful DROP as useful instructions too.
Diffstat (limited to 'test/partest')
0 files changed, 0 insertions, 0 deletions