Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!pasteur!ucbvax!decwrl!labrea!sri-unix!garth!smryan
From: smryan@garth.UUCP (Steven Ryan)
Newsgroups: comp.arch
Subject: Re: The VAX Always Uses Fewer Instructions
Message-ID: <810@garth.UUCP>
Date: 25 Jun 88 21:28:11 GMT
References: <6921@cit-vax.Caltech.Edu> <28200161@urbsdc> <10595@sol.ARPA> <270@laic.UUCP> <20424@beta.lanl.gov>
Reply-To: smryan@garth.UUCP (Steven Ryan)
Organization: INTERGRAPH (APD) -- Palo Alto, CA
Lines: 15

>As you pointed out, there is a need for optimizing assemblers.

Strong disagreement--an assembler should be safe, simple, and dumb. If you
want an optimiser, use a compiler.

What is preferable is separate layer to do the optimisation. The problem with
an assembler is that it knows very little. Consider an assembler which replaces
a long branch with a different short branch. What if it occurs in a switch?
            goto next + index
            goto a
             ...
            goto z
Also, to properly schedule requires moving code past loads and stores. How
can an assembler safely and generally determine what the target of memory
reference is?