Path: utzoo!utgpu!watmath!clyde!ima!compilers-sender From: think!compass!worley@EDDIE.MIT.EDU (Dale Worley) Newsgroups: comp.compilers Subject: Interprocedural dataflow analysis question Message-ID: <3329@ima.ima.isc.com> Date: 13 Feb 89 15:11:20 GMT Sender: compilers-sender@ima.ima.isc.com Reply-To: think!compass!worley@EDDIE.MIT.EDU (Dale Worley) Lines: 36 Approved: compilers@ima.UUCP From: encore!lsuc!array!len@ai.toronto.edu (Leonard Vanek) I am specifically interested in obtaining an EXACT (rather than conservative) solution for the values (or expressions) killed by a procedure call. [Good luck, sounds like the halting problem to me. -John] Yeah, it's the halting problem. Consider (in C): int x(int i) { if (f(i)) global_variable = 0; } All you have to do is determine if f(i) can ever return true. A really interesting aspect of interprocedural analysis arises if functions are first-class values (for instance, in Scheme), so to do interprocedural analysis you have to first determine which functions (lambdas) a given call might activate. Of course, inside a lambda the potential values of its bound variables depends on which calls might activate it, and those bound variables might be used as the functions of calls... See "Control Flow Analysis in Scheme" by Olin Shivers (Proceedings SIGPLAN Conference on Prog. Lang. Design and Impl., June 1988). Dale [From think!compass!worley@EDDIE.MIT.EDU (Dale Worley)] -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { decvax | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request