compiler.cfg.dcn: remove stores to stack locations above top of stack (these are never read again)

db4
Slava Pestov 2009-07-21 17:46:09 -05:00
parent 441c2bae2d
commit 802b4ffdf5
1 changed files with 4 additions and 3 deletions

View File

@ -16,13 +16,14 @@ IN: compiler.cfg.dcn.rewrite
assoc-union assoc-diff
] keep untranslate-locs ;
: remove-dead-stores ( assoc -- assoc' )
[ drop n>> 0 >= ] assoc-filter ;
: inserting-replaces ( from to -- assoc )
[
[ replace-out ] [ [ kill-in ] [ replace-in ] bi ] bi*
assoc-union assoc-diff
] keep
untranslate-locs
[ drop n>> 0 >= ] assoc-filter ;
] keep untranslate-locs remove-dead-stores ;
SYMBOL: locs>vregs