2014-07-07 17:34:10 -04:00
USING: compiler.cfg compiler.cfg.instructions compiler.cfg.rpo
2014-10-14 07:41:14 -04:00
compiler.cfg.stack-frame compiler.tree help.markup help.syntax namespaces
sequences vectors words ;
2014-05-10 19:45:07 -04:00
IN: compiler.cfg
2014-05-04 19:12:41 -04:00
HELP: basic-block
{ $class-description
2014-07-18 04:47:08 -04:00
"Factors representation of a basic block in the Call Flow Graph (CFG). A basic block is a sequence of instructions that always are executed sequentially and doesn't contain any branching. It has the following slots:"
2014-05-06 12:09:34 -04:00
{ $table
2015-09-21 06:32:32 -04:00
{ { $slot "number" } { "The blocks sequence number. Generated by calling " { $link number-blocks } ". " } }
2014-05-06 12:09:34 -04:00
{ { $slot "successors" } { "A " { $link vector } " of basic blocks that may be executed directly after this block. Most blocks only have one successor but a block that checks where an if-condition should branch to would have two for example." } }
2014-07-18 04:47:08 -04:00
{ { $slot "predecessors" } { "The opposite of successors -- a " { $link vector } " of basic blocks from which the execution may have arrived into this block." } }
2014-05-10 19:45:07 -04:00
{ { $slot "instructions" } { "A " { $link vector } " of " { $link insn } " tuples which form the instructions of the basic block." } }
2015-05-08 21:21:24 -04:00
{ { $slot "kill-block?" } { "The first and the last block in a cfg and all blocks containing " { $link ##call } " instructions are kill blocks." } }
2014-05-06 12:09:34 -04:00
}
2014-05-04 19:12:41 -04:00
} ;
HELP: <basic-block>
{ $values { "bb" basic-block } }
2014-05-16 12:15:14 -04:00
{ $description "Creates a new empty basic block. The " { $slot "id" } " slot is initialized with the value of the basic-block " { $link counter } "." } ;
2014-05-07 17:48:41 -04:00
2015-03-24 12:38:42 -04:00
HELP: <cfg>
2015-04-22 10:31:59 -04:00
{ $values { "word" word } { "label" "label" } { "entry" basic-block } { "cfg" cfg } }
2015-07-26 14:32:12 -04:00
{ $description "Constructor for " { $link cfg } ". " { $slot "spill-area-size" } " and " { $slot "spill-area-align" } " are set to default values." } ;
2015-03-24 12:38:42 -04:00
2014-05-07 17:48:41 -04:00
HELP: cfg
{ $class-description
"Call flow graph. It has the following slots:"
{ $table
2014-07-18 04:47:08 -04:00
{ { $slot "entry" } { "Root " { $link basic-block } " of the graph." } }
2014-05-10 19:45:07 -04:00
{ { $slot "word" } { "The " { $link word } " the cfg is produced from." } }
2014-05-26 07:26:00 -04:00
{ { $slot "post-order" } { "The blocks of the cfg in a post order traversal " { $link sequence } "." } }
2014-07-07 17:34:10 -04:00
{ { $slot "stack-frame" } { { $link stack-frame } " of the cfg." } }
2014-10-14 07:41:14 -04:00
{ { $slot "frame-pointer?" } { "Whether the cfg needs a frame pointer. Only cfgs generated for " { $link #alien-callback } " nodes does need it." } }
2014-05-07 17:48:41 -04:00
}
2014-05-26 07:26:00 -04:00
}
2015-07-26 14:32:12 -04:00
{ $see-also <cfg> post-order } ;
2014-05-26 07:26:00 -04:00
HELP: cfg-changed
{ $values { "cfg" cfg } }
2015-04-12 11:12:57 -04:00
{ $description "Resets all \"calculated\" slots in the cfg which forces them to be recalculated." }
{ $see-also predecessors-changed } ;