[cfe-commits] r58551 - in /cfe/trunk: include/clang/Analysis/PathSensitive/MemRegion.h lib/Analysis/MemRegion.cpp

Ted Kremenek kremenek at apple.com
Fri Nov 14 08:37:49 PST 2008


On Nov 14, 2008, at 3:54 AM, Zhongxing Xu wrote:

>
> +void AllocaRegion::ProfileRegion(llvm::FoldingSetNodeID& ID,
> +                                 const Expr* Ex, unsigned cnt) {
> +  ID.AddInteger((unsigned) AllocaRegionKind);
> +  ID.AddPointer(Ex);
> +  ID.AddInteger(cnt);
> +}
>
> Do we need to include the superRegion in the profile?


The first value in the profile distinguishes all AllocaRegions with  
other MemRegions in the FoldingSet, so the last two elements in the  
profile are only used to distinguish between different AllocaRegion.   
Currently all AllocaRegions have the same superRegion (the region for  
the stack) so it would provide no benefit to include it.   We of  
course can change this assumption if we think different AllocaRegions  
might have different super regions.



More information about the cfe-commits mailing list