Re: static estimation of conditional branches?

tsych@sedona.intel.com (Terry Sych)
Wed, 9 Dec 1992 18:44:57 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)
[8 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: tsych@sedona.intel.com (Terry Sych)
Organization: Intel Corp., Chandler, Arizona
Date: Wed, 9 Dec 1992 18:44:57 GMT
References: 92-12-029 92-12-035
Keywords: optimize

Scott Mahlke <mahlke@crhc.uiuc.edu> writes:
>I was wondering if anyone is aware of any studies performed to staticly
>estimate the direction of non-loop back conditional branches in C programs.


markh@csd4.csd.uwm.edu (Mark) writes:
] How will the proposed method handle this case?


] I = Function();
] if (I < 0) {
] Branch 1
] } else {
] Branch 2
] }


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.


I do agree that much of the time, the programmer doesn't know the flow of
the program and some statistics gathering is needed.


--Terry
--
Terry Sych
tsych@sedona.intel.com
Chandler,AZ
--


Post a followup to this message

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