From: Ilya Enkovich Date: Fri, 13 May 2016 09:55:58 +0000 (+0000) Subject: cse.c (rest_of_handle_cse): Use cleanup_cfg returned value cse_cfg_altered computation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da7674f6a6bd485ee250f1dcd53daec68090827e;p=gcc.git cse.c (rest_of_handle_cse): Use cleanup_cfg returned value cse_cfg_altered computation. gcc/ * cse.c (rest_of_handle_cse): Use cleanup_cfg returned value cse_cfg_altered computation. (rest_of_handle_cse2): Likewise. (rest_of_handle_cse_after_global_opts): Likewise. gcc/testsuite/ * gcc.dg/pr71084.c: New test. From-SVN: r236199 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 27deda6cc14..0346cbc9ee1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-05-13 Ilya Enkovich + + * cse.c (rest_of_handle_cse): Use cleanup_cfg + returned value cse_cfg_altered computation. + (rest_of_handle_cse2): Likewise. + (rest_of_handle_cse_after_global_opts): Likewise. + 2016-05-13 Ramana Radhakrishnan PR target/53440 diff --git a/gcc/cse.c b/gcc/cse.c index 04e1a8563d7..322e35270d8 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -7562,11 +7562,11 @@ rest_of_handle_cse (void) { timevar_push (TV_JUMP); rebuild_jump_labels (get_insns ()); - cleanup_cfg (CLEANUP_CFG_CHANGED); + cse_cfg_altered |= cleanup_cfg (CLEANUP_CFG_CHANGED); timevar_pop (TV_JUMP); } else if (tem == 1 || optimize > 1) - cleanup_cfg (0); + cse_cfg_altered |= cleanup_cfg (0); if (cse_cfg_altered && dom_info_available_p (CDI_DOMINATORS)) free_dominance_info (CDI_DOMINATORS); @@ -7634,11 +7634,11 @@ rest_of_handle_cse2 (void) { timevar_push (TV_JUMP); rebuild_jump_labels (get_insns ()); - cleanup_cfg (CLEANUP_CFG_CHANGED); + cse_cfg_altered |= cleanup_cfg (CLEANUP_CFG_CHANGED); timevar_pop (TV_JUMP); } else if (tem == 1) - cleanup_cfg (0); + cse_cfg_altered |= cleanup_cfg (0); if (cse_cfg_altered && dom_info_available_p (CDI_DOMINATORS)) free_dominance_info (CDI_DOMINATORS); @@ -7711,11 +7711,11 @@ rest_of_handle_cse_after_global_opts (void) { timevar_push (TV_JUMP); rebuild_jump_labels (get_insns ()); - cleanup_cfg (CLEANUP_CFG_CHANGED); + cse_cfg_altered |= cleanup_cfg (CLEANUP_CFG_CHANGED); timevar_pop (TV_JUMP); } else if (tem == 1) - cleanup_cfg (0); + cse_cfg_altered |= cleanup_cfg (0); if (cse_cfg_altered && dom_info_available_p (CDI_DOMINATORS)) free_dominance_info (CDI_DOMINATORS); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e3b0280a35d..4547ce31916 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2016-05-13 Ilya Enkovich + + * gcc.dg/pr71084.c: New test. + 2016-05-13 Ramana Radhakrishnan PR target/53440 diff --git a/gcc/testsuite/gcc.dg/pr71084.c b/gcc/testsuite/gcc.dg/pr71084.c new file mode 100644 index 00000000000..46fdf9fbe5c --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr71084.c @@ -0,0 +1,38 @@ +/* PR tree-optimization/71084 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +void babl_format (void); +void gimp_drawable_get_format (void); +int _setjmp (void); + +enum { + GIMP_RGB_IMAGE, + GIMP_RGBA_IMAGE, + GIMP_GRAY_IMAGE, + GIMP_GRAYA_IMAGE, + GIMP_INDEXED_IMAGE +} run_i; + +int run_height; + +void fn1 () +{ + int type, width; + if (_setjmp ()) + switch (type) + { + case GIMP_RGB_IMAGE: + babl_format (); + case GIMP_RGBA_IMAGE: + case GIMP_GRAY_IMAGE: + babl_format (); + case GIMP_GRAYA_IMAGE: + case GIMP_INDEXED_IMAGE: + gimp_drawable_get_format(); + } + for (; run_height;) + for (; run_i < (long)fn1; ++run_i) + for (; width;) + ; +}