[LLVMdev] noinline

Chris Lattner sabre at nondot.org
Sun Sep 30 12:39:24 PDT 2007


On Sun, 30 Sep 2007, Nikhil A. Patil wrote:
> I was interested in telling the compiler not to inline a given function, and
> discovered that the __attribute__((noinline)) implements this using a global
> variable @llvm.noinline. It did not work for me initially. I noticed that @
> llvm.noinline was being internalized by -internalize, dead-code-eliminated
> by -constmerge, causing this information not to reach the -inline pass.
>
> I am not sure if this is a bug, or I am just using the passes in some wrong
> way. Initially I thought, maybe I was being a clown by doing "opt
> -internalize -constmerge -inline" in that order, but then I discovered that
> even llvm-ld does that, so decided to just ask on the group. :)

This certainly sounds like a bug.  Please file it in bugzilla with an 
example we can use to see the problem.  Thanks!

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list