Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!athena.mit.edu!peter From: peter@athena.mit.edu (Peter J Desnoyers) Newsgroups: comp.lang.c Subject: Re: Noalias trivia question Message-ID: <5524@bloom-beacon.MIT.EDU> Date: 26 May 88 16:12:32 GMT References: <14522@brl-adm.ARPA> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: peter@athena.mit.edu (Peter J Desnoyers) Organization: Massachusetts Institute of Technology Lines: 28 In article <14522@brl-adm.ARPA> dsill@nswc-oas.arpa (Dave Sill) writes: >From: "T. William Wells" >>Noalias >>solves a problem which CANNOT be solved by an optimizer (yes, >>this is another problem which can be shown to be equivalent to a >>halting problem). > >That's a new one on me. I'd like to see that reduction. Try add_vector( foo(x), bar(y), n). It looks uncommonly like the halting problem to me. >You are implying that programmers can solve unsolvable problems but >that programs cannot, which is simply not true. The algorithm the >programmer applies to determine when "noalias" can be used could be >used by an optimizer. You forget that programmers use often faulty and heuristic algorithms, and then debug their code. A compiler that generates bugs as often as I do (or any other programmer) would be worthless. Not only that, programmers do not use an algorithm to determine if a variable is noalias/volatile/whatever. They use coding practices to generate code that does not disobey such constraints. Then they debug their code to remove any unintentional aliasing or whatever. These are both procedures far out of the domain of any compiler. Peter Desnoyers peter@athena.mit.edu