This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ast-optimizer-branch] Goto/Break/Continue/Switch elimination
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Sebastian Pop <m1sp at csc dot liv dot ac dot uk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 May 2002 11:28:06 -0400
- Subject: Re: [ast-optimizer-branch] Goto/Break/Continue/Switch elimination
- Organization: Red Hat Canada
- References: <20020502134838.A18764@linux18.lxfarm.csc.liv.ac.uk>
On Thu, 02 May 2002, Sebastian Pop wrote:
> 2002-05-02 Sebastian Pop <s.pop@laposte.net>
>
> * Makefile.in (simple-break-elim.o, simple-goto-elim.o, tree-dchain.o):
> added.
> * c-decl.c : include tree-dchain.h
> (c_expand_body) : add entry point to the goto, break elimination
> after the simplification pass.
> * simple-break-elim.c : New file.
> * simple-goto-elim.c : New file.
> * tree-dchain.h : New file.
> * tree-dchain.c : New file.
>
I still have not looked at the whole patch, but I have a few
preliminary comments:
- Many lines are longer than 80 characters.
- When placing comments, it's better if you put them before the
code you are commenting on. Sometimes you include them inside
function arguments or right before opening an if() body.
That makes the code less readable.
- There shouldn't be a space before ':'.
- Could you add a new -f flag to enable goto/break elimination?
I'm going to be committing your patch to the branch so that the
above changes are easier for you to generate. I will just #if0
around the call in c-decl.c until you add the -f flag.
Thanks. Diego.