[LLVMdev] Inline hints for *compiler clients*

Vikram S. Adve vadve at cs.uiuc.edu
Wed Mar 15 08:11:10 PST 2006

On Mar 15, 2006, at 10:04 AM, Chris Lattner wrote:

> On Wed, 15 Mar 2006, Vikram S. Adve wrote:
>> [I've changed the subject to make this a new thread.]
>> While all of this makes sense to me, note that Markus and John  
>> were asking about different situations.  Markus was asking about  
>> user-written source code.  John was asking about a compiler pass  
>> or tool written by a compiler developer, not a user.
>> These arguments apply to users but not compiler developers.  What  
>> do you think about the latter?
> Why can't the compiler pass just call InlineFunction(CallSite) on  
> the callsite it wants inlined?  The only way that can fail is if  
> LLVM cannot ever inline the call (e.g. it uses varargs).

In some cases, that would be fine.  But in other cases:
(1) It cannot "un-inline" any function that was previously inlined.
(2) It requires writing a driver loop nest to go over all call sites  
and decide what to do.  If all you want is to influence the existing  
heuristics, that seems like too much work.
(3) If multiple passes want such control, this would end up  
duplicating the driver code.


More information about the llvm-dev mailing list