2009-07-18 23:27:42 -04:00
|
|
|
! Copyright (C) 2009 Slava Pestov.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2016-08-29 06:07:47 -04:00
|
|
|
USING: accessors compiler.cfg.dataflow-analysis kernel sequences sets ;
|
2009-07-23 21:54:38 -04:00
|
|
|
IN: compiler.cfg.stacks.global
|
2009-07-18 23:27:42 -04:00
|
|
|
|
2015-04-01 22:56:40 -04:00
|
|
|
: transfer-peeked-locs ( set bb -- set' )
|
2016-08-29 06:07:47 -04:00
|
|
|
[ replaces>> diff ] [ peeks>> union ] bi ;
|
2009-07-18 23:27:42 -04:00
|
|
|
|
2009-08-03 08:08:28 -04:00
|
|
|
BACKWARD-ANALYSIS: anticip
|
2009-07-18 23:27:42 -04:00
|
|
|
|
2016-03-16 09:37:33 -04:00
|
|
|
M: anticip transfer-set drop transfer-peeked-locs ;
|
|
|
|
M: anticip join-sets 2drop refine ;
|
2009-07-18 23:27:42 -04:00
|
|
|
|
2009-08-03 08:08:28 -04:00
|
|
|
BACKWARD-ANALYSIS: live
|
2009-07-18 23:27:42 -04:00
|
|
|
|
2016-03-16 09:37:33 -04:00
|
|
|
M: live transfer-set drop transfer-peeked-locs ;
|
|
|
|
M: live join-sets 2drop combine ;
|
2009-08-03 08:08:28 -04:00
|
|
|
|
2009-07-22 03:05:40 -04:00
|
|
|
FORWARD-ANALYSIS: avail
|
2009-07-18 23:27:42 -04:00
|
|
|
|
2016-08-29 06:07:47 -04:00
|
|
|
M: avail transfer-set ( in-set bb dfa -- out-set )
|
|
|
|
drop [ peeks>> ] [ replaces>> ] bi union union ;
|
2016-03-16 09:37:33 -04:00
|
|
|
M: avail join-sets 2drop refine ;
|
2009-08-03 08:08:28 -04:00
|
|
|
|
|
|
|
FORWARD-ANALYSIS: pending
|
|
|
|
|
2016-03-16 09:37:33 -04:00
|
|
|
M: pending transfer-set
|
2016-08-29 06:07:47 -04:00
|
|
|
drop replaces>> union ;
|
2016-03-16 09:37:33 -04:00
|
|
|
M: pending join-sets 2drop refine ;
|
2009-07-18 23:27:42 -04:00
|
|
|
|
2009-08-03 08:08:28 -04:00
|
|
|
BACKWARD-ANALYSIS: dead
|
2009-07-18 23:27:42 -04:00
|
|
|
|
2016-03-16 09:37:33 -04:00
|
|
|
M: dead transfer-set
|
2016-08-29 06:07:47 -04:00
|
|
|
drop [ kills>> ] [ replaces>> ] bi union union ;
|
2016-03-16 09:37:33 -04:00
|
|
|
M: dead join-sets 2drop refine ;
|