[LLVMdev] C as used/implemented in practice: analysis of responses

Hal Finkel hfinkel at anl.gov
Wed Jul 1 15:19:59 PDT 2015


----- Original Message -----
> From: "Russell Wallace" <russell.wallace at gmail.com>
> To: "Tim Northover" <t.p.northover at gmail.com>
> Cc: "Hal Finkel" <hfinkel at anl.gov>, llvmdev at cs.uiuc.edu
> Sent: Wednesday, July 1, 2015 2:22:24 PM
> Subject: Re: [LLVMdev] C as used/implemented in practice: analysis of responses
> 
> 
> I am arguing in favor of a point, and I understand you disagree with
> it, but I don't think I'm dismissing any use cases except a very
> small performance increment.

You seem to be implying that these optimizations only yield small performance improvements. To be sure, most optimizations yield only small (or no) improvement to most programs. But this is simply because there are a large number of optimizations (LLVM has millions of lines of code, and a significant number of them are dedicated to code optimization). Furthermore, most user code is not in hot regions, and thus does not matter for performance. Thus, the number of optimizations that matter to hot code regions in any particular program is often (although not always) limited. However, there is wide variety in hot code, and essentially all of these optimizations were implemented because they yielded a significant improvement to someone's hot code region (or were a closely-related case).

 -Hal

> Furthermore, the compiler would still
> be free to perform such optimisations where it can prove they won't
> break the program. That's not all cases, to be sure, but at least we
> would then be back to the normal scenario where over the years as
> the compiler gets smarter, things get better, as opposed to monkey's
> paw optimisations which cause a smarter compiler to make things
> worse.
> 
> 
> 
> On Wed, Jul 1, 2015 at 7:53 PM, Tim Northover <
> t.p.northover at gmail.com > wrote:
> 
> 
> On 1 July 2015 at 11:34, Russell Wallace < russell.wallace at gmail.com
> > wrote:
> > Why do you say spin?
> 
> You're dismissing all use-cases other than this very narrow one I'd
> (with my own spin) characterise as "Do What I Mean, I Can't Be
> Bothered To Get My Code Right". Fair enough, you're arguing in favour
> of a point; but it's not one I agree with.
> 
> Tim.
> 
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list