Dear All, I was wondering if there is a standard way of specifying a list of functions that *should not* be inlined by the -inline pass. 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. -- John T. -- John T. Criswell Research Programmer University of Illinois at Urbana-Champaign "It's today!" said Piglet. "My favorite day," said Pooh.
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. -Chris -- http://nondot.org/sabre/ http://llvm.org/
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/
Apparently Analagous Threads
- [LLVMdev] Selectively Disable Inlining for Functions
- [LLVMdev] Does the gcc frontend do inlining or deadcode elimination ?
- [LLVMdev] Selectively Disable Inlining for Functions
- [LLVMdev] Does the gcc frontend do inlining or deadcode elimination ?
- [LLVMdev] Does the gcc frontend do inlining or deadcode elimination ?