[LLVMdev] Could I explicitly tell clang not inline some functions?

Dmitry Mikushin dmitry at kernelgen.org
Wed Jan 30 16:49:55 PST 2013


Hi,

For not inlining specific function - try to declare it
__attribute__((noinline)).

For not inlining any function - generate LLVM IR from clang, then add only
selected optimizations through opt, then codegen binary with llc:

$ clang -c test.c -O0 -emit-llvm -S -o - | opt <insert your desired
optimizations here> | llc -filetype=obj -o test.o

- D.

2013/1/31 Linhai <songlh at cs.wisc.edu>

> Hi,
>
>    I am wondering whether there are some ways I can tell clang not inline
> some or all functions.
>
>    Thanks a lot!
>
>
>                                          Linhai
> ______________________________**_________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130131/4b992a30/attachment.html>


More information about the llvm-dev mailing list