compiler.cfg.ssa.interference.live-ranges: Docs

locals-and-roots
Björn Lindqvist 2016-04-22 12:33:39 +02:00
parent cf74a4dc0f
commit e58e1b9a65
2 changed files with 18 additions and 5 deletions

View File

@ -0,0 +1,18 @@
USING: compiler.cfg compiler.cfg.instructions
compiler.cfg.ssa.interference.live-ranges.private help.markup
help.syntax math ;
IN: compiler.cfg.ssa.interference.live-ranges
HELP: compute-live-ranges
{ $values { "cfg" cfg } }
{ $description "Entry point for the live ranges computation compiler pass." } ;
HELP: record-uses
{ $values { "n" integer } { "insn" insn } }
{ $description "Record live intervals so that all but the first input interfere with the output. This lets us coalesce the output with the first input." } ;
ARTICLE: "compiler.cfg.ssa.interference.live-ranges"
"Live ranges for interference testing"
"Live ranges for interference testing" ;
ABOUT: "compiler.cfg.ssa.interference.live-ranges"

View File

@ -6,8 +6,6 @@ compiler.cfg.liveness compiler.cfg.rpo kernel math namespaces
sequences ;
IN: compiler.cfg.ssa.interference.live-ranges
! Live ranges for interference testing
<PRIVATE
SYMBOLS: local-def-indices local-kill-indices ;
@ -16,9 +14,6 @@ SYMBOLS: local-def-indices local-kill-indices ;
defs-vregs [ local-def-indices get set-at ] with each ;
: record-uses ( n insn -- )
! Record live intervals so that all but the first input interfere
! with the output. This lets us coalesce the output with the
! first input.
dup uses-vregs [ 2drop ] [
swap def-is-use-insn?
[ [ first local-kill-indices get set-at ] [ rest-slice ] 2bi ] unless