Reputation: 21665
I am compiling code with clang
with -O4 optimization. However, I want to disable inlining of functions. I have my own LLVM pass that injects some code to the generated code. After my pass, I want to enable the inlining of functions. How can I do that.
Upvotes: 8
Views: 7164
Reputation: 656
If you are hacking clang, you can change passes order in file clang/lib/CodeGen/BackendUtil.cpp
. You should insert your pass before inlining in method CreatePasses()
.
Upvotes: 4