comparison gcc/cfghooks.c @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children f6334be47118
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
435 return NULL; 435 return NULL;
436 436
437 new_bb->count = bb->count; 437 new_bb->count = bb->count;
438 new_bb->frequency = bb->frequency; 438 new_bb->frequency = bb->frequency;
439 new_bb->loop_depth = bb->loop_depth; 439 new_bb->loop_depth = bb->loop_depth;
440 new_bb->discriminator = bb->discriminator;
440 441
441 if (dom_info_available_p (CDI_DOMINATORS)) 442 if (dom_info_available_p (CDI_DOMINATORS))
442 { 443 {
443 redirect_immediate_dominators (CDI_DOMINATORS, bb, new_bb); 444 redirect_immediate_dominators (CDI_DOMINATORS, bb, new_bb);
444 set_immediate_dominator (CDI_DOMINATORS, new_bb, bb); 445 set_immediate_dominator (CDI_DOMINATORS, new_bb, bb);
767 if (current_loops != NULL 768 if (current_loops != NULL
768 && dummy->loop_father != NULL 769 && dummy->loop_father != NULL
769 && dummy->loop_father->header == dummy 770 && dummy->loop_father->header == dummy
770 && dummy->loop_father->latch == e_src) 771 && dummy->loop_father->latch == e_src)
771 dummy->loop_father->latch = jump; 772 dummy->loop_father->latch = jump;
772 773
773 if (new_bb_cbk != NULL) 774 if (new_bb_cbk != NULL)
774 new_bb_cbk (jump); 775 new_bb_cbk (jump);
775 } 776 }
776 } 777 }
777 778
827 } 828 }
828 829
829 /* Fix up edges that now fall through, or rather should now fall through 830 /* Fix up edges that now fall through, or rather should now fall through
830 but previously required a jump around now deleted blocks. Simplify 831 but previously required a jump around now deleted blocks. Simplify
831 the search by only examining blocks numerically adjacent, since this 832 the search by only examining blocks numerically adjacent, since this
832 is how find_basic_blocks created them. */ 833 is how they were created. */
833 834
834 void 835 void
835 tidy_fallthru_edges (void) 836 tidy_fallthru_edges (void)
836 { 837 {
837 basic_block b, c; 838 basic_block b, c;
850 851
851 /* We care about simple conditional or unconditional jumps with 852 /* We care about simple conditional or unconditional jumps with
852 a single successor. 853 a single successor.
853 854
854 If we had a conditional branch to the next instruction when 855 If we had a conditional branch to the next instruction when
855 find_basic_blocks was called, then there will only be one 856 CFG was built, then there will only be one out edge for the
856 out edge for the block which ended with the conditional 857 block which ended with the conditional branch (since we do
857 branch (since we do not create duplicate edges). 858 not create duplicate edges).
858 859
859 Furthermore, the edge will be marked as a fallthru because we 860 Furthermore, the edge will be marked as a fallthru because we
860 merge the flags for the duplicate edges. So we do not want to 861 merge the flags for the duplicate edges. So we do not want to
861 check that the edge is not a FALLTHRU edge. */ 862 check that the edge is not a FALLTHRU edge. */
862 863