Re: static estimation of conditional branches?

bill@amber.csd.harris.com (Bill Leonard)
Thu, 10 Dec 1992 15:40:29 GMT

          From comp.compilers

Related articles
static estimation of conditional branches? mahlke@crhc.uiuc.edu (Scott Mahlke) (1992-12-08)
Re: static estimation of conditional branches? markh@csd4.csd.uwm.edu (1992-12-09)
Re: static estimation of conditional branches? bill@amber.csd.harris.com (1992-12-09)
Re: static estimation of conditional branches? tom@derby.cs.wisc.edu (1992-12-09)
Re: static estimation of conditional branches? tsych@sedona.intel.com (1992-12-09)
Re: static estimation of conditional branches? hagerman@ece.cmu.edu (1992-12-09)
Re: static estimation of conditional branches? bill@amber.csd.harris.com (1992-12-10)
Re: static estimation of conditional branches? hrubin@pop.stat.purdue.edu (1992-12-11)
Re: static estimation of conditional branches? henry@zoo.toronto.edu (1992-12-11)
Re: static estimation of conditional branches? idacrd!desj@uunet.UU.NET (1992-12-12)
Re: static estimation of conditional branches? jfisher@hplabsz.hpl.hp.com (1992-12-11)
Re: static estimation of conditional branches? chased@rbbb.Eng.Sun.COM (1992-12-12)
Re: static estimation of conditional branches? glew@pdx007.intel.com (1992-12-12)
[6 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: bill@amber.csd.harris.com (Bill Leonard)
Organization: Harris CSD, Ft. Lauderdale, FL
Date: Thu, 10 Dec 1992 15:40:29 GMT
Keywords: optimize
References: 92-12-029 92-12-040

tsych@sedona.intel.com (Terry Sych) writes:
> Suppose the programmer knew that Branch 1 was simply a check for some
> error condition that rarely occurred and that Branch 2 was going to be
> taken most of the time. This information could be used by the compiler to
> set the static branch prediction bit. Or if the programmer knew that for
> an If-Then-Else statement, the compiler assumes that the Then code will be
> executed more frequently than the Else code, then he or she could
> structure their code differently.


And what happens when that code is moved to a different compiler or
machine? And what happens when the code needs to be modified slightly,
just enough to change the compiler's behavior in this respect? The
maintenance programmer may or may not be aware that the code was optimized
in this way, nor may they be aware of the compiler's abilities or
short-comings.


I prefer not to write my code for a particular compiler's optimization
algorithms.


--
Bill Leonard
Harris Computer Systems Division
2101 W. Cypress Creek Road
Fort Lauderdale, FL 33309
bill@ssd.csd.harris.com
--


Post a followup to this message

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