[LLVMdev] [cfe-dev] [PROPOSAL] per-function optimization level control

Andrea_DiBiagio at sn.scee.net Andrea_DiBiagio at sn.scee.net
Tue May 7 10:02:21 PDT 2013


Hi Jonathan,

> From: Jonathan Sauer <jonathan.sauer at gmx.de>

> Have you looked at "Noise", presented at this year's European LLVM 
Conference?
> 
> | Noise is a language extension that allows a programmer to create 
> custom optimization
> | strategies and apply them to specific code segments. This enables 
> fine-grained control
> | over the optimizations applied by the compiler to conveniently 
> tune code without
> | actually rewriting it.
> <http://llvm.org/devmtg/2013-04/#poster6>
> 
> This seems to go into the same direction as your proposal. It's not 
> yet open source,
> but it's planned: <http://www.cdl.uni-saarland.de/projects/noise/>

Thanks for the feedback.
During the poster session I had a quick chat with Ralf Karrenberg who gave 
a lightning talk on project Noise.

In my understanding, their approach consists in running a sequence of 
extra optimization passes on 
functions and/or blocks of code (either generic compound statements or 
loop statements) guarded by the NOISE keyword.
Those extra passes are run on the IR produced by Clang and before the 
optimizer takes place.

Their approach does not allow for example to selectively disable passes or 
in general to override optimization options for specific functions. 

Also, the sequence of extra passes is always run in order based on the 
sequence specified by the user through the NOISE keyword.
No changes are required for the optimizer which still works as before:
 1) pass managers are still populated based on the global optimization 
level;
 2) there is no way to dynamically select passes to run based on the 
per-function optimization level.

The only use case (partially) in common between my proposal and their 
approach seems to be the case where the user tries to run extra 
optimizations on specific functions.


**********************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify postmaster at scee.net
This footnote also confirms that this email message has been checked for 
all known viruses.
Sony Computer Entertainment Europe Limited
Registered Office: 10 Great Marlborough Street, London W1F 7LP, United 
Kingdom
Registered in England: 3277793
**********************************************************************

P Please consider the environment before printing this e-mail



More information about the llvm-dev mailing list