"Walter Bright" <newshou...@digitalmars.com> wrote in message 
news:ij41q1$1j1q$2...@digitalmars.com...
> bearophile wrote:
>>> While in isolation that's a good idea, how far should it be taken? 
>>> Should the compiler emit information on which variables wound up in 
>>> which registers, and why? What about other of the myriad of compiler 
>>> optimizations?
>>
>> Inlining is an important optimization, so give this information to the 
>> programmer is a good start.
>
> Register allocation is far more important than inlining. Why not give 
> information about why a variable was not enregistered?

Whether either should be left up to the compiler should be down the merits 
of actually doing so, not on whether the other one is or not.

Nobody wants to be able to specify register allocation. At least ive not 
seen anyone ask for it. So thats an easy decision. It's a feature nobody 
would use even if it were included.

Inlining is completly different. Lots of people want the ability to control 
it, or at least to be able to be notified when it doesnt happen.

You say look at the asm output? So everytime the compiler gets updated, or 
somthing changes, we dig through how much source/dissambly to check 
everything is still getting inlined?

Or you say that the compiler can make better decision than the programmer? 
Maybe it can most of the time but even very mature compilers still spit out 
awful code sometimes. I thought D was supposed to be a pragmatic language? 
Well maybe that pragmatism should extend to realizing that compilers dont 
always get it right.



Reply via email to