package bap-std
Builder interface.
This interface provides an efficient way to build new blocks. It is also useful, when rebuilding existing block. It is the user responsibility to preserve the uniqueness of identifiers throughout the program instance.
create ~tid ~phis ~defs ~jmp ()
creates a block builder. If tid
parameter is specified, then the new block will have this tid. If any of phis
, defs
or jmps
parameters are specified, the provtided number would be used as a hint of the expected amount of the corresponding entries. Since it is the hint, it can mismatch with the actual size. The hint must be a positive number.
init blk
creates a builder based on an existing block. If copy_phis
, copy_defs
or copy_jmps
is true
(defaults to false
), then prepopulate builder with corresponding terms from block blk
. If same_tid
is true (default), then a resulting block will have the same tid
as block blk
. Otherwise, a fresh new tid
will be created.