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)


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

Truth. The CFC of GCC does not have the DECLARATIONS. =(

I know that declarations is not in a block of the CFG in fact. But if
we analyze the code, a declaration always is a "part" of a block too.
So, there is no way to see in which block a declaration was made?

Thanks,
Harry


> 2011/10/25 Ian Lance Taylor <iant@google.com>:
>> 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]