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.
|
2010-04-23 04:18:31 -04:00
|
|
|
USING: accessors combinators namespaces
|
|
|
|
|
compiler.cfg
|
|
|
|
|
compiler.cfg.registers
|
|
|
|
|
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
|
|
|
|
|
compiler.cfg.representations.selection ;
|
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
|
|
|
|
2009-08-08 01:24:46 -04:00
|
|
|
: select-representations ( cfg -- cfg' )
|
2009-08-08 21:02:56 -04:00
|
|
|
needs-loops
|
|
|
|
|
|
2009-08-08 01:24:46 -04:00
|
|
|
{
|
|
|
|
|
[ compute-possibilities ]
|
2009-08-08 05:02:18 -04:00
|
|
|
[ compute-representations ]
|
2010-04-18 22:42:19 -04:00
|
|
|
[ compute-phi-representations ]
|
2009-08-08 01:24:46 -04:00
|
|
|
[ insert-conversions ]
|
2009-08-08 05:02:18 -04:00
|
|
|
[ ]
|
|
|
|
|
} cleave
|
2009-10-07 13:35:21 -04:00
|
|
|
representations get cfg get (>>reps) ;
|