pipeline optimization is one area, where clever compilers outperform human
ASSEMBLER programmers.
Another aspect IMHO is: aggressively optimized programs tend to become
unreadable at the ASSEMBLER level. Look at the assembly list of an OPT(3) C
program (given mature "old" compilers, not buggy new ones).
I want the source code of programs to be readable and maintainable, that is, the
algorithms should be clearly specified and the source code should be the first
and most important step of the documentation. And the compiler has to do the
optimization work, including loop unrolling, reordering of statements etc. This
has to take place below the source level and must not compromise the readability
of the source code.
Kind regards
Bernd
P.F. schrieb:
> Maybe not, but my recent experiments with Metal-C on z/OS showed me the
> genuine power of that HLL compiler's optimization capabilities. The
> Metal-C optimizer deals with not just the classic loop unrolling and
> other peephole optimizations, but with program-scope pipeline
> optimizations for z-architecture as well. That is one area (IMHO) where
> a good HLL optimizer will very likely out-perform the hand-coded program
> every time. Optimizing for the pipeline is not something any of us has
> been trained how to do properly. I suspect that none of us (certainly
> not me) are even remotely capable of reviewing anything beyond a quite
> small assembler program in it's entirety for pipeline optimization
> opportunities.
>
> I'm not saying that hand-coded pipeline optimization can't be done at
> all, just that it is so difficult to do by hand that an HLL optimizer
> will very likely beat us at the game every time.
>
> It would be quite handy if an HLASM pipeline optimizer was available.
> The idea would be to completely code and debug an HLASM program, then
> feed the source (or maybe the ADATA side file?) to the optimizer which
> would output pipeline-optimized source.
>
> Or maybe a way to use an existing optimizer (like the one in Metal-C) by
> feeding ADATA into it, generating pseudo-source listing and object code
> as output?
>
> P.
>
>
|