Re: About gimple_body in gimple.h

2010-06-30 Thread Manuel López-Ibáñez
On 28 June 2010 15:48, Diego Novillo dnovi...@google.com wrote:
 On Mon, Jun 28, 2010 at 09:38,  jeremie.salvu...@free.fr wrote:
 Hello all,

 I would like to know why does gimple_body returns NULL pointer when I try to 
 use it after the cfg pass ? Does someone have informations about the 
 general use of it ?

 Because the body has been split up into the basic blocks of the CFG.
 You need        to use the basic block iterators to traverse the CFG (e.g.,
 FOR_EACH_BB_FN()).

 Because I am trying to traverse instructions from a C program thanks to MELT 
 (cf MELT branch) and I don't know if I have to traverse basic blocks with 
 FOR_EACH_BB_FN iterator or if there is another solution with gimple_body. 
 Basile believes that gimple_body is nearly useless.

 It is once the CFG has been built, yes.

Jeremie, it may help future users if you added this information to the
comment above gimple_body. I think such a small patch wouldn't need
any copyright assignment.

Thanks,

Manuel.


Re: About gimple_body in gimple.h

2010-06-30 Thread Basile Starynkevitch
On Wed, 2010-06-30 at 21:15 +0200, Manuel López-Ibáñez wrote:
 On 28 June 2010 15:48, Diego Novillo dnovi...@google.com wrote:
  On Mon, Jun 28, 2010 at 09:38,  jeremie.salvu...@free.fr wrote:
  Hello all,
 
  I would like to know why does gimple_body returns NULL pointer when I try 
  to use it after the cfg pass ? Does someone have informations about the 
  general use of it ?
 
  Because the body has been split up into the basic blocks of the CFG.
  You needto use the basic block iterators to traverse the CFG (e.g.,
  FOR_EACH_BB_FN()).
 
  Because I am trying to traverse instructions from a C program thanks to 
  MELT (cf MELT branch) and I don't know if I have to traverse basic blocks 
  with FOR_EACH_BB_FN iterator or if there is another solution with 
  gimple_body. Basile believes that gimple_body is nearly useless.
 
  It is once the CFG has been built, yes.
 
 Jeremie, it may help future users if you added this information to the
 comment above gimple_body. I think such a small patch wouldn't need
 any copyright assignment.


Jeremie Salvucci (who is my intern, so we work each working day
together) did all the necessary legal work to be authorized to
contribute to GCC (see some previous messages for references : he is
authorized to commit as student of Université Paris Est [Marne la
Vallée] and as intern of CEA -LIST). So Jeremie is already covered by
copyright assignment (from CEA)  disclaimer (from Univ Paris Est).
Legally as is ok (and this was checked by Paolo). 

However, he still don't have any ssh account on gcc.gnu.org so he don't
not yet have in practice write (after approval) access to the Subversion
repository of GCC.

What are the concrete steps to get him such an account?

It would be much simpler (both for Jeremie  for me Basile) if he [=
Jeremie Salvucci] had his own account. For the few patches he already
contributed to the MELT branch, I committed them for him. But it would
be much simpler for him to have the ability (that is the account) to
submit on Gcc's Svn.

For practical details (e.g. preferred logins, ssh keys) ask
jeremie.salvu...@free.fr

Cheers

-- 
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basileatstarynkevitchdotnet mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***




Re: About gimple_body in gimple.h

2010-06-30 Thread Manuel López-Ibáñez
On 30 June 2010 21:28, Basile Starynkevitch bas...@starynkevitch.net wrote:

 However, he still don't have any ssh account on gcc.gnu.org so he don't
 not yet have in practice write (after approval) access to the Subversion
 repository of GCC.

 What are the concrete steps to get him such an account?

http://gcc.gnu.org/svnwrite.html

(If you cannot find this information yourself, it would be extremely
helpful to provide a website patch to improve its visibility)

Until he has SVN write access, you (or I) can commit approved patches
on Jeremie's behalf. That is not excuse to not submit patches. ;-)

Cheers,

Manuel.


About gimple_body in gimple.h

2010-06-28 Thread jeremie . salvucci
Hello all,

I would like to know why does gimple_body returns NULL pointer when I try to 
use it after the cfg pass ? Does someone have informations about the general 
use of it ? 

Because I am trying to traverse instructions from a C program thanks to MELT 
(cf MELT branch) and I don't know if I have to traverse basic blocks with 
FOR_EACH_BB_FN iterator or if there is another solution with gimple_body. 
Basile believes that gimple_body is nearly useless.

Thank you.

--
Jeremie Salvucci


Re: About gimple_body in gimple.h

2010-06-28 Thread Diego Novillo
On Mon, Jun 28, 2010 at 09:38,  jeremie.salvu...@free.fr wrote:
 Hello all,

 I would like to know why does gimple_body returns NULL pointer when I try to 
 use it after the cfg pass ? Does someone have informations about the 
 general use of it ?

Because the body has been split up into the basic blocks of the CFG.
You needto use the basic block iterators to traverse the CFG (e.g.,
FOR_EACH_BB_FN()).

 Because I am trying to traverse instructions from a C program thanks to MELT 
 (cf MELT branch) and I don't know if I have to traverse basic blocks with 
 FOR_EACH_BB_FN iterator or if there is another solution with gimple_body. 
 Basile believes that gimple_body is nearly useless.

It is once the CFG has been built, yes.


Diego.