View source code
Display the source code in dmd/backend/blockopt.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module dmd.backend.blockopt

Manipulating basic blocks and their edges.

Documentation

https://dlang.org/phobos/dmd_backend_blockopt.html

Coverage

https://codecov.io/gh/dlang/dmd/src/master/src/dmd/backend/blockopt.d

Functions

NameDescription
block_appendexp(b, e) Append elem to the elems comprising the current block. Read in an expression and put it in curblock.Belem. If there is one already there, create a tree like: , / \ old e
block_clearvisit() Clear visit.
block_compbcount() Compute number of parents (Bcount) of each basic block.
block_endfunc(flag) Mark end of function.
block_free(b) Free a block.
block_goto(bx, bc, bn) Finish up this block and start the next one.
block_next(bctx, bc, bn) Finish up this block and start the next one.
block_optimizer_free(b) Free optimizer gathered data.
block_pred() Build predecessor list (Bpred) for each block.
block_ptr() Replace block numbers with block pointers.
block_term()
block_visit(b) Visit block and each of its predecessors.
blocklist_free(pb) Free list of blocks.
blockopt(iter) Perform branch optimization on basic blocks.
brcombine() Try to remove control structure. That is, try to resolve if-else, goto and return statements into &&, || and ?: combinations.
compdfo(dfo, startblock) Compute depth first order (DFO). Equivalent to Aho & Ullman Fig. 13.8. Blocks not in dfo[] are unreachable.

Global variables

NameTypeDescription
bc_goal uint[20]

Authors

Walter Bright

License

Boost License 1.0