[cfe-dev] Constructing use-def chains

Simone Pellegrini spellegrini at dps.uibk.ac.at
Tue Sep 1 09:33:50 PDT 2009


Hi again,
Yes sure, I can make the code available. BTW I am also interested in this  
code review process, how it works?
Are there some coding rules to follow? Where can I find it?

Regards, Simone

On Tue, 01 Sep 2009 17:53:15 +0200, Ted Kremenek <kremenek at apple.com>  
wrote:

>
> On Sep 1, 2009, at 6:37 AM, Simone Pellegrini wrote:
>
>> Hi Ted and Moataz,
>> Actually I have already implemented Def-Use chains in clang.
>>
>> I didn't announce it in the mailing list because I thought DefUse chain  
>> analysis was not in the philosophy of Clang as all the analysis and  
>> optimizations are built in LLVM (from SSA code).
>> Anyway if the community is interested I can make the implementation  
>> available to you, my only concern is about the coding style. I saw you  
>> frequently use data containers (map, vector)
>> from the LLVM framework while I preferred to stick with the STL  
>> (because I am sure they are not buggy) :)
>> My current implementations is based on the Kennedy's book algorithm  
>> (which is recursive). The analysis has been tested against several  
>> codes... I am sure it's still not perfect but it's working in most of  
>> the cases.
>>
>> regards, Simone Pellegrini
>
> Hi Simone,
>
> We'd be delighted if you wanted to make your DefUse implementation  
> available for others to use.  I should mention that for the code to be  
> committed back to the Clang tree, it would still have to undergo code  
> review like any other patch.  If you don't want to go through this  
> process, simply making the code available would be great!
>
> To comment on your point about STL and LLVM data structures, we tend to  
> use LLVM data structures (such as DenseMap) instead of those in the STL  
> because of their vastly improved performance characteristics.  Most of  
> the LLVM data structures have direct analogues to STL data structures  
> (e.g.,, DenseMap and HashMap), so swapping one for the other is usually  
> trivial.  We're not opposed to using STL data structures when they are  
> clearly the best solution.
>
> Regards,
> Ted


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the cfe-dev mailing list