Patchwork Fix some nits in clear_unused_block_pointer

login
register
mail settings
Submitter Dehao Chen
Date Sept. 26, 2012, 7:46 p.m.
Message ID <CAO2gOZXTE7ByVV67CEWKxjr8kg_3CFixB9FQdOb9PUg3Ymgr=w@mail.gmail.com>
Download mbox | patch
Permalink /patch/187186/
State New
Headers show

Comments

Dehao Chen - Sept. 26, 2012, 7:46 p.m.
This patch fixes some small nits.

Bootstrapped and passed gcc regression tests.

Is it ok for trunk?

Thanks,
Dehao

gcc/ChangeLog:

2012-09-26  Dehao Chen  <dehao@google.com>

* tree-ssa-live.c (clear_unused_block_pointer): Fix two small nits.
Ian Taylor - Sept. 26, 2012, 9:38 p.m.
On Wed, Sep 26, 2012 at 12:46 PM, Dehao Chen <dehao@google.com> wrote:
> This patch fixes some small nits.
>
> Bootstrapped and passed gcc regression tests.
>
> Is it ok for trunk?
>
> Thanks,
> Dehao
>
> gcc/ChangeLog:
>
> 2012-09-26  Dehao Chen  <dehao@google.com>
>
> * tree-ssa-live.c (clear_unused_block_pointer): Fix two small nits.

I know it's tedious, but this is meaningless to a future reader.
Better to say what you changed.  E.g.,

        * tree-ssa-live.c (clear_unused_block_pointer): Use explicit
(void) for parameters.  Don't use LOCATION_BLOCK if it is NULL.

>  static void
> -clear_unused_block_pointer ()
> +clear_unused_block_pointer (void)

I don't think we need to say (void) any more now that we use C++.  But
I guess it does no harm.

>        FOR_EACH_EDGE (e, ei, bb->succs)
> - if (e->goto_locus)
> + if (LOCATION_BLOCK (e->goto_locus))
>    TREE_USED (LOCATION_BLOCK (e->goto_locus)) = true;

Please write if (LOCATION_BLOCK (e->goto_locus) != NULL).

This is OK with those changes.

Thanks.

Ian

Patch

Index: gcc/tree-ssa-live.c
===================================================================
--- gcc/tree-ssa-live.c (revision 191765)
+++ gcc/tree-ssa-live.c (working copy)
@@ -627,7 +627,7 @@ 
    so that they will not be streamed out.  */

 static void
-clear_unused_block_pointer ()
+clear_unused_block_pointer (void)
 {
   basic_block bb;
   gimple_stmt_iterator gsi;
@@ -814,7 +814,7 @@ 
         }

       FOR_EACH_EDGE (e, ei, bb->succs)
- if (e->goto_locus)
+ if (LOCATION_BLOCK (e->goto_locus))
   TREE_USED (LOCATION_BLOCK (e->goto_locus)) = true;
     }