libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Functions

ir_tarvalcomputed_value (const ir_node *n)
 If the expression referenced can be evaluated statically computed_value returns a tarval representing the result, tarval_bad if operation will throw an exception/produce undefined behaviour, otherwise tarval_unknown. More...
 
ir_nodeoptimize_in_place (ir_node *n)
 Applies all optimizations to n that are expressible as a pattern in Firm, i.e., they need not a walk of the graph. More...
 
int ir_is_negated_value (const ir_node *a, const ir_node *b)
 checks whether 1 value is the negated other value More...
 
ir_relation ir_get_possible_cmp_relations (const ir_node *left, const ir_node *right)
 (conservatively) approximates all possible relations when comparing the value left and right More...
 
void ir_allow_imprecise_float_transforms (int enable)
 enable/disable imprecise floatingpoint optimizations. More...
 
int ir_imprecise_float_transforms_allowed (void)
 return 1 if imprecise float transformations are allowed. More...
 

Detailed Description

Function Documentation

ir_tarval* computed_value ( const ir_node n)

If the expression referenced can be evaluated statically computed_value returns a tarval representing the result, tarval_bad if operation will throw an exception/produce undefined behaviour, otherwise tarval_unknown.

void ir_allow_imprecise_float_transforms ( int  enable)

enable/disable imprecise floatingpoint optimizations.

These include rules like (a - x) + x = a, or a-0=a. They are wrong in several corner cases but may still be fine for some applications.

ir_relation ir_get_possible_cmp_relations ( const ir_node left,
const ir_node right 
)

(conservatively) approximates all possible relations when comparing the value left and right

int ir_imprecise_float_transforms_allowed ( void  )

return 1 if imprecise float transformations are allowed.

int ir_is_negated_value ( const ir_node a,
const ir_node b 
)

checks whether 1 value is the negated other value

ir_node* optimize_in_place ( ir_node n)

Applies all optimizations to n that are expressible as a pattern in Firm, i.e., they need not a walk of the graph.

Returns a better node for n. Does not free n – other nodes could reference n.

An equivalent optimization is applied in the constructors defined in ircons.ch. There n is freed if a better node could be found.