This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ast-optimizer-branch] Goto/Break/Continue/Switch elimination


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]