Related articles |
---|
Recognize valid paths plfriko@yahoo.de (Tim Frink) (2008-08-20) |
Re: Recognize valid paths m.helvensteijn@gmail.com (2008-08-23) |
Re: Recognize valid paths DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-08-24) |
Re: Recognize valid paths plfriko@yahoo.de (Tim Frink) (2008-08-26) |
Re: Recognize valid paths plfriko@yahoo.de (Tim Frink) (2008-08-26) |
Re: Recognize valid paths m.helvensteijn@gmail.com (Michiel Helvensteijn) (2008-08-27) |
Re: Recognize valid paths jeffrey.kenton@comcast.net (Jeff Kenton) (2008-09-01) |
From: | Tim Frink <plfriko@yahoo.de> |
Newsgroups: | comp.compilers |
Date: | 20 Aug 2008 19:10:41 GMT |
Organization: | Compilers Central |
Keywords: | analysis, optimize, question |
Posted-Date: | 23 Aug 2008 10:52:28 EDT |
Originator: | johnl@gal.iecc.com (John L) |
Hi,
for some static program analyses it is crucial to recognize valid
paths of the control flow graph taken while executing the code.
if (x < 1)
x = 1;
if (x > 10)
x = 10;
For this example code, it's obvious that a path through both
then-parts of the conditions is not feasible. Such invalid combination
often come up from dependencies between variable assignments (x=1) and
values of branch conditions (if(x>10)). Please also note that this is
not "dead code" since each of the then-parts can be executed depending
on the value of x before the first condition.
I was wondering which compiler analyses might recognized such invalid
combinations of paths. Any ideas?
Cheers,
Tim
Return to the
comp.compilers page.
Search the
comp.compilers archives again.