This is the mail archive of the gcc-help@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: Data-flow informations (CFG)


Harry Trinta <harrytpc@gmail.com> writes:

> A program can be represented by a CFG (Control Flow Graph).
> Within source file Profile.c, for example, is easy to navigate within
> CFG and obtain certain information.
> However, I would like some more specific information, for example,
> what are the the declarations and what are the uses of variables
> within a given node of the CFG.
>
> Can I get this information somewhere in the building?
>
> The goal is to calculate the viability of creating a "module" for
> software testing based on the data flow.

The CFG doesn't have any declarations.  In effect all declarations are
moved to the outer-most block of a function, renamed as necessary.

You can indeed find the uses of variables within a block of the CFG, by
scanning the instructions in the block.

Ian


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