[Prev][Next][Index]

Re: SgSymbol::declaredInStmt is a dog




>How about writing a pass that would traverse all the statements, look  
>for declarations you are interested in, and annotate symbols that you  
>are interested in with appropriate statement numbers (you can use  
>SgAttribute to store annotations). Then, instead of using  
>declaredInStmt, you can just read off the attribute. --Beata

Good idea. This worked well and was easy to implement. The time for
analyzing a 1000-line module which also included libSage++.h and other
goodies fell from 53 seconds to 4 seconds with this change alone.

Thanks,
--lars