GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | aff_comb_elt |
struct | affine_tree_combination |
Typedefs | |
typedef struct affine_tree_combination | aff_tree |
typedef struct affine_tree_combination aff_tree |
bool aff_comb_cannot_overlap_p | ( | aff_tree * | , |
double_int | , | ||
double_int | |||
) |
void aff_combination_add_elt | ( | aff_tree * | , |
tree | , | ||
double_int | |||
) |
void aff_combination_const | ( | aff_tree * | , |
tree | , | ||
double_int | |||
) |
bool aff_combination_constant_multiple_p | ( | aff_tree * | val, |
aff_tree * | div, | ||
double_int * | mult | ||
) |
Returns true if VAL = X * DIV for some constant X. If this is the case, X is stored to MULT.
References aff_comb_elt::coef, dump_double_int(), affine_tree_combination::elts, affine_tree_combination::n, affine_tree_combination::offset, print_generic_expr(), affine_tree_combination::rest, affine_tree_combination::type, and aff_comb_elt::val.
void aff_combination_expand | ( | aff_tree * | comb, |
struct pointer_map_t ** | cache | ||
) |
Expands SSA names in COMB recursively. CACHE is used to cache the results.
Look through some conversions.
We do not know whether the reference retains its value at the place where the expansion is used.
In principle this is a generally valid folding, but it is not unconditionally an optimization, so do it here and not in fold_unary.
Convert (T1)(X *+- CST) into (T1)X *+- (T1)CST if T1 is wider than the type of X and overflow for the type of X is undefined.
Since we follow the definitions in the SSA form, we should not enter a cycle unless we pass through a phi node.
Accumulate the new terms to TO_ADD, so that we do not modify COMB while traversing it; include the term -coef * E, to remove it from COMB.
void aff_combination_remove_elt | ( | aff_tree * | , |
unsigned | |||
) |
void aff_combination_scale | ( | aff_tree * | , |
double_int | |||
) |
void debug_aff | ( | aff_tree * | ) |
Debugging functions.
double_int double_int_ext_for_comb | ( | double_int | , |
aff_tree * | |||
) |
void free_affine_expand_cache | ( | struct pointer_map_t ** | ) |
void get_inner_reference_aff | ( | tree | , |
aff_tree * | , | ||
double_int * | |||
) |
void tree_to_aff_combination_expand | ( | tree | expr, |
tree | type, | ||
aff_tree * | comb, | ||
struct pointer_map_t ** | cache | ||
) |
Similar to tree_to_aff_combination, but follows SSA name definitions and expands them recursively. CACHE is used to cache the expansions of the ssa names, to avoid exponential time complexity for cases like a1 = a0 + a0; a2 = a1 + a1; a3 = a2 + a2; ...
Referenced by merge_comps().
void unshare_aff_combination | ( | aff_tree * | ) |