search for: inlinethreshold

Displaying 3 results from an estimated 3 matches for "inlinethreshold".

2005 Jul 04
2
[LLVMdev] function inlining threshold ?
I am using llvm for source-to-source inlining. So I did: % llvm-gcc file_a.c file_b.c ... file_n.c -o file % opt -inline -inline-threshold=1000 < file.bc | llc -march=c > outfile.c Can anyone tell me how llvm determines if a function should be inlined, and what roll does "inline-threshold" play ? (Does the example mean that if the function body has fewer than 1000 instructions,
2005 Jul 05
0
[LLVMdev] function inlining threshold ?
...has fewer than 1000 > instructions, then it should be inlined ?) The LLVM inliner structure is implemented in llvm/lib/Transforms/IPO/Inliner.cpp which is a base implementation. There, you can see that -inline-threshold is a switch that provides value to InlineLimit which is used to initialize InlineThreshold member variable. This is compared with the output of getInlineCost() which is a virtual function. Currently, the inliner implemented in LLVM is InlineSimple.cpp in the same directory, which adds cost to functions if they have recursive calls, allocas, and other features, but at the end, you'l...
2010 Jun 08
1
[LLVMdev] the PartialSpecialization pass (was Re: Is there a "callback optimization"?)
Good evening, Kenneth. Thank you to apply (and rewrite my naive code better) and to file the issue to http://llvm.org/bugs/show_bug.cgi?id=7304 I have checked r105528 at this morning. I think the pass must be still cleaned up and rewritten. There are my two proposals for enhancement. 1) To separate Specialization(and rewriting callsites) to other module. It would be better if new module were