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-28 04:47:38 -04:00
|
|
|
USING: combinators
|
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
|
|
|
|
compiler.cfg.representations.coalescing ;
|
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
|
2010-04-25 05:13:04 -04:00
|
|
|
needs-predecessors
|
2009-08-08 21:02:56 -04:00
|
|
|
|
2009-08-08 01:24:46 -04:00
|
|
|
{
|
2010-04-25 05:13:04 -04:00
|
|
|
[ compute-components ]
|
2009-08-08 01:24:46 -04:00
|
|
|
[ compute-possibilities ]
|
2009-08-08 05:02:18 -04:00
|
|
|
[ compute-representations ]
|
2009-08-08 01:24:46 -04:00
|
|
|
[ insert-conversions ]
|
2009-08-08 05:02:18 -04:00
|
|
|
[ ]
|
2010-04-28 04:47:38 -04:00
|
|
|
} cleave ;
|