[LLVMdev] Selectively Disable Inlining for Functions

Vikram S. Adve vadve at cs.uiuc.edu
Tue Mar 7 07:02:30 PST 2006


On Mar 6, 2006, at 4:05 PM, Chris Lattner wrote:

> On Mon, 6 Mar 2006, John Criswell wrote:
>> I was wondering if there is a standard way of specifying a list of  
>> functions that *should not* be inlined by the -inline pass.
>
> Nope, but you could hack something into gccas/gccld if you want.   
> Of course, you can disable inlining completely with the -disable- 
> inlining flag.
>
>> I'm currently working with an experimental analysis pass that  
>> checks for calls to memory allocation functions; inlining and dead  
>> code elimination might make the pass more stable, but we don't  
>> want to inline the calls to the memory allocation functions until  
>> after our analysis pass is finished.
>
> The simplest way is to change the heuristic to consider those  
> functions as expensive to inline.


Changing the heuristics directly would have to be a custom change  
(i.e., couldn't be checked in).  Is there a way for a client pass or  
tool to influence the heuristics?  If not, does it make sense to add  
such a mechanism?


--Vikram
http://www.cs.uiuc.edu/~vadve
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list