Re: Optimizing Across && And ||

daniels@cse.ogi.edu (Scott David Daniels)
Tue, 21 Mar 1995 18:42:45 GMT

          From comp.compilers

Related articles
[11 earlier articles]
Re: Optimizing Across && And || leichter@zodiac.rutgers.edu (1995-03-07)
Re: Optimizing Across && And || preston@tera.com (1995-03-08)
Re: Optimizing Across && And || pardo@cs.washington.edu (1995-03-13)
Re: Optimizing Across && And || chase@centerline.com (1995-03-14)
Re: Optimizing Across && And || jqb@netcom.com (1995-03-15)
Re: Optimizing Across && And || cdg@nullstone.com (1995-03-20)
Re: Optimizing Across && And || daniels@cse.ogi.edu (1995-03-21)
Re: Optimizing Across && And || bill@amber.ssd.hcsc.com (1995-04-03)
| List of all articles for this month |
Newsgroups: comp.compilers
From: daniels@cse.ogi.edu (Scott David Daniels)
Keywords: C, optimize
Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR
References: 95-02-179 95-03-089
Date: Tue, 21 Mar 1995 18:42:45 GMT

>jqb@netcom.com (Jim Balter) writes:
> What these people may be missing is that there is another side to dead code
> detection, namely *notification*. It is true that properly written programs
> shouldn't contain dead code. Therefore, presence of dead code indicates
> a possible problem.


While this is often true for a program which is written to solve one problem
on one machine, it is very often NOT true for software which is:
  1) written to work efficiently in a portable environment.
    ---code tests invariants to determine which of two tuned loops to use.
  2) re-compiled with differing size parameters fixed.
    ---code tests whether certain tables "fit" to determine data structures.
  3) properly written ( :-> )
    ---Assertions are placed in the code to verify invariants.
Any programming system which rewards the removal of invariant
checking by the programmer is, IMHO, wrong-headed. Perhaps you
need a way to allow the programmer to claim some code may be
dead. I personally would like my compiler to remove code for
any of my assertions that it could prove true.


-Scott David Daniels
  daniels@cse.ogi.edu
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.