PIPS
|
#include <stdio.h>
#include <stdlib.h>
#include "linear.h"
#include "genC.h"
#include "ri.h"
#include "effects.h"
#include "ri-util.h"
#include "prettyprint.h"
#include "effects-util.h"
#include "misc.h"
#include "properties.h"
#include "resources.h"
#include "pipsdbm.h"
#include "control.h"
#include "eole_private.h"
#include "expressions.h"
Go to the source code of this file.
Data Structures | |
struct | optimization_strategy |
this structure defines a strategy for eole. More... | |
struct | extract_expr_t |
extract expressions with loop level information. More... | |
struct | binary_to_nary_t |
struct | symetric_opertor_t |
struct | cost_expression |
Macros | |
#define | DEBUG_NAME "TRANSFORMATION_OPTIMIZE_EXPRESSIONS_DEBUG_LEVEL" |
#define | OUT_FILE_NAME "/tmp/pips_to_eole" |
file name prefixes to deal with eole. More... | |
#define | IN_FILE_NAME "/tmp/eole_to_pips" |
#define | EOLE "EOLE" /**eole binary */ |
property names. More... | |
#define | EOLE_FLAGS "EOLE_FLAGS" /**default options */ |
#define | EOLE_OPTIONS "EOLE_OPTIONS" /**additionnal options */ |
#define | SIZE_OF_BUFFER 100 |
#define | MAX_NAME "MAX" |
#define | MIN_NAME "MIN" |
#define | GRAPH_PREFIX "optimize_expressions_" |
#define | GRAPH_SUFFIX ".daVinci" |
Typedefs | |
typedef struct optimization_strategy * | poptimization_strategy |
typedef struct extract_expr_t * | extract_expr_p |
Enumerations | |
enum | asocom_operator_t { not_asocom , is_plus , is_mult , is_max , is_min , is_and , is_or } |
switch binary to nary expressions where possible. More... | |
Functions | |
static string | get_eole_command (const char *in, const char *out, const char *flags) |
returns the eole command to be executed in an allocated string. More... | |
static bool | is_string_constant (entity e) |
static void | eole_okay_call_rwt (call c, bool *okay) |
static bool | eole_manageable_expression (expression e) |
static void | add_one_more_expression (expression e, extract_expr_p context) |
static bool | loop_flt (loop l, extract_expr_p context) |
static void | loop_rwt (loop l, extract_expr_p context) |
static bool | call_filter (call c, extract_expr_p context) |
rhs expressions of assignments. More... | |
static bool | expr_filter (expression e, extract_expr_p context) |
other expressions may be found in loops and so? More... | |
static list | get_list_of_rhs (statement s) |
of expressionwithlevel More... | |
static void | write_list_of_rhs (FILE *out, list le) |
export a list of expression of the current module. More... | |
static void | write_to_eole (const char *module, list le, const char *file_name) |
export expressions to eole thru the newgen format. More... | |
static string | read_and_allocate_string_from_file (FILE *file) |
static void | read_new_entities_from_eole (FILE *file, const char *module) |
import a list of entity that have been created during the eole transformations and create them More... | |
static list | read_from_eole (const char *module, const char *file_name) |
import expressions from eole. More... | |
static void | swap_syntax_in_expression (list lcode, list lnew) |
swap term to term syntax field in expression list, as a side effect... More... | |
static void | apply_eole_on_statement (const char *module_name, statement s, const char *flags) |
apply eole on all expressions in s. More... | |
static expression | is_uminus (expression e) |
returns B if uminus(B), else 0 More... | |
static void | call_simplify_rwt (call c) |
static void | generate_bminus (statement s) |
static void | optimize_simplify_patterns (statement s) |
look for some expressions in s and simplify some patterns. More... | |
static bool | is_inverse (expression e) |
static void | call_nary_rwt (call c) |
static void | optimize_simplify_nary_patterns (statement s) |
static double | expression_gravity_rc (expression e, double depth) |
forward substitute if only there once. More... | |
static double | expression_gravity (expression e) |
static double | expression_gravity_inv (expression e) |
static entity | binary_to_nary (entity e) |
static bool | nary_operator_p (entity e) |
static bool | nary_call_flt (call c) |
top-down: switch calls to nary form. More... | |
static void | nary_call_rwt (call c) |
bottom-up: + + -> + More... | |
void | naryfication_of_expressions (statement s) |
optimize.c More... | |
static symetric_opertor_t * | what_operator (entity e, int which_one) |
entity | inverse_operator_of (entity e) |
static bool | inv_call_flt (call c) |
void | inverse_normalization_of_expressions (statement s) |
static int | cost_expression_cmp (const void *v1, const void *v2) |
comparison function for qsort. More... | |
static void | debug_cost_expression_array (string s, cost_expression *tce, int size) |
debug function More... | |
static cost_expression * | list_of_expressions_to_array (list le, double(*cost)(expression)) |
build an cost_expression array from an expression list. More... | |
static void | insert_sorted_into_array (cost_expression *tce, int n, cost_expression ce) |
insert ce in tce[0..n-1] by decreassing order. More... | |
static void | insert_last_into_array (cost_expression *tce, int n, cost_expression ce) |
simply insert. More... | |
static void | call_rwt (call c) |
apply huffman balancing algorithm if it is a call to huffman_nary_operator. More... | |
static void | build_binary_operators_with_huffman (statement s, entity nary_operator, entity binary_operator, double(*cost)(expression), bool mode) |
apply the huffman balancing on every call to nary_operator and build calls to binary_operator instead, with cost to chose. More... | |
static void | switch_nary_to_binary (statement s) |
switch nary operators to binary ones. More... | |
static void | set_current_optimization_strategy (void) |
static void | reset_current_optimization_strategy (void) |
static void | davinci_dump_expressions (const char *module_name, string phase, statement s) |
dump all expressions in s as davinci graphs. More... | |
static void | do_convert_to_c_operator (call c) |
void | convert_to_c_operators (void *v) |
static void | do_convert_to_standard_operators (call c) |
void | convert_to_standard_operators (void *v) |
bool | optimize_expressions (const char *module_name) |
pipsmake interface to apply expression optimization according to various strategy. More... | |
Variables | |
static poptimization_strategy | strategy = NULL |
current strategy. More... | |
static entity | bplus = NULL |
A + (–B) -> A - B FMA -> FMS. More... | |
static entity | uminus = NULL |
static entity | bminus = NULL |
static entity | fmaop = NULL |
static entity | fmsop = NULL |
static entity | multiply = NULL |
static entity | inverse = NULL |
static entity | divide = NULL |
static binary_to_nary_t | bton [] |
static symetric_opertor_t | symop [] |
static entity | huffman_nary_operator = NULL |
switch nary to binary with huffman algorithm. More... | |
static entity | huffman_binary_operator = NULL |
static double(* | huffman_cost )(expression) = NULL |
static bool | huffman_mode = true |
true: Huffman. More... | |
static optimization_strategy | strategies [] |
predefined optimization strategies. More... | |
#define DEBUG_NAME "TRANSFORMATION_OPTIMIZE_EXPRESSIONS_DEBUG_LEVEL" |
Definition at line 50 of file optimize.c.
#define EOLE "EOLE" /**eole binary */ |
property names.
Definition at line 106 of file optimize.c.
#define EOLE_FLAGS "EOLE_FLAGS" /**default options */ |
Definition at line 107 of file optimize.c.
#define EOLE_OPTIONS "EOLE_OPTIONS" /**additionnal options */ |
Definition at line 108 of file optimize.c.
#define GRAPH_PREFIX "optimize_expressions_" |
Definition at line 1309 of file optimize.c.
#define GRAPH_SUFFIX ".daVinci" |
Definition at line 1310 of file optimize.c.
#define IN_FILE_NAME "/tmp/eole_to_pips" |
Definition at line 102 of file optimize.c.
#define MAX_NAME "MAX" |
Definition at line 722 of file optimize.c.
#define MIN_NAME "MIN" |
Definition at line 723 of file optimize.c.
#define OUT_FILE_NAME "/tmp/pips_to_eole" |
file name prefixes to deal with eole.
/tmp should be fast (may be mapped into memory).
Definition at line 101 of file optimize.c.
#define SIZE_OF_BUFFER 100 |
Definition at line 256 of file optimize.c.
typedef struct extract_expr_t * extract_expr_p |
typedef struct optimization_strategy * poptimization_strategy |
enum asocom_operator_t |
switch binary to nary expressions where possible.
this is normally done in eole anyway.
Enumerator | |
---|---|
not_asocom | |
is_plus | 0 |
is_mult | |
is_max | |
is_min | |
is_and | |
is_or |
Definition at line 706 of file optimize.c.
|
static |
Definition at line 166 of file optimize.c.
References CONS, EXPRESSIONWITHLEVEL, gen_copy_seq(), gen_nreverse(), and make_expressionwithlevel().
Referenced by call_filter(), and expr_filter().
|
static |
apply eole on all expressions in s.
of expressionwithlevel/expression
not empty list
create temporary files
write informations in out file for EOLE
run eole (Evaluation Optimization for Loops and Expressions) as a separate process.
read optimized expressions from eole
replace the syntax values inside le by the syntax values from ln
must now free the useless expressions
remove temorary files and free allocated memory.
free strings
free lists
Definition at line 383 of file optimize.c.
References free(), gen_free_list(), gen_length(), get_eole_command(), get_list_of_rhs(), IN_FILE_NAME, module_name(), NIL, out, OUT_FILE_NAME, pips_debug, read_from_eole(), safe_new_tmp_file(), safe_system(), safe_unlink(), swap_syntax_in_expression(), and write_to_eole().
Referenced by optimize_expressions().
Definition at line 748 of file optimize.c.
References binary_to_nary_t::binary, bton, entity_intrinsic(), entity_local_name(), lname(), binary_to_nary_t::nary, and same_string_p.
Referenced by nary_call_flt().
|
static |
apply the huffman balancing on every call to nary_operator and build calls to binary_operator instead, with cost to chose.
Definition at line 1108 of file optimize.c.
References call_domain, call_rwt(), gen_multi_recurse(), gen_true(), huffman_binary_operator, huffman_cost, huffman_mode, huffman_nary_operator, ifdebug, and print_statement().
Referenced by switch_nary_to_binary().
|
static |
rhs expressions of assignments.
put all manageable expressions arguments...
Definition at line 191 of file optimize.c.
References add_one_more_expression(), call_arguments, eole_manageable_expression(), EXPRESSION, and MAP.
Referenced by get_list_of_rhs().
|
static |
it is a multiply
nothing to change
Definition at line 562 of file optimize.c.
References call_arguments, call_function, call_to_expression(), CAR, CONS, divide, EXPRESSION, expression_syntax, gen_free_list(), gen_length(), int_to_expression(), is_inverse(), make_call(), MAP, multiply, NIL, and syntax_call.
Referenced by optimize_simplify_nary_patterns().
|
static |
apply huffman balancing algorithm if it is a call to huffman_nary_operator.
the prettyprint may only reflect this if the PRETTYPRINT_ALL_PARENTHESES property is set to true.
let us switch to a binary tree.
the call is already binary.
else
drop initial list:
last one is done in place.
Definition at line 1046 of file optimize.c.
References call_arguments, call_function, CAR, CONS, cost_expression::cost, debug_cost_expression_array(), entity_local_name(), entity_name, cost_expression::expr, EXPRESSION, fprintf(), free(), gen_free_list(), gen_length(), huffman_binary_operator, huffman_cost, huffman_mode, huffman_nary_operator, ifdebug, insert_last_into_array(), insert_sorted_into_array(), list_of_expressions_to_array(), MakeBinaryCall(), NIL, pips_debug, and print_expression().
Referenced by build_binary_operators_with_huffman().
|
static |
memory leak
memory leak
FMA(A,B,-C) => FMS(A,B,C)
avoid memory leak
Definition at line 466 of file optimize.c.
References bminus, bplus, call_arguments, call_function, CAR, CDR, EXPRESSION, EXPRESSION_, expression_syntax, fmaop, fmsop, free_expression(), gen_free_list(), gen_length(), is_uminus(), NIL, pips_assert, and syntax_call.
Referenced by generate_bminus().
void convert_to_c_operators | ( | void * | v | ) |
Definition at line 1343 of file optimize.c.
References call_domain, do_convert_to_c_operator(), gen_recurse, and gen_true().
Referenced by do_gather_all_expressions_perms(), and optimize_expressions().
void convert_to_standard_operators | ( | void * | v | ) |
Definition at line 1364 of file optimize.c.
References call_domain, do_convert_to_standard_operators(), gen_recurse, and gen_true().
Referenced by expression_substitution(), optimize_expressions(), and set_pattern().
|
static |
comparison function for qsort.
descending order.
when they are equals another criterion may be used, so as to favor double loads (with neighbor references).
Definition at line 965 of file optimize.c.
References cost_expression::cost.
Referenced by list_of_expressions_to_array().
dump all expressions in s as davinci graphs.
filename: $current.database/$module/$prefix_$phase.$suffix
directory MUST exist
Definition at line 1314 of file optimize.c.
References concatenate(), davinci_dump_all_expressions(), db_get_current_workspace_directory(), free(), GRAPH_PREFIX, GRAPH_SUFFIX, module_name(), out, safe_fclose(), safe_fopen(), and strdup().
Referenced by optimize_expressions().
|
static |
debug function
print informations from an cost_expressions array
Definition at line 980 of file optimize.c.
References pips_debug, and print_expression().
Referenced by call_rwt(), and list_of_expressions_to_array().
|
static |
Definition at line 1336 of file optimize.c.
References call_function, entity_intrinsic(), ENTITY_MINUS_P, ENTITY_PLUS_P, MINUS_C_OPERATOR_NAME, and PLUS_C_OPERATOR_NAME.
Referenced by convert_to_c_operators().
|
static |
Definition at line 1348 of file optimize.c.
References b1, basic_of_expression(), basic_pointer_p, binary_call_lhs, binary_call_rhs, call_function, entity_intrinsic(), ENTITY_MINUS_C_P, ENTITY_PLUS_C_P, free_basic(), MINUS_OPERATOR_NAME, and PLUS_OPERATOR_NAME.
Referenced by convert_to_standard_operators().
|
static |
Definition at line 147 of file optimize.c.
References call_domain, eole_okay_call_rwt(), gen_context_multi_recurse(), and gen_true().
Referenced by call_filter(), and expr_filter().
IMPLIED-DO ? others ?
Definition at line 139 of file optimize.c.
References call_function, and is_string_constant().
Referenced by eole_manageable_expression().
|
static |
other expressions may be found in loops and so?
Definition at line 202 of file optimize.c.
References add_one_more_expression(), and eole_manageable_expression().
Referenced by get_list_of_rhs().
|
static |
Definition at line 691 of file optimize.c.
References expression_gravity_rc().
Referenced by expression_gravity_inv().
|
static |
Definition at line 696 of file optimize.c.
References expression_gravity().
|
static |
forward substitute if only there once.
not implemented. WG
?
too simple?
Definition at line 677 of file optimize.c.
References call_arguments, depth, EXPRESSION, expression_syntax, MAP, syntax_call, and syntax_call_p.
Referenced by expression_gravity().
|
static |
Definition at line 514 of file optimize.c.
References bminus, bplus, call_domain, call_simplify_rwt(), entity_intrinsic(), EOLE_FMA_OPERATOR_NAME, EOLE_FMS_OPERATOR_NAME, fmaop, fmsop, gen_recurse, gen_true(), MINUS_OPERATOR_NAME, PLUS_OPERATOR_NAME, uminus, and UNARY_MINUS_OPERATOR_NAME.
Referenced by optimize_simplify_patterns().
|
static |
returns the eole command to be executed in an allocated string.
out | input file from eole. |
flags | output file to eole. |
Definition at line 113 of file optimize.c.
References concatenate(), EOLE, EOLE_OPTIONS, optimization_strategy::eole_strategy, get_string_property(), out, strategy, and strdup().
Referenced by apply_eole_on_statement().
of expressionwithlevel
Definition at line 210 of file optimize.c.
References call_domain, call_filter(), expr_filter(), expression_domain, gen_context_multi_recurse(), gen_nreverse(), gen_null(), loop_domain, loop_flt(), loop_rwt(), NIL, and pips_assert.
Referenced by apply_eole_on_statement().
|
static |
simply insert.
Definition at line 1035 of file optimize.c.
Referenced by call_rwt().
|
static |
insert ce in tce[0..n-1] by decreassing order.
find where to insert.
shift tail.
insert.
Definition at line 1024 of file optimize.c.
References cost_expression::cost.
Referenced by call_rwt().
switch asymetric operation if needed
should use the type_checker results... maybe it could be implemented also as an analyses and not only a transformation? Well, I don't know how to store expression to type data, as expressions cannot be shared and are not "named" as statements are. FC.
we have to substitute.
push down inverse operators if needed.
memory leak...
now insert invop
Definition at line 859 of file optimize.c.
References basic_int_p, basic_of_expression(), call_arguments, call_function, call_to_expression(), call_undefined, CAR, CDR, CONS, entity_intrinsic(), entity_local_name(), EXPRESSION, expression_syntax, free_expression(), gen_length(), symetric_opertor_t::inv, is_syntax_call, make_call(), make_expression(), make_syntax(), MAP, NIL, normalized_undefined, symetric_opertor_t::not_ints, pips_assert, same_string_p, symetric_opertor_t::syme, syntax_call, syntax_call_p, and what_operator().
Referenced by inverse_normalization_of_expressions().
void inverse_normalization_of_expressions | ( | statement | s | ) |
Definition at line 940 of file optimize.c.
References call_domain, gen_null(), gen_recurse, and inv_call_flt().
Definition at line 852 of file optimize.c.
References entity_intrinsic(), symetric_opertor_t::inv, and what_operator().
|
static |
Definition at line 555 of file optimize.c.
References call_function, expression_syntax, inverse, syntax_call, and syntax_call_p.
Referenced by call_nary_rwt().
Definition at line 127 of file optimize.c.
References basic_string_p, basic_undefined_p, entity_basic(), entity_initial, entity_type, type_functional_p, and value_constant_p.
Referenced by eole_okay_call_rwt().
|
static |
returns B if uminus(B), else 0
Definition at line 454 of file optimize.c.
References call_arguments, call_function, CAR, EXPRESSION, expression_syntax, gen_length(), syntax_call, syntax_call_p, and uminus.
Referenced by call_simplify_rwt().
|
static |
build an cost_expression array from an expression list.
le | of expression |
Definition at line 998 of file optimize.c.
References cost_expression::cost, cost_expression_cmp(), debug_cost_expression_array(), cost_expression::expr, EXPRESSION, gen_length(), ifdebug, malloc(), MAP, and pips_assert.
Referenced by call_rwt().
|
static |
keep on.
Definition at line 173 of file optimize.c.
References CONS, ENTITY, and loop_index.
Referenced by get_list_of_rhs().
|
static |
Definition at line 180 of file optimize.c.
References CAR, CDR, ENTITY, gen_free_list(), loop_index, NIL, and pips_assert.
Referenced by get_list_of_rhs().
top-down: switch calls to nary form.
Definition at line 774 of file optimize.c.
References binary_to_nary(), and call_function.
Referenced by naryfication_of_expressions().
|
static |
bottom-up: + + -> +
Definition at line 782 of file optimize.c.
References call_arguments, call_function, CONS, EXPRESSION, expression_syntax, free_expression(), gen_free_list(), gen_nconc(), MAP, nary_operator_p(), NIL, syntax_call, and syntax_call_p.
Referenced by naryfication_of_expressions().
Definition at line 760 of file optimize.c.
References bton, entity_local_name(), lname(), binary_to_nary_t::nary, and same_string_p.
Referenced by nary_call_rwt().
void naryfication_of_expressions | ( | statement | s | ) |
Definition at line 810 of file optimize.c.
References call_domain, gen_recurse, nary_call_flt(), and nary_call_rwt().
bool optimize_expressions | ( | const char * | module_name | ) |
pipsmake interface to apply expression optimization according to various strategy.
The strategy to use is specified with the EOLE_OPTIMIZATION_STRATEGY property. The strategies themselves are defined into the strategies[] array.
In general, strategies involve an external optimization tool that is not provided with PIPS, so they cannot be used...
At least the CSE, ICM and ICMCSE work without this tool and can be safely used. See the common_subexpression_elimination and icm phase to have a direct access to these 2 common working case. Well, it is not clear that ICMCSE would work since it would need to refresh the effects, which is not done. So the safe way is to use separately these 2 phases.
[in] | module_name |
get needed stuff.
check consistency before optimizations
do something here.
Could perform more optimizations here...
EOLE Stuff
Could perform more optimizations here...
CSE/ICM + atom
EOLE Stuff, second pass for FMA.
others?
check consistency after optimizations
return result to pipsdbm
okay !
module_name | odule_name |
Definition at line 1391 of file optimize.c.
References optimization_strategy::apply_balancing, optimization_strategy::apply_cse, optimization_strategy::apply_eole1, optimization_strategy::apply_eole2, optimization_strategy::apply_eole2_flags, apply_eole_on_statement(), optimization_strategy::apply_gcm, optimization_strategy::apply_nary_simplify, optimization_strategy::apply_simplify, clean_up_sequences(), convert_to_c_operators(), convert_to_standard_operators(), davinci_dump_expressions(), db_get_memory_resource(), DB_PUT_MEMORY_RESOURCE, DEBUG_NAME, debug_off, debug_on, EOLE_FLAGS, get_current_module_statement(), get_string_property(), ifdebug, local_name_to_top_level_entity(), module_name(), module_reorder(), optimize_simplify_nary_patterns(), optimize_simplify_patterns(), perform_ac_cse(), perform_icm_association(), pips_assert, reset_current_module_entity(), reset_current_module_statement(), reset_current_optimization_strategy(), set_current_module_entity(), set_current_module_statement(), set_current_optimization_strategy(), simplify_expressions(), statement_consistent_p(), strategy, switch_nary_to_binary(), and unnormalize_expression().
Referenced by common_subexpression_elimination(), and icm().
|
static |
N-ARY * and 1/ -> N-ARY* / N-ARY*
Definition at line 621 of file optimize.c.
References call_domain, call_nary_rwt(), divide, entity_intrinsic(), EOLE_PROD_OPERATOR_NAME, gen_recurse, gen_true(), inverse, INVERSE_OPERATOR_NAME, and multiply.
Referenced by optimize_expressions().
|
static |
look for some expressions in s and simplify some patterns.
not implemented yet.
a + (-b) -> a - b
(-b) + a -> a - b
fma(a,b,-c) => fms(a,b,c)
a * (1/ b) -> a / b
(1/ b) * a -> a / b
a + (-b * c) -> a - (b * c)
Definition at line 533 of file optimize.c.
References generate_bminus().
Referenced by optimize_expressions().
|
static |
Definition at line 259 of file optimize.c.
References buffer, pips_assert, SIZE_OF_BUFFER, and strdup().
Referenced by read_new_entities_from_eole().
|
static |
import expressions from eole.
of expression
read entities to create... should use some newgen type to do so (to share buffers...)
Definition at line 335 of file optimize.c.
References file_name, free_reference(), module, NIL, pips_debug, read_new_entities_from_eole(), read_reference(), reference_indices, and safe_fopen().
Referenced by apply_eole_on_statement().
|
static |
import a list of entity that have been created during the eole transformations and create them
read the number of new entities to create
constant
int
create integer entity
float
create float entity
double
Definition at line 275 of file optimize.c.
References entity_consistent_p(), free(), is_basic_float, is_basic_int, make_constant_entity(), module, num, pips_assert, pips_debug, pips_internal_error, read_and_allocate_string_from_file(), and same_string_p.
Referenced by read_from_eole().
|
static |
Definition at line 1297 of file optimize.c.
References strategy.
Referenced by optimize_expressions().
|
static |
Definition at line 1286 of file optimize.c.
References get_string_property(), optimization_strategy::name, pips_user_warning, same_string_p, strategies, and strategy.
Referenced by optimize_expressions().
swap term to term syntax field in expression list, as a side effect...
lcode | of expressionwithlevel |
lnew | of expression |
Definition at line 361 of file optimize.c.
References CAR, CDR, EXPRESSION, expression_syntax, EXPRESSIONWITHLEVEL, expressionwithlevel_expression, gen_length(), and pips_assert.
Referenced by apply_eole_on_statement().
|
static |
switch nary operators to binary ones.
n+ -> +, n* -> * missing: & | and so on.
options: another expression cost function could be used. for instance, defining -expression_gravity would build the most unbalanced possible expression tree wrt WG.
Definition at line 1137 of file optimize.c.
References build_binary_operators_with_huffman(), entity_intrinsic(), EOLE_PROD_OPERATOR_NAME, EOLE_SUM_OPERATOR_NAME, optimization_strategy::huffman_cost, optimization_strategy::huffman_mode, MULTIPLY_OPERATOR_NAME, PLUS_OPERATOR_NAME, and strategy.
Referenced by optimize_expressions().
|
static |
Definition at line 838 of file optimize.c.
References symetric_opertor_t::asym, entity_local_name(), symetric_opertor_t::inv, lname(), same_string_p, symetric_opertor_t::syme, and symop.
Referenced by inv_call_flt(), and inverse_operator_of().
|
static |
export a list of expression of the current module.
done thru a convenient reference.
reference astuce = make_reference(get_current_module_entity(), le);
le | of expressionwithlevel |
Definition at line 231 of file optimize.c.
References free_lexpressionwithlevel(), lexpressionwithlevel_list, make_lexpressionwithlevel(), NIL, out, and write_lexpressionwithlevel().
Referenced by write_to_eole().
|
static |
export expressions to eole thru the newgen format.
both entities and rhs expressions are exported.
Definition at line 243 of file optimize.c.
References file_name, module, pips_debug, safe_fclose(), safe_fopen(), write_list_of_rhs(), and write_tabulated_entity().
Referenced by apply_eole_on_statement().
|
static |
Definition at line 448 of file optimize.c.
Referenced by call_simplify_rwt(), and generate_bminus().
|
static |
Definition at line 446 of file optimize.c.
Referenced by call_simplify_rwt(), and generate_bminus().
|
static |
Definition at line 725 of file optimize.c.
Referenced by binary_to_nary(), and nary_operator_p().
|
static |
Definition at line 553 of file optimize.c.
Referenced by call_nary_rwt(), and optimize_simplify_nary_patterns().
|
static |
Definition at line 449 of file optimize.c.
Referenced by call_simplify_rwt(), and generate_bminus().
|
static |
Definition at line 450 of file optimize.c.
Referenced by call_simplify_rwt(), and generate_bminus().
|
static |
Definition at line 950 of file optimize.c.
Referenced by build_binary_operators_with_huffman(), and call_rwt().
|
static |
Definition at line 951 of file optimize.c.
Referenced by build_binary_operators_with_huffman(), and call_rwt().
true: Huffman.
false: rateau.
Definition at line 955 of file optimize.c.
Referenced by build_binary_operators_with_huffman(), and call_rwt().
|
static |
switch nary to binary with huffman algorithm.
Definition at line 949 of file optimize.c.
Referenced by build_binary_operators_with_huffman(), and call_rwt().
|
static |
Definition at line 552 of file optimize.c.
Referenced by is_inverse(), and optimize_simplify_nary_patterns().
|
static |
Definition at line 551 of file optimize.c.
Referenced by call_nary_rwt(), and optimize_simplify_nary_patterns().
|
static |
predefined optimization strategies.
Definition at line 1160 of file optimize.c.
Referenced by set_current_optimization_strategy().
|
static |
current strategy.
Definition at line 94 of file optimize.c.
Referenced by get_eole_command(), optimize_expressions(), reset_current_optimization_strategy(), set_current_optimization_strategy(), and switch_nary_to_binary().
|
static |
Definition at line 832 of file optimize.c.
Referenced by what_operator().
|
static |
Definition at line 447 of file optimize.c.
Referenced by generate_bminus(), incrementation_expression_to_increment(), and is_uminus().