diff mbox

Small cleanup in cleanup_cfg

Message ID 20130129154906.GB7360@redhat.com
State New
Headers show

Commit Message

Marek Polacek Jan. 29, 2013, 3:49 p.m. UTC
I don't see any reason why we'd want to mark BBs in this case,
changed_bbs are thrown away right after fix_loop_structure
marks them.

Regtested/bootstrapped on x86_64-linux, ok for trunk?

2013-01-29  Marek Polacek  <polacek@redhat.com>

	* cfgcleanup.c (cleanup_cfg): Don't mark affected BBs.


	Marek

Comments

Richard Biener Jan. 30, 2013, 10:55 a.m. UTC | #1
On Tue, Jan 29, 2013 at 4:49 PM, Marek Polacek <polacek@redhat.com> wrote:
> I don't see any reason why we'd want to mark BBs in this case,
> changed_bbs are thrown away right after fix_loop_structure
> marks them.
>
> Regtested/bootstrapped on x86_64-linux, ok for trunk?

Ok.

Thanks,
Richard.

> 2013-01-29  Marek Polacek  <polacek@redhat.com>
>
>         * cfgcleanup.c (cleanup_cfg): Don't mark affected BBs.
>
> --- gcc/cfgcleanup.c.mp 2013-01-29 13:53:21.740473075 +0100
> +++ gcc/cfgcleanup.c    2013-01-29 13:53:27.942491341 +0100
> @@ -3017,14 +3017,11 @@ cleanup_cfg (int mode)
>        && (changed
>           || (mode & CLEANUP_CFG_CHANGED)))
>      {
> -      bitmap changed_bbs;
>        timevar_push (TV_REPAIR_LOOPS);
>        /* The above doesn't preserve dominance info if available.  */
>        gcc_assert (!dom_info_available_p (CDI_DOMINATORS));
>        calculate_dominance_info (CDI_DOMINATORS);
> -      changed_bbs = BITMAP_ALLOC (NULL);
> -      fix_loop_structure (changed_bbs);
> -      BITMAP_FREE (changed_bbs);
> +      fix_loop_structure (NULL);
>        free_dominance_info (CDI_DOMINATORS);
>        timevar_pop (TV_REPAIR_LOOPS);
>      }
>
>         Marek
diff mbox

Patch

--- gcc/cfgcleanup.c.mp	2013-01-29 13:53:21.740473075 +0100
+++ gcc/cfgcleanup.c	2013-01-29 13:53:27.942491341 +0100
@@ -3017,14 +3017,11 @@  cleanup_cfg (int mode)
       && (changed
 	  || (mode & CLEANUP_CFG_CHANGED)))
     {
-      bitmap changed_bbs;
       timevar_push (TV_REPAIR_LOOPS);
       /* The above doesn't preserve dominance info if available.  */
       gcc_assert (!dom_info_available_p (CDI_DOMINATORS));
       calculate_dominance_info (CDI_DOMINATORS);
-      changed_bbs = BITMAP_ALLOC (NULL);
-      fix_loop_structure (changed_bbs);
-      BITMAP_FREE (changed_bbs);
+      fix_loop_structure (NULL);
       free_dominance_info (CDI_DOMINATORS);
       timevar_pop (TV_REPAIR_LOOPS);
     }