indetify functions are global now
[r7256]
mode);
DBG_OPT_ALGSIM0(oldn, n, FS_OPT_ADD_A_MINUS_B);
}
mode);
DBG_OPT_ALGSIM0(oldn, n, FS_OPT_ADD_A_MINUS_B);
}
- else if (get_irn_op(a) == op_Mul) {
+ /* do NOT execute this code if reassociation is enabled, it does the inverse! */
+ else if (!get_opt_reassociation() && get_irn_op(a) == op_Mul) {
ir_node *ma = get_Mul_left(a);
ir_node *mb = get_Mul_right(a);
ir_node *ma = get_Mul_left(a);
ir_node *mb = get_Mul_right(a);
DBG_OPT_ALGSIM0(oldn, n, FS_OPT_ADD_MUL_A_X_A);
}
}
DBG_OPT_ALGSIM0(oldn, n, FS_OPT_ADD_MUL_A_X_A);
}
}
- else if (get_irn_op(b) == op_Mul) {
+ /* do NOT execute this code if reassociation is enabled, it does the inverse! */
+ else if (!get_opt_reassociation() && get_irn_op(b) == op_Mul) {
ir_node *ma = get_Mul_left(b);
ir_node *mb = get_Mul_right(b);
ir_node *ma = get_Mul_left(b);
ir_node *mb = get_Mul_right(b);
mode);
DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_0_A);
}
mode);
DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_0_A);
}
- else if (get_irn_op(a) == op_Mul) {
+ /* do NOT execute this code if reassociation is enabled, it does the inverse! */
+ else if (get_opt_reassociation() && get_irn_op(a) == op_Mul) {
ir_node *ma = get_Mul_left(a);
ir_node *mb = get_Mul_right(a);
ir_node *ma = get_Mul_left(a);
ir_node *mb = get_Mul_right(a);
* Compare function for two nodes in the hash table. Gets two
* nodes as parameters. Returns 0 if the nodes are a cse.
*/
* Compare function for two nodes in the hash table. Gets two
* nodes as parameters. Returns 0 if the nodes are a cse.
*/
-static int identities_cmp(const void *elt, const void *key)
+int identities_cmp(const void *elt, const void *key)
{
ir_node *a, *b;
int i, irn_arity_a;
{
ir_node *a, *b;
int i, irn_arity_a;
* Looks up the node in a hash table, enters it in the table
* if it isn't there yet.
*/
* Looks up the node in a hash table, enters it in the table
* if it isn't there yet.
*/
identify_remember (pset *value_table, ir_node *n)
{
ir_node *o = NULL;
identify_remember (pset *value_table, ir_node *n)
{
ir_node *o = NULL;