Hi, 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. :) Thanks, nikhil -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070930/8448ab1c/attachment.html>
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/