Re: Death by error checks.

sethml@dice.ugcs.caltech.edu (Seth M. LaForge)
Tue, 28 Nov 1995 22:41:13 GMT

          From comp.compilers

Related articles
Death by error checks. ianr@lsl.co.uk (1995-11-21)
Death by error checks. dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-11-27)
Re: Death by error checks. jgj@ssd.hcsc.com (1995-11-28)
Re: Death by error checks. sethml@dice.ugcs.caltech.edu (1995-11-28)
Re: Death by error checks. Terry_Madsen@mindlink.bc.ca (1995-11-30)
Re: Death by error checks. cliffc@ami.sps.mot.com (1995-11-30)
Re: Death by error checks. sethml@avarice.ugcs.caltech.edu (1995-12-09)
Re: Death by error checks. veeru@hpclearf.cup.hp.com (Veeru Mehta) (1995-12-17)
Re: Death by error checks. hbaker@netcom.com (1995-12-19)
| List of all articles for this month |

Newsgroups: comp.compilers
From: sethml@dice.ugcs.caltech.edu (Seth M. LaForge)
Keywords: optimize, C
Organization: California Institute of Technology
References: 95-11-183
Date: Tue, 28 Nov 1995 22:41:13 GMT

On Tue, 21 Nov 1995 13:51:03 GMT, Ian Ringrose <ianr@lsl.co.uk> wrote:
>What I would like to do, is give the 'c' compiler a hint in the
>macro, that the 'if' should be predicted not taken. Are there any
>'c' compilers that let me give the hint. (We build on Unix systems
>from Sun, Dec, IBM, and HP.)


I don't know of any compilers to which you can explicitly give such a
hint, but HP's compiler will something better: profile-based
optimization. Just compiler your program with the appropriate
profiling turned on and run it for a while. It dumps into a file
information about how often each branch is taken/not taken. You then
feed this file to the compiler when recompiling your program, and it
uses the profile information to optimize branches. I've heard that
there are other compilers which will do this - perhaps SGI's?


Seth


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.