Hi,
I am wondering whether there are some ways I can tell clang not inline some or all functions.
Thanks a lot!
Linhai
Hi,
I am wondering whether there are some ways I can tell clang not inline some or all functions.
Thanks a lot!
Linhai
Linhai <[email protected]> writes:
I am wondering whether there are some ways I can tell clang not
inline some or all functions.
Maybe
__attribute__ ((noinline)) int foo(int x) {
return x+x;
}
Clang has its own mailing list, where most clang experts are. See
http://clang.llvm.org/
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 | llc -filetype=obj -o test.o
2013/1/31 Linhai <[email protected]>