2010-04-18 22:42:19 -04:00
|
|
|
! Copyright (C) 2009, 2010 Slava Pestov
|
2009-08-08 01:24:46 -04:00
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2014-12-10 17:40:45 -05:00
|
|
|
USING:
|
2010-04-23 04:18:31 -04:00
|
|
|
compiler.cfg
|
|
|
|
compiler.cfg.registers
|
2010-04-25 05:13:04 -04:00
|
|
|
compiler.cfg.predecessors
|
2010-04-23 04:18:31 -04:00
|
|
|
compiler.cfg.loop-detection
|
2010-04-19 15:05:55 -04:00
|
|
|
compiler.cfg.representations.rewrite
|
2010-04-23 04:18:31 -04:00
|
|
|
compiler.cfg.representations.peephole
|
2010-04-25 05:13:04 -04:00
|
|
|
compiler.cfg.representations.selection
|
2014-12-10 17:40:45 -05:00
|
|
|
compiler.cfg.representations.coalescing
|
|
|
|
compiler.cfg.utilities
|
|
|
|
kernel ;
|
2009-08-08 01:24:46 -04:00
|
|
|
IN: compiler.cfg.representations
|
|
|
|
|
2010-04-23 04:18:31 -04:00
|
|
|
! Virtual register representation selection. This is where
|
|
|
|
! decisions about integer tagging and float and vector boxing
|
|
|
|
! are made. The appropriate conversion operations inserted
|
|
|
|
! after a cost analysis.
|
2009-08-08 05:02:18 -04:00
|
|
|
|
2014-12-11 15:48:43 -05:00
|
|
|
: select-representations ( cfg -- )
|
|
|
|
{
|
|
|
|
needs-loops
|
2014-12-10 17:40:45 -05:00
|
|
|
needs-predecessors
|
|
|
|
compute-components
|
|
|
|
compute-possibilities
|
|
|
|
compute-representations
|
|
|
|
insert-conversions
|
|
|
|
} apply-passes ;
|