2015-07-27 05:11:49 -04:00
USING: compiler.cfg.linear-scan
compiler.cfg.linear-scan.allocation.state
2016-11-13 21:20:50 -05:00
compiler.cfg.linear-scan.live-intervals cpu.architecture help.markup
help.syntax math ;
2015-04-18 07:04:29 -04:00
IN: compiler.cfg.linear-scan.allocation.spilling
2015-04-22 10:31:59 -04:00
HELP: assign-spill
2016-04-01 14:16:13 -04:00
{ $values { "live-interval" live-interval-state } }
2015-04-22 10:31:59 -04:00
{ $description "Assigns a spill slot for the live interval." }
{ $see-also assign-spill-slot } ;
2016-11-13 21:20:50 -05:00
HELP: last-use-rep
{ $values { "live-interval" live-interval-state } { "rep" representation } }
{ $description "Gets the last usage representation for the interval. Used when determining what representation it should have when spilled." }
{ $see-also first-use-rep } ;
2015-07-27 05:11:49 -04:00
HELP: spill-after
{ $values
{ "after" live-interval-state }
2016-04-04 13:40:02 -04:00
{ "after/f" { $maybe live-interval-state } }
2015-07-27 05:11:49 -04:00
}
{ $description "If the interval has no more usages after the spill location, then it is the first child of an interval that was split. We spill the value and let the resolve pass insert a reload later. An interval may be split if it overlaps a " { $link sync-point } "." }
{ $see-also spill-before } ;
HELP: spill-available
{ $values { "new" live-interval-state } { "pair" "2-tuple of score and register" } }
{ $description "A register would become fully available if all active and inactive intervals using it were split and spilled." } ;
2015-04-20 15:09:28 -04:00
HELP: spill-before
{ $values
{ "before" live-interval-state }
{ "before/f" { $link live-interval-state } " or " { $link f } }
}
2015-07-27 05:11:49 -04:00
{ $description "If the interval does not have any usages before the spill location, then it is the second child of an interval that was split. We reload the value and let the resolve pass insert a spill later." }
{ $see-also spill-after } ;
2015-09-20 05:35:05 -04:00
HELP: split-for-spill
{ $values
2016-04-01 14:16:13 -04:00
{ "live-interval" live-interval-state }
2015-09-20 05:35:05 -04:00
{ "n" integer }
2016-04-04 13:40:02 -04:00
{ "before/f" { $maybe live-interval-state } }
{ "after/f" { $maybe live-interval-state } }
2015-09-20 05:35:05 -04:00
} { $description "During register allocation an interval needs to be split so that the 'after' part of it can be placed in a spill slot." } ;
2015-07-27 05:11:49 -04:00
HELP: spill-intersecting
{ $values { "new" live-interval-state } { "reg" "register" } }
{ $description "Split and spill all active and inactive intervals which intersect 'new' and use 'reg'." } ;
2015-04-20 15:09:28 -04:00
2015-04-18 07:04:29 -04:00
HELP: spill-intersecting-active
{ $values { "new" live-interval-state } { "reg" "register" } }
{ $description "If there is an active interval using 'reg' (there should be at most one) are split and spilled and removed from the inactive set." } ;
2015-07-27 05:11:49 -04:00
HELP: spill-intersecting-inactive
{ $values { "new" live-interval-state } { "reg" "register" } }
{ $description "Any inactive intervals using 'reg' are split and spilled and removed from the inactive set." }
{ $see-also inactive-intervals } ;
2015-04-18 07:04:29 -04:00
HELP: spill-partially-available
2015-04-20 15:09:28 -04:00
{ $values
{ "new" live-interval-state }
{ "pair" "register availability status" }
}
2015-04-18 07:04:29 -04:00
{ $description "A register would be available for part of the new interval's lifetime if all active and inactive intervals using that register were split and spilled." } ;
2015-07-27 05:11:49 -04:00
2015-09-14 20:42:21 -04:00
HELP: trim-before-ranges
2016-04-01 14:16:13 -04:00
{ $values { "live-interval" live-interval-state } }
2015-09-14 20:42:21 -04:00
{ $description "Extends the last intervals range to one after the last use point and removes all intervals beyond that." } ;
2015-07-27 05:11:49 -04:00
ARTICLE: "compiler.cfg.linear-scan.allocation.spilling" "Spill slot assignment"
2015-09-20 05:35:05 -04:00
"Words and dynamic variables for assigning spill slots to spilled registers during the " { $link linear-scan } " compiler pass."
$nl
"Splitting live intervals:"
2016-11-13 21:20:50 -05:00
{ $subsections split-for-spill }
"Usage representations:"
{ $subsections first-use-rep last-use-rep } ;
2015-07-27 05:11:49 -04:00
ABOUT: "compiler.cfg.linear-scan.allocation.spilling"