Mercurial > hg > CbC > CbC_gcc
comparison gcc/loop-init.c @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 84e7813d76e9 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
130:e108057fa461 | 132:d34655255c78 |
---|---|
1 /* Loop optimizer initialization routines and RTL loop optimization passes. | 1 /* Loop optimizer initialization routines and RTL loop optimization passes. |
2 Copyright (C) 2002-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2002-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it under | 6 GCC is free software; you can redistribute it and/or modify it under |
7 the terms of the GNU General Public License as published by the Free | 7 the terms of the GNU General Public License as published by the Free |
359 { | 359 { |
360 if (optimize > 0 | 360 if (optimize > 0 |
361 && (flag_move_loop_invariants | 361 && (flag_move_loop_invariants |
362 || flag_unswitch_loops | 362 || flag_unswitch_loops |
363 || flag_unroll_loops | 363 || flag_unroll_loops |
364 || (flag_branch_on_count_reg | 364 || (flag_branch_on_count_reg && targetm.have_doloop_end ()) |
365 && targetm.have_doloop_end ()))) | 365 || cfun->has_unroll)) |
366 return true; | 366 return true; |
367 else | 367 else |
368 { | 368 { |
369 /* No longer preserve loops, remove them now. */ | 369 /* No longer preserve loops, remove them now. */ |
370 fun->curr_properties &= ~PROP_loops; | 370 fun->curr_properties &= ~PROP_loops; |
558 {} | 558 {} |
559 | 559 |
560 /* opt_pass methods: */ | 560 /* opt_pass methods: */ |
561 virtual bool gate (function *) | 561 virtual bool gate (function *) |
562 { | 562 { |
563 return (flag_unroll_loops || flag_unroll_all_loops); | 563 return (flag_unroll_loops || flag_unroll_all_loops || cfun->has_unroll); |
564 } | 564 } |
565 | 565 |
566 virtual unsigned int execute (function *); | 566 virtual unsigned int execute (function *); |
567 | 567 |
568 }; // class pass_rtl_unroll_loops | 568 }; // class pass_rtl_unroll_loops |