comparison gcc/ipa-icf-gimple.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Interprocedural Identical Code Folding pass 1 /* Interprocedural Identical Code Folding pass
2 Copyright (C) 2014-2017 Free Software Foundation, Inc. 2 Copyright (C) 2014-2018 Free Software Foundation, Inc.
3 3
4 Contributed by Jan Hubicka <hubicka@ucw.cz> and Martin Liska <mliska@suse.cz> 4 Contributed by Jan Hubicka <hubicka@ucw.cz> and Martin Liska <mliska@suse.cz>
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
461 461
462 if (!compare_operand (x1, x2)) 462 if (!compare_operand (x1, x2))
463 return return_false_with_msg (""); 463 return return_false_with_msg ("");
464 464
465 /* Type of the offset on MEM_REF does not matter. */ 465 /* Type of the offset on MEM_REF does not matter. */
466 return wi::to_offset (y1) == wi::to_offset (y2); 466 return known_eq (wi::to_poly_offset (y1), wi::to_poly_offset (y2));
467 } 467 }
468 case COMPONENT_REF: 468 case COMPONENT_REF:
469 { 469 {
470 x1 = TREE_OPERAND (t1, 0); 470 x1 = TREE_OPERAND (t1, 0);
471 x2 = TREE_OPERAND (t2, 0); 471 x2 = TREE_OPERAND (t2, 0);
638 func_checker::compare_bb (sem_bb *bb1, sem_bb *bb2) 638 func_checker::compare_bb (sem_bb *bb1, sem_bb *bb2)
639 { 639 {
640 gimple_stmt_iterator gsi1, gsi2; 640 gimple_stmt_iterator gsi1, gsi2;
641 gimple *s1, *s2; 641 gimple *s1, *s2;
642 642
643 gsi1 = gsi_start_bb_nondebug (bb1->bb); 643 gsi1 = gsi_start_nondebug_bb (bb1->bb);
644 gsi2 = gsi_start_bb_nondebug (bb2->bb); 644 gsi2 = gsi_start_nondebug_bb (bb2->bb);
645 645
646 while (!gsi_end_p (gsi1)) 646 while (!gsi_end_p (gsi1))
647 { 647 {
648 if (gsi_end_p (gsi2)) 648 if (gsi_end_p (gsi2))
649 return return_false (); 649 return return_false ();
752 || gimple_call_ctrl_altering_p (s1) != gimple_call_ctrl_altering_p (s2) 752 || gimple_call_ctrl_altering_p (s1) != gimple_call_ctrl_altering_p (s2)
753 || gimple_call_tail_p (s1) != gimple_call_tail_p (s2) 753 || gimple_call_tail_p (s1) != gimple_call_tail_p (s2)
754 || gimple_call_return_slot_opt_p (s1) != gimple_call_return_slot_opt_p (s2) 754 || gimple_call_return_slot_opt_p (s1) != gimple_call_return_slot_opt_p (s2)
755 || gimple_call_from_thunk_p (s1) != gimple_call_from_thunk_p (s2) 755 || gimple_call_from_thunk_p (s1) != gimple_call_from_thunk_p (s2)
756 || gimple_call_va_arg_pack_p (s1) != gimple_call_va_arg_pack_p (s2) 756 || gimple_call_va_arg_pack_p (s1) != gimple_call_va_arg_pack_p (s2)
757 || gimple_call_alloca_for_var_p (s1) != gimple_call_alloca_for_var_p (s2) 757 || gimple_call_alloca_for_var_p (s1) != gimple_call_alloca_for_var_p (s2))
758 || gimple_call_with_bounds_p (s1) != gimple_call_with_bounds_p (s2))
759 return false; 758 return false;
760 759
761 if (gimple_call_internal_p (s1) 760 if (gimple_call_internal_p (s1)
762 && gimple_call_internal_fn (s1) != gimple_call_internal_fn (s2)) 761 && gimple_call_internal_fn (s1) != gimple_call_internal_fn (s2))
763 return false; 762 return false;