
@c Extracted automatically from ../jit/jit-block.c - DO NOT EDIT


@cindex jit-block.h


@deftypefun jit_function_t jit_block_get_function (jit_block_t @var{block})
Get the function that a particular @var{block} belongs to.
@end deftypefun

@deftypefun jit_context_t jit_block_get_context (jit_block_t @var{block})
Get the context that a particular @var{block} belongs to.
@end deftypefun

@deftypefun jit_label_t jit_block_get_label (jit_block_t @var{block})
Get the label associated with a block.
@end deftypefun

@deftypefun jit_block_t jit_block_next (jit_function_t @var{func}, jit_block_t @var{previous})
Iterate over the blocks in a function, in order of their creation.
The @var{previous} argument should be NULL on the first call.
This function will return NULL if there are no further blocks to iterate.
@end deftypefun

@deftypefun jit_block_t jit_block_previous (jit_function_t @var{func}, jit_block_t @var{previous})
Iterate over the blocks in a function, in reverse order of their creation.
The @var{previous} argument should be NULL on the first call.
This function will return NULL if there are no further blocks to iterate.
@end deftypefun

@deftypefun jit_block_t jit_block_from_label (jit_function_t @var{func}, jit_label_t @var{label})
Get the block that corresponds to a particular @var{label}.
Returns NULL if there is no block associated with the label.
@end deftypefun

@deftypefun int jit_block_set_meta (jit_block_t @var{block}, int @var{type}, void *@var{data}, jit_meta_free_func @var{free_data})
Tag a block with some metadata.  Returns zero if out of memory.
If the @var{type} already has some metadata associated with it, then
the previous value will be freed.  Metadata may be used to store
dependency graphs, branch prediction information, or any other
information that is useful to optimizers or code generators.

Metadata type values of 10000 or greater are reserved for internal use.
@end deftypefun

@deftypefun {void *} jit_block_get_meta (jit_block_t @var{block}, int @var{type})
Get the metadata associated with a particular tag.  Returns NULL
if @var{type} does not have any metadata associated with it.
@end deftypefun

@deftypefun void jit_block_free_meta (jit_block_t @var{block}, int @var{type})
Free metadata of a specific type on a block.  Does nothing if
the @var{type} does not have any metadata associated with it.
@end deftypefun

@deftypefun int jit_block_is_reachable (jit_block_t @var{block})
Determine if a block is reachable from some other point in
its function.  Unreachable blocks can be discarded in their
entirety.  If the JIT is uncertain as to whether a block is
reachable, or it does not wish to perform expensive flow
analysis to find out, then it will err on the side of caution
and assume that it is reachable.
@end deftypefun

@deftypefun int jit_block_ends_in_dead (jit_block_t @var{block})
Determine if a block ends in a "dead" marker.  That is, control
will not fall out through the end of the block.
@end deftypefun

@deftypefun int jit_block_current_is_dead (jit_function_t @var{func})
Determine if the current point in the function is dead.  That is,
there are no existing branches or fall-throughs to this point.
This differs slightly from @code{jit_block_ends_in_dead} in that
this can skip past zero-length blocks that may not appear to be
dead to find the dead block at the head of a chain of empty blocks.
@end deftypefun

