This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Initial formal temporary table PATCH, not applied



! static int ! gimple_tree_eq (const void *p1, const void *p2) ! { ! int i; ! tree t1 = ((const elt_t *)p1)->val; ! tree t2 = ((const elt_t *)p2)->val; ! enum tree_code code = TREE_CODE (t1); ! ! if (TREE_CODE (t2) != code ! || TREE_TYPE (t1) != TREE_TYPE (t2)) ! return 0; ! ! for (i =


 first_rtl_op (code) - 1; i >= 0; --i)
!     {
!       tree op1 = TREE_OPERAND (t1, i);
!       tree op2 = TREE_OPERAND (t2, i);
!
!       if (op1 == op2)
! 	/* OK */;
!       else if (op1 && op2
! 	       && TREE_CONSTANT (op1) && TREE_CONSTANT (op2)
! 	       && simple_cst_equal (op1, op2))
! 	/* OK */;
!       else
! 	return 0;
Can't you just use operand_equal_p in this function instead of this?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]