|
GCC Middle and Back End API Reference
|

Data Structures | |
| struct | alt_unit |
Public Types | |
| enum | alt_cat { ALT_GIMPLE_EXPRS , ALT_FNS , ALT_GENERIC_EXPRS , ALT_GENERIC_FNS , ALT_COUNT } |
Public Member Functions | |
| fn_splitter (vec< FILE * > &files_, FILE *f_, const char *fname_, bool gimple_, unsigned nops_, unsigned budget_) | |
| void | emit_alternatives (dt_node *, int, int, const vec< dt_operand * > &, const vec< dt_operand * > &, const vec< dt_operand * > &, const vec< dt_operand * > &, const vec< dt_operand * > &, const vec< dt_node * > &) |
| bool | emit_dispatch (FILE *, int, alt_cat, unsigned) |
| bool | split_out_p (alt_cat cat, unsigned index) const |
| bool | same_chunk_p (alt_cat cat, unsigned a, unsigned b) const |
Private Member Functions | |
| bool | full (unsigned have, unsigned more) const |
| void | print_params (FILE *) |
| void | print_args (FILE *) |
| FILE * | open_chunk (unsigned) |
| void | close_chunk (FILE *) |
| FILE * | choose_chunk_file () |
Private Attributes | |
| FILE * | f |
| vec< FILE * > & | files |
| const char * | fname |
| bool | gimple |
| unsigned | nops |
| unsigned | budget |
| unsigned | nchunks |
| bool | dispatching |
| auto_vec< unsigned > | owner [ALT_COUNT] |
Split a generated matcher across functions. The entry function keeps the dispatch that selects between the top-level alternatives, and calls the function that holds the selected group in place of the group's body.
| enum fn_splitter::alt_cat |
|
inline |
References budget, dispatching, f, false, files, fname, gcc_checking_assert, gimple, nchunks, and nops.
|
private |
Return the shortest output file that is not the one the entry function is being written to, which must not receive another function while it is open.
References f, files, gcc_assert, and NULL.
Referenced by open_chunk().
|
private |
| void fn_splitter::emit_alternatives | ( | dt_node * | node, |
| int | indent, | ||
| int | depth, | ||
| const vec< dt_operand * > & | gimple_exprs, | ||
| const vec< dt_operand * > & | generic_exprs, | ||
| const vec< dt_operand * > & | fns, | ||
| const vec< dt_operand * > & | generic_fns, | ||
| const vec< dt_operand * > & | preds, | ||
| const vec< dt_node * > & | others ) |
Emit the alternatives of NODE at INDENT and DEPTH. GIMPLE_EXPRS, GENERIC_EXPRS, FNS, GENERIC_FNS, PREDS and OTHERS are the vectors that gen_kids_1 accepts. Unless the whole run is small, the groups of the first four move to new functions, packed in order up to the budget. The entry function keeps the dispatch, PREDS and OTHERS. Groups reached from one dispatch have disjoint cases, so selecting one is what trying them in turn does.
References ALT_COUNT, ALT_FNS, ALT_GENERIC_EXPRS, ALT_GENERIC_FNS, ALT_GIMPLE_EXPRS, budget, close_chunk(), collect_alt_units(), collect_operand_groups(), dispatching, f, full(), gimple, i, MATCHER_FN_MIN_RUN_FRACTION, nchunks, open_chunk(), and owner.
Referenced by dt_node::gen_kids().
Called by gen_kids_1 in place of emitting the body of group INDEX of category CAT to TO at INDENT. If another function holds the group, emit a call to it and return true. Otherwise return false, and gen_kids_1 emits the body.
References fname, fprintf_indent(), gimple, owner, print_args(), and split_out_p().
Referenced by dt_node::gen_kids_1().
|
inlineprivate |
References budget.
Referenced by emit_alternatives().
|
private |
Open the function holding chunk N and return its output file.
References choose_chunk_file(), fname, fp_decl(), fp_decl_done(), fprintf_indent(), gcc_assert, gimple, header_file, and print_params().
Referenced by emit_alternatives().
|
private |
Print to TO the arguments that forward the current matcher state to a new function.
References gimple, i, and nops.
Referenced by emit_dispatch().
|
private |
Print the parameter list of a new function to TO. Also print its declaration to the generated header.
References fp_decl(), gimple, i, and nops.
Referenced by open_chunk().
References a, b, owner, and split_out_p().
Referenced by dt_node::gen_kids_1().
References dispatching, and owner.
Referenced by emit_dispatch(), dt_node::gen_kids_1(), and same_chunk_p().
|
private |
Referenced by emit_alternatives(), fn_splitter(), and full().
|
private |
Referenced by emit_alternatives(), fn_splitter(), and split_out_p().
|
private |
Referenced by choose_chunk_file(), emit_alternatives(), and fn_splitter().
|
private |
Referenced by choose_chunk_file(), and fn_splitter().
|
private |
Referenced by emit_dispatch(), fn_splitter(), and open_chunk().
|
private |
Referenced by close_chunk(), emit_alternatives(), emit_dispatch(), fn_splitter(), open_chunk(), print_args(), and print_params().
|
private |
Referenced by emit_alternatives(), and fn_splitter().
|
private |
Referenced by fn_splitter(), print_args(), and print_params().
Referenced by emit_alternatives(), emit_dispatch(), same_chunk_p(), and split_out_p().