Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: x86 (and IA64)

Author: David Fotland

Date: 14:08:52 06/05/98

Go up one level in this thread


On June 04, 1998 at 18:49:50, Robert Hyatt wrote:

>On June 04, 1998 at 17:12:27, David Fotland wrote:
>
>>On June 03, 1998 at 19:58:30, Robert Hyatt wrote:
>>
>>snipped... IA64 and x86 discussion
>>
>
>>The goals were performance and compatibility, not ease of assembly
>>language programming.  Predication, speculation, and explicit
>>parallelism can make it quite difficult to write correct assembly
>>language, and even more difficult to write assembly with optimal
>>performance.  You may want to stick to C as much as possible.
>>
>>David
>
>
>just a quick note here.  If, as you said, it is quite difficult to write
>correct assembly language and assembly language with optimal
>performance,
>then I'm sure you realize that it is not only quite difficult, but
>completely
>impossible to write a compiler for such a machine...  IE I have *never*
>found something output by a compiler that can't be improved on.  Cray
>has
>arguably the best fortran compiler in the world, and My assembly code
>makes
>Cray Blitz run 5X faster than the pure fortran version...  that's a
>*huge*
>difference...

For me, part of the problem was the different mindset needed to code
for a machine designed for ILP.  In traditional machines, removing
instructions from the code usually makes it go faster.  In EPIC, often
you can make the code faster by adding instructions.  I'm confident you
or I can take compiled code and improve on it.  I'm not as confident
that I can beat the compiler starting from scratch for any piece of code
with any complexity.

With speculation you can move instructions out of
their home basic block to get work started early.  If you hoist code
past several branches you may have to duplicate it.  If you miss an
entry to the trace of execution you are trying to optimize you will
introduce a bug.  Compilers are much better than people at keeping track
of
this kind of detail.

Predicates let you eliminate branches by
executing both sides of an if-then-else simultaneously under a
predicate.
This is easy if you are only predicating a simple expression.  But if
there are nested conditions or complex conditions, many predicates
will be involved, and it is easy to make a mistake and code the wrong
predicate on an instruction, especially when making changes to code.
Again, this is something that compilers have no trouble keeping track
of.

And there is more to EPIC than just simple traditional speculation and
predication, but I can't talk about it.  Compiler experts were involved
in defining the instruction set, so there are things in there that are
relatively easy to compile to, but are difficult for people to get right
without practice.




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.