This is the mail archive of the
mailing list for the GCC project.
Re: About gimple_body in gimple.h
- From: Diego Novillo <dnovillo at google dot com>
- To: jeremie dot salvucci at free dot fr
- Cc: gcc <gcc at gcc dot gnu dot org>
- Date: Mon, 28 Jun 2010 09:48:09 -0400
- Subject: Re: About gimple_body in gimple.h
- References: <1418089313.793821277732069136.JavaMail.firstname.lastname@example.org> <530881856.794411277732308870.JavaMail.email@example.com>
On Mon, Jun 28, 2010 at 09:38, <firstname.lastname@example.org> 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.,
> 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.