Lines Matching refs:ops
126 enum tree_code code = expr->ops.binary.op; in simplify_binary_operation()
153 expr.ops.binary.op = EQ_EXPR; in simplify_binary_operation()
154 expr.ops.binary.opnd0 = gimple_assign_rhs1 (stmt); in simplify_binary_operation()
155 expr.ops.binary.opnd1 = gimple_assign_rhs2 (stmt); in simplify_binary_operation()
250 && (TREE_CODE (element.expr()->ops.single.rhs) == SSA_NAME in lookup_avail_expr()
251 || is_gimple_min_invariant (element.expr()->ops.single.rhs))) in lookup_avail_expr()
395 inchash::add_expr (expr->ops.single.rhs, hstate); in add_hashable_expr()
399 hstate.add_object (expr->ops.unary.op); in add_hashable_expr()
405 if (CONVERT_EXPR_CODE_P (expr->ops.unary.op) in add_hashable_expr()
406 || expr->ops.unary.op == NON_LVALUE_EXPR) in add_hashable_expr()
409 inchash::add_expr (expr->ops.unary.opnd, hstate); in add_hashable_expr()
413 hstate.add_object (expr->ops.binary.op); in add_hashable_expr()
414 if (commutative_tree_code (expr->ops.binary.op)) in add_hashable_expr()
415 inchash::add_expr_commutative (expr->ops.binary.opnd0, in add_hashable_expr()
416 expr->ops.binary.opnd1, hstate); in add_hashable_expr()
419 inchash::add_expr (expr->ops.binary.opnd0, hstate); in add_hashable_expr()
420 inchash::add_expr (expr->ops.binary.opnd1, hstate); in add_hashable_expr()
425 hstate.add_object (expr->ops.ternary.op); in add_hashable_expr()
426 if (commutative_ternary_tree_code (expr->ops.ternary.op)) in add_hashable_expr()
427 inchash::add_expr_commutative (expr->ops.ternary.opnd0, in add_hashable_expr()
428 expr->ops.ternary.opnd1, hstate); in add_hashable_expr()
431 inchash::add_expr (expr->ops.ternary.opnd0, hstate); in add_hashable_expr()
432 inchash::add_expr (expr->ops.ternary.opnd1, hstate); in add_hashable_expr()
434 inchash::add_expr (expr->ops.ternary.opnd2, hstate); in add_hashable_expr()
444 fn_from = expr->ops.call.fn_from; in add_hashable_expr()
449 for (i = 0; i < expr->ops.call.nargs; i++) in add_hashable_expr()
450 inchash::add_expr (expr->ops.call.args[i], hstate); in add_hashable_expr()
458 for (i = 0; i < expr->ops.phi.nargs; i++) in add_hashable_expr()
459 inchash::add_expr (expr->ops.phi.args[i], hstate); in add_hashable_expr()
482 tree t = expr->ops.single.rhs; in avail_expr_hash()
587 return equal_mem_array_ref_p (expr0->ops.single.rhs, in hashable_expr_equal_p()
588 expr1->ops.single.rhs) in hashable_expr_equal_p()
589 || operand_equal_p (expr0->ops.single.rhs, in hashable_expr_equal_p()
590 expr1->ops.single.rhs, 0); in hashable_expr_equal_p()
592 if (expr0->ops.unary.op != expr1->ops.unary.op) in hashable_expr_equal_p()
595 if ((CONVERT_EXPR_CODE_P (expr0->ops.unary.op) in hashable_expr_equal_p()
596 || expr0->ops.unary.op == NON_LVALUE_EXPR) in hashable_expr_equal_p()
600 return operand_equal_p (expr0->ops.unary.opnd, in hashable_expr_equal_p()
601 expr1->ops.unary.opnd, 0); in hashable_expr_equal_p()
604 if (expr0->ops.binary.op != expr1->ops.binary.op) in hashable_expr_equal_p()
607 if (operand_equal_p (expr0->ops.binary.opnd0, in hashable_expr_equal_p()
608 expr1->ops.binary.opnd0, 0) in hashable_expr_equal_p()
609 && operand_equal_p (expr0->ops.binary.opnd1, in hashable_expr_equal_p()
610 expr1->ops.binary.opnd1, 0)) in hashable_expr_equal_p()
614 return (commutative_tree_code (expr0->ops.binary.op) in hashable_expr_equal_p()
615 && operand_equal_p (expr0->ops.binary.opnd0, in hashable_expr_equal_p()
616 expr1->ops.binary.opnd1, 0) in hashable_expr_equal_p()
617 && operand_equal_p (expr0->ops.binary.opnd1, in hashable_expr_equal_p()
618 expr1->ops.binary.opnd0, 0)); in hashable_expr_equal_p()
621 if (expr0->ops.ternary.op != expr1->ops.ternary.op in hashable_expr_equal_p()
622 || !operand_equal_p (expr0->ops.ternary.opnd2, in hashable_expr_equal_p()
623 expr1->ops.ternary.opnd2, 0)) in hashable_expr_equal_p()
628 if (expr0->ops.ternary.op == BIT_INSERT_EXPR in hashable_expr_equal_p()
629 && TREE_CODE (expr0->ops.ternary.opnd1) == INTEGER_CST in hashable_expr_equal_p()
630 && TREE_CODE (expr1->ops.ternary.opnd1) == INTEGER_CST in hashable_expr_equal_p()
631 && TYPE_PRECISION (TREE_TYPE (expr0->ops.ternary.opnd1)) in hashable_expr_equal_p()
632 != TYPE_PRECISION (TREE_TYPE (expr1->ops.ternary.opnd1))) in hashable_expr_equal_p()
635 if (operand_equal_p (expr0->ops.ternary.opnd0, in hashable_expr_equal_p()
636 expr1->ops.ternary.opnd0, 0) in hashable_expr_equal_p()
637 && operand_equal_p (expr0->ops.ternary.opnd1, in hashable_expr_equal_p()
638 expr1->ops.ternary.opnd1, 0)) in hashable_expr_equal_p()
642 return (commutative_ternary_tree_code (expr0->ops.ternary.op) in hashable_expr_equal_p()
643 && operand_equal_p (expr0->ops.ternary.opnd0, in hashable_expr_equal_p()
644 expr1->ops.ternary.opnd1, 0) in hashable_expr_equal_p()
645 && operand_equal_p (expr0->ops.ternary.opnd1, in hashable_expr_equal_p()
646 expr1->ops.ternary.opnd0, 0)); in hashable_expr_equal_p()
654 if (!gimple_call_same_target_p (expr0->ops.call.fn_from, in hashable_expr_equal_p()
655 expr1->ops.call.fn_from)) in hashable_expr_equal_p()
658 if (! expr0->ops.call.pure) in hashable_expr_equal_p()
661 if (expr0->ops.call.nargs != expr1->ops.call.nargs) in hashable_expr_equal_p()
664 for (i = 0; i < expr0->ops.call.nargs; i++) in hashable_expr_equal_p()
665 if (! operand_equal_p (expr0->ops.call.args[i], in hashable_expr_equal_p()
666 expr1->ops.call.args[i], 0)) in hashable_expr_equal_p()
669 if (stmt_could_throw_p (cfun, expr0->ops.call.fn_from)) in hashable_expr_equal_p()
671 int lp0 = lookup_stmt_eh_lp (expr0->ops.call.fn_from); in hashable_expr_equal_p()
672 int lp1 = lookup_stmt_eh_lp (expr1->ops.call.fn_from); in hashable_expr_equal_p()
684 if (expr0->ops.phi.nargs != expr1->ops.phi.nargs) in hashable_expr_equal_p()
687 for (i = 0; i < expr0->ops.phi.nargs; i++) in hashable_expr_equal_p()
688 if (! operand_equal_p (expr0->ops.phi.args[i], in hashable_expr_equal_p()
689 expr1->ops.phi.args[i], 0)) in hashable_expr_equal_p()
716 expr->ops.single.rhs = gimple_assign_rhs1 (stmt); in expr_hash_elt()
723 expr->ops.unary.op = subcode; in expr_hash_elt()
724 expr->ops.unary.opnd = gimple_assign_rhs1 (stmt); in expr_hash_elt()
729 expr->ops.binary.op = subcode; in expr_hash_elt()
730 expr->ops.binary.opnd0 = gimple_assign_rhs1 (stmt); in expr_hash_elt()
731 expr->ops.binary.opnd1 = gimple_assign_rhs2 (stmt); in expr_hash_elt()
736 expr->ops.ternary.op = subcode; in expr_hash_elt()
737 expr->ops.ternary.opnd0 = gimple_assign_rhs1 (stmt); in expr_hash_elt()
738 expr->ops.ternary.opnd1 = gimple_assign_rhs2 (stmt); in expr_hash_elt()
739 expr->ops.ternary.opnd2 = gimple_assign_rhs3 (stmt); in expr_hash_elt()
749 expr->ops.binary.op = gimple_cond_code (stmt); in expr_hash_elt()
750 expr->ops.binary.opnd0 = gimple_cond_lhs (stmt); in expr_hash_elt()
751 expr->ops.binary.opnd1 = gimple_cond_rhs (stmt); in expr_hash_elt()
762 expr->ops.call.fn_from = call_stmt; in expr_hash_elt()
765 expr->ops.call.pure = true; in expr_hash_elt()
767 expr->ops.call.pure = false; in expr_hash_elt()
769 expr->ops.call.nargs = nargs; in expr_hash_elt()
770 expr->ops.call.args = XCNEWVEC (tree, nargs); in expr_hash_elt()
772 expr->ops.call.args[i] = gimple_call_arg (call_stmt, i); in expr_hash_elt()
778 expr->ops.single.rhs = gimple_switch_index (swtch_stmt); in expr_hash_elt()
784 expr->ops.single.rhs = gimple_goto_dest (stmt); in expr_hash_elt()
793 expr->ops.phi.nargs = nargs; in expr_hash_elt()
794 expr->ops.phi.args = XCNEWVEC (tree, nargs); in expr_hash_elt()
796 expr->ops.phi.args[i] = gimple_phi_arg_def (stmt, i); in expr_hash_elt()
832 size_t nargs = old_elt.m_expr.ops.call.nargs; in expr_hash_elt()
835 m_expr.ops.call.args = XCNEWVEC (tree, nargs); in expr_hash_elt()
837 m_expr.ops.call.args[i] = old_elt.m_expr.ops.call.args[i]; in expr_hash_elt()
841 size_t nargs = old_elt.m_expr.ops.phi.nargs; in expr_hash_elt()
844 m_expr.ops.phi.args = XCNEWVEC (tree, nargs); in expr_hash_elt()
846 m_expr.ops.phi.args[i] = old_elt.m_expr.ops.phi.args[i]; in expr_hash_elt()
856 free (m_expr.ops.call.args); in ~expr_hash_elt()
858 free (m_expr.ops.phi.args); in ~expr_hash_elt()
877 print_generic_expr (stream, m_expr.ops.single.rhs); in print()
881 fprintf (stream, "%s ", get_tree_code_name (m_expr.ops.unary.op)); in print()
882 print_generic_expr (stream, m_expr.ops.unary.opnd); in print()
886 print_generic_expr (stream, m_expr.ops.binary.opnd0); in print()
887 fprintf (stream, " %s ", get_tree_code_name (m_expr.ops.binary.op)); in print()
888 print_generic_expr (stream, m_expr.ops.binary.opnd1); in print()
892 fprintf (stream, " %s <", get_tree_code_name (m_expr.ops.ternary.op)); in print()
893 print_generic_expr (stream, m_expr.ops.ternary.opnd0); in print()
895 print_generic_expr (stream, m_expr.ops.ternary.opnd1); in print()
897 print_generic_expr (stream, m_expr.ops.ternary.opnd2); in print()
904 size_t nargs = m_expr.ops.call.nargs; in print()
907 fn_from = m_expr.ops.call.fn_from; in print()
916 print_generic_expr (stream, m_expr.ops.call.args[i]); in print()
927 size_t nargs = m_expr.ops.phi.nargs; in print()
932 print_generic_expr (stream, m_expr.ops.phi.args[i]); in print()
1066 expr->ops.binary.op = TREE_CODE (cond); in initialize_expr_from_cond()
1067 expr->ops.binary.opnd0 = TREE_OPERAND (cond, 0); in initialize_expr_from_cond()
1068 expr->ops.binary.opnd1 = TREE_OPERAND (cond, 1); in initialize_expr_from_cond()
1073 expr->ops.unary.op = TRUTH_NOT_EXPR; in initialize_expr_from_cond()
1074 expr->ops.unary.opnd = TREE_OPERAND (cond, 0); in initialize_expr_from_cond()
1096 cond->ops.binary.op = code;
1097 cond->ops.binary.opnd0 = op0;
1098 cond->ops.binary.opnd1 = op1;