Re: static estimation of conditional branches?

bill@amber.csd.harris.com (Bill Leonard)
Wed, 9 Dec 1992 16:15:09 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)
[10 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: Wed, 9 Dec 1992 16:15:09 GMT
Keywords: optimize
References: 92-12-029 92-12-035

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:
> No method can give you sensible results on both cases without also
> deriving probability distributions for all the variables in the program.


I surmised that the original poster was asking if there was any empirical
data to say that "most if-tests are taken" or "most if-tests are not
taken". However, I would think that such conclusions would be heavily
influenced by programming style and the programmer's personal preferences.


For instance, some people are inclined to write code this way:


      result = SomeFunction() ;
      if (result == AnError) {
            /* do error handling */
            return ;
      }
      /* normal control flow */


while others are more inclined to write the same thing this way:


      result = SomeFunction() ;
      if (result != AnError) {
            /* normal control flow */
            return ;
      }
      /* do error handling */


and of course others will write an if-then-else, which the original poster
indicated was not of interest.


Consequently, I would not believe any studies that indicated the
likelihood of branch-taken or not taken.
--
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.