[Prev][Next][Index]
Re: SgSymbol::declaredInStmt is a dog
- To: bfatyga@slab.extreme.indiana.edu
- Cc: sage-bugs@cica.cica.indiana.edu
- Subject: Re: SgSymbol::declaredInStmt is a dog
- In-Reply-To: Your message of "Mon, 20 Mar 1995 09:37:36 PST."
<9503201440.AA08192@skinner.cs.uoregon.edu>
- Date: Mon, 20 Mar 1995 16:19:56 -0800
- From: Lars Thomas Hansen <lth@skinner.cs.uoregon.edu>
- Sender: owner-sage-bugs@extreme.indiana.edu
>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