Path: utzoo!utgpu!watmath!clyde!att!pacbell!ames!mailrus!tut.cis.ohio-state.edu!ukma!husc6!yale!mfci!colwell
From: colwell@mfci.UUCP (Robert Colwell)
Newsgroups: comp.arch
Subject: Re: Assembly or ....
Message-ID: <569@m3.mfci.UUCP>
Date: 29 Nov 88 14:23:03 GMT
References: <1388@aucs.UUCP> <729@convex.UUCP> <1961@crete.cs.glasgow.ac.uk> <6529@june.cs.washington.edu> <1031@l.cc.purdue.edu> <1988Nov28.205129.2216@utzoo.uucp>
Sender: colwell@mfci.UUCP
Reply-To: colwell@mfci.UUCP (Robert Colwell)
Organization: Multiflow Computer Inc., Branford Ct. 06405
Lines: 31

In article <1988Nov28.205129.2216@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:
]In article <1031@l.cc.purdue.edu] cik@l.cc.purdue.edu (Herman Rubin) writes:
]]... But one
]]of the most amazing things that I have seen in the workings of the 
]]designers is the assumption that the compiler has all the information
]]necessary to produce optimized code!  There is no provision for input
]]as to frequency of branches...
]
]Not true; some C implementations will take advice from the profiler on
]this.  It's practically a necessity for the VLIW folks.  (Oh, you meant
]advice from the *programmer*? :-)  The guy who's wrong 3/4 of the time
]about such things?  Silly idea.)  (No, I'm not kidding -- programmer
]intuition is vastly inferior to measured data in such matters.  This
]has been known for many years.)

Programmers ARE often wrong.  We've even seen cases where the programmer
had put in assertions for his Cray code that were provably incorrect for
certain interesting sets of input data.

But for branching, I wouldn't say it's a necessity for us to have the
ability for the profiler to tell the compiler where branches are going.
We have that mechanism, but it isn't often used.  The heuristics built
in to the compiler for predicting directions work awfully well.  And if
the programmer provides branch assertions, and they're wrong, and the
performance is adversely affected, presumably he or she will discover 
that and fix it.

Bob Colwell               ..!uunet!mfci!colwell
Multiflow Computer     or colwell@multiflow.com
175 N. Main St.
Branford, CT 06405     203-488-6090