dmd.backend.blockopt

Manipulating basic blocks and their edges.

Members

Aliases

MEM_PH_FREE
alias MEM_PH_FREE = mem_free
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Functions

block_appendexp
void block_appendexp(block* b, elem* 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_calloc
block* block_calloc()
Undocumented in source. Be warned that the author may not have intended to support it.
block_calloc_i
block* block_calloc_i()
Undocumented in source. Be warned that the author may not have intended to support it.
block_clearvisit
void block_clearvisit()

Clear visit.

block_compbcount
void block_compbcount()

Compute number of parents (Bcount) of each basic block.

block_endfunc
void block_endfunc(int flag)

Mark end of function. flag: 0 do a "return" 1 do a "return 0"

block_free
void block_free(block* b)

Free a block.

block_goto
block* block_goto(Blockx* bx, int bc, block* bn)

Finish up this block and start the next one.

block_goto
void block_goto()

Goto a block named gotolbl. Start a new block that is labelled by newlbl.

block_goto
void block_goto(block* bn)

Goto a block named gotolbl. Start a new block that is labelled by newlbl.

block_goto
void block_goto(block* bgoto, block* bnew)

Goto a block named gotolbl. Start a new block that is labelled by newlbl.

block_init
void block_init()
Undocumented in source. Be warned that the author may not have intended to support it.
block_initvar
void block_initvar(Symbol* s)

Mark curblock as initializing Symbol s.

block_next
void block_next(Blockx* bctx, int bc, block* bn)

Finish up this block and start the next one.

block_next
void block_next(int bc, block* bn)
Undocumented in source. Be warned that the author may not have intended to support it.
block_next
void block_next()
Undocumented in source. Be warned that the author may not have intended to support it.
block_optimizer_free
void block_optimizer_free(block* b)

Free optimizer gathered data.

block_pred
void block_pred()

Build predecessor list (Bpred) for each block.

block_ptr
void block_ptr()

Replace block numbers with block pointers.

block_term
void block_term()
block_visit
void block_visit(block* b)

Visit block and each of its predecessors.

blocklist_dehydrate
void blocklist_dehydrate(block** pb)
Undocumented in source. Be warned that the author may not have intended to support it.
blocklist_free
void blocklist_free(block** pb)

Free list of blocks.

blocklist_hydrate
void blocklist_hydrate(block** pb)
Undocumented in source. Be warned that the author may not have intended to support it.
blockopt
void blockopt(int iter)

Perform branch optimization on basic blocks.

brcombine
void brcombine()

Try to remove control structure. That is, try to resolve if-else, goto and return statements into &&, || and ?: combinations.

compdfo
void compdfo()

Compute depth first order (DFO). Equivalent to Aho & Ullman Fig. 13.8. Blocks not in dfo[] are unreachable.

compdfo
void compdfo(Barray!(block*) dfo, block* startblock)
Undocumented in source. Be warned that the author may not have intended to support it.
funcsideeffects
void funcsideeffects()

Determine if function has any side effects. This means, determine if all the function does is return a value; no extraneous definitions or effects or exceptions. A function with no side effects can be CSE'd. It does not reference statics or indirect references.

mem_fcalloc
void* mem_fcalloc(size_t numbytes)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
mem_free
void mem_free(void* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
util_realloc
void* util_realloc(void* p, size_t n, size_t size)
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Manifest constants

SCPP_OR_NTEXCEPTIONS
enum SCPP_OR_NTEXCEPTIONS;
Undocumented in source.
SCPP_OR_NTEXCEPTIONS
enum SCPP_OR_NTEXCEPTIONS;
Undocumented in source.
SCPP_OR_NTEXCEPTIONS
enum SCPP_OR_NTEXCEPTIONS;
Undocumented in source.

Static variables

bc_goal
goal_t[BCMAX] bc_goal;
blkzero
block blkzero;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
block_freelist
block* block_freelist;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
block_last
block* block_last;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
curblock
block* curblock;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
dfo
Barray!(block*) dfo;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
startblock
block* startblock;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Meta