Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: branch prediction, renaming, joins



Terje Mathisen wrote:
> Stefan Monnier wrote:
>>    if (a)
>>       b;
>>    else
>>       c;
>>    d;
> In your particular example, (d) must be independent of the outcome of
> the if block, which means that a decent compiler would probably hoist
> it up above instead, right?

I can imagine some reasons for a compiler to leave d on its place.
Imaging d is computing some results which is needed later.
Then the register allocator might decide to not move d, if 
abd or acd have a lower peak register usage than dab or dac.

cheers

Christian



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.