Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bellcore!sneaky!hira From: hira@sneaky.bellcore.com (Hira Agrawal) Newsgroups: gnu.gcc Subject: use/def sets of program statements Message-ID: <17066@bellcore.bellcore.com> Date: 27 Jun 89 19:48:29 GMT Sender: news@bellcore.bellcore.com Reply-To: hira@wind.bellcore.com (Hira Agrawal) Organization: Bell Communications Research, Morristown NJ Lines: 19 I need to compute def and use sets of all statements in a C program. Def set of a statement is set of all variables (actually l-valued expressions) whose values could be modified by that statement. Use set of a statement is the set of all l-valued expressions whose values are used in computing the def-set values of that statement. Def/use sets of compound statements (if, while, etc.) are computed by taking the union of def/use sets of all their constituent statements. What are the possible ways of computing these sets while compiling a program with gcc? One way could be to do so while parsing the program. Is there any way I could do the same from RTL code? I am not too familiar with internals of gcc, so I wish to investigate various options before starting to code any one. I'll appreciate any help in this regard. Thanks. -- Hira. hira@wind.bellcore.com