comparison gcc/loop-doloop.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 /* Perform doloop optimizations 1 /* Perform doloop optimizations
2 Copyright (C) 2004-2017 Free Software Foundation, Inc. 2 Copyright (C) 2004-2018 Free Software Foundation, Inc.
3 Based on code by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz) 3 Based on code by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz)
4 4
5 This file is part of GCC. 5 This file is part of GCC.
6 6
7 GCC is free software; you can redistribute it and/or modify it under 7 GCC is free software; you can redistribute it and/or modify it under
504 reset the count register to 0. */ 504 reset the count register to 0. */
505 redirect_edge_and_branch_force (single_succ_edge (preheader), new_preheader); 505 redirect_edge_and_branch_force (single_succ_edge (preheader), new_preheader);
506 set_immediate_dominator (CDI_DOMINATORS, new_preheader, preheader); 506 set_immediate_dominator (CDI_DOMINATORS, new_preheader, preheader);
507 507
508 set_zero->count = profile_count::uninitialized (); 508 set_zero->count = profile_count::uninitialized ();
509 set_zero->frequency = 0;
510 509
511 te = single_succ_edge (preheader); 510 te = single_succ_edge (preheader);
512 for (; ass; ass = XEXP (ass, 1)) 511 for (; ass; ass = XEXP (ass, 1))
513 if (!add_test (XEXP (ass, 0), &te, set_zero)) 512 if (!add_test (XEXP (ass, 0), &te, set_zero))
514 break; 513 break;
520 likely get optimized out by some of the preceding optimizations). 519 likely get optimized out by some of the preceding optimizations).
521 In fact, I do not have any testcase for it. However, it would 520 In fact, I do not have any testcase for it. However, it would
522 also be very hard to show that it is impossible, so we must 521 also be very hard to show that it is impossible, so we must
523 handle this case. */ 522 handle this case. */
524 set_zero->count = preheader->count; 523 set_zero->count = preheader->count;
525 set_zero->frequency = preheader->frequency;
526 } 524 }
527 525
528 if (EDGE_COUNT (set_zero->preds) == 0) 526 if (EDGE_COUNT (set_zero->preds) == 0)
529 { 527 {
530 /* All the conditions were simplified to false, remove the 528 /* All the conditions were simplified to false, remove the