search for: inlinesimpl

Displaying 20 results from an estimated 29 matches for "inlinesimpl".

Did you mean: inlinesimple
2016 Apr 16
2
[TSAN] LLVM statistics and pass initialization trigger race detection
...atomic32_compare_exchange_val <null>:568340296 (libclang_rt.tsan_osx_dynamic.dylib+0x00000003e7aa) #1 llvm::sys::CompareAndSwap(unsigned int volatile*, unsigned int, unsigned int) Atomic.cpp:52 (libLTO.dylib+0x000000511914) #2 llvm::initializeSimpleInlinerPass(llvm::PassRegistry&) InlineSimple.cpp:82 (libLTO.dylib+0x000000ab2b55) #3 (anonymous namespace)::SimpleInliner::SimpleInliner() InlineSimple.cpp:50 (libLTO.dylib+0x000000ab2e8e) #4 (anonymous namespace)::SimpleInliner::SimpleInliner() InlineSimple.cpp:49 (libLTO.dylib+0x000000ab2d19) #5 llvm::createFunctionInliningPass...
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 ?
...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'll notice that it weighs each instruction as 5 with each basic block as 20. I've omitted many details, see SimpleInliner::getInlineCost() in llvm/lib/Tran...
2005 Jul 07
3
[LLVMdev] Does the gcc frontend do inlining or deadcode elimination ?
...are eliminated. I am wondering if these functions are inlined by the frontend, or identified as deadcode. For instance, SPEC2k bzip2 has 79 functions, after these two steps, only 61 functions are left. no other optimizations are used. 2) I noticed that the inlining condition (in Transforms/IPO/InlineSimple.cpp) is tested during llvm-gcc but not during the opt phase ? Can anybody explain what happens during llvm-gcc and opt respectively ? thanks, --Long
2005 Jul 11
2
[LLVMdev] Does the gcc frontend do inlining or deadcode elimination ?
...utilities.c xalloc.c word-file.c strncasecmp.c -Wa,-disable-opt -Wl,-disable-opt -lm -o llvm_parser [197.parser]$ opt -inline -inline-threshold=200 < llvm_parser.bc | llc -march=c > parser_inline.c llc: bytecode didn't read correctly. Does opt call Transform/IPO/InlineSimple to do inlining ? as I added instrumentation into it, I found: 1) getInlineCost() is called when doing llvm-gcc (without the -disable* flags) 2) getInlineCost() is not called when doing opt does the .bc code emitted by llvm-gcc carry inlining cost info ? otherwise, how does opt do inlining with...
2005 Jul 12
0
[LLVMdev] Does the gcc frontend do inlining or deadcode elimination ?
...rser]$ opt -inline -inline-threshold=200 < llvm_parser.bc | llc > -march=c > parser_inline.c llc: bytecode didn't read > correctly. This should work, what does opt print? Can you send me [off list] the llvm_parser.bc file? > Does opt call Transform/IPO/InlineSimple to do inlining? Yes. > as I added instrumentation into it, I found: > 1) getInlineCost() is called when doing llvm-gcc (without the -disable* > flags) Yes, by default llvm-gcc does optimization, including inlining. > 2) getInlineCost() is not called when doing opt I assume that t...
2005 Jul 07
0
[LLVMdev] Does the gcc frontend do inlining or deadcode elimination ?
...functions > are inlined by the frontend, or identified as deadcode. > > For instance, SPEC2k bzip2 has 79 functions, after these two steps, only > 61 functions are left. no other optimizations are used. > > 2) > I noticed that the inlining condition (in > Transforms/IPO/InlineSimple.cpp) is tested during llvm-gcc but not > during the opt phase ? Can anybody explain what happens during llvm-gcc > and opt respectively ? > > > thanks, > --Long > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at...
2010 Jul 27
2
[LLVMdev] inline callsites whose function definitions are in different file?
LLVM (2.7 release version) provides 2 implementations for inlining function callsites: - InlineSimple.cpp (-inline): inline simple callsites according to its cost analysis - InlineAlways.cpp (-always-inline): inline all callsites that are marked with "always_inline" attribute. They are both subclasses of Inline.cpp that assumes the function's definition (body) is i...
2008 Feb 21
6
[LLVMdev] Removing inlining of library functions
...ode produced for C files. By default, inlining of user and library functions (libc) is done. If I turn off inlining (-disable-inlining in gccas and gccld) then no inlining is done. I want to be able to inline user code but disallow library code to be inlined. In trying to understand the InlineSimple.cpp code, I see that library functions are tagged as having internal linkage, just as other user functions in a module, and so these library functions are inlined if they satisfy other inlining rules (e.g., strcpy() is quite often inlined). My questions: - is there a simple way to disallo...
2008 Feb 22
2
[LLVMdev] Removing inlining of library functions
...lt, inlining of user and library functions (libc) is done. If >> I turn off inlining (-disable-inlining in gccas and gccld) then no >> inlining is done. I want to be able to inline user code but disallow >> library code to be inlined. >> >> In trying to understand the InlineSimple.cpp code, I see that library >> functions are tagged as having internal linkage, just as other user >> functions in a module, and so these library functions are inlined if >> they satisfy other inlining rules (e.g., strcpy() is quite often >> inlined). >> >> My...
2010 Jul 27
0
[LLVMdev] inline callsites whose function definitions are in different file?
On Tue, Jul 27, 2010 at 7:46 AM, Chuck Zhao <czhao at eecg.toronto.edu> wrote: >  LLVM (2.7 release version) provides 2 implementations for inlining > function callsites: > > - InlineSimple.cpp (-inline):               inline simple callsites > according to its cost analysis > - InlineAlways.cpp (-always-inline):  inline all callsites that are > marked with "always_inline" attribute. > > They are both subclasses of Inline.cpp that assumes the function's &...
2008 Feb 21
0
[LLVMdev] Removing inlining of library functions
...files. > By default, inlining of user and library functions (libc) is done. If > I turn off inlining (-disable-inlining in gccas and gccld) then no > inlining is done. I want to be able to inline user code but disallow > library code to be inlined. > > In trying to understand the InlineSimple.cpp code, I see that library > functions are tagged as having internal linkage, just as other user > functions in a module, and so these library functions are inlined if > they satisfy other inlining rules (e.g., strcpy() is quite often > inlined). > > My questions: > - is the...
2008 Dec 18
0
[LLVMdev] Troubles with clang and llvm libraries and simple Xcode project
...ipo.a(GlobalOpt.o) reference to undefined llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::TargetData const*) /usr/local/lib/libLLVMipo.a(GlobalOpt.o) reference to undefined llvm::ConstantFoldLoadThroughGEPConstantExpr(llvm::Constant*, llvm::ConstantExpr*) /usr/local/lib/libLLVMipo.a(InlineSimple.o) reference to undefined llvm::CallGraphLinkVar /usr/local/lib/libLLVMipo.a(InlineSimple.o) reference to undefined llvm::CallGraphSCCPass::assignPassManager(llvm::PMStack&, llvm::PassManagerType) /usr/local/lib/libLLVMipo.a(InlineSimple.o) reference to undefined vtable for llvm::CallG...
2008 Feb 22
0
[LLVMdev] Removing inlining of library functions
...is done. >>> If >>> I turn off inlining (-disable-inlining in gccas and gccld) then no >>> inlining is done. I want to be able to inline user code but >>> disallow >>> library code to be inlined. >>> >>> In trying to understand the InlineSimple.cpp code, I see that >>> library >>> functions are tagged as having internal linkage, just as other user >>> functions in a module, and so these library functions are inlined if >>> they satisfy other inlining rules (e.g., strcpy() is quite often >>>...
2010 Oct 24
4
[LLVMdev] Inlining in LLVM
Duncan: I am only superficially familiar with LLVM structure. What I am trying to find out is if functions that have a single invocation are still found in the code during the compilation. In Open64 and other compilers, there is an early inlining pass that inlines all procedures that have a single invocation site. The reasoning is that if there is a single call to a procedure, then there is not
2005 Jul 05
0
[LLVMdev] Re: function inlining by function name ?
...ng Fei wrote: > Does llvm support inlining certain functions with their names specified by > the user ? If you think it will be easy to modify the source code to do this, > please give me some hint where to start with. There currently isn't a way to do this, but you could hack the InlineSimple.cpp file in lib/Transforms/IPO. -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
2005 Jul 07
0
[LLVMdev] External function 'pthread_once' could not be resolved
On Thu, 7 Jul 2005, Henrik Bach wrote: > The 'pthread_once' is located in the native library binary file: > /usr/lib/libpthread.a. I've also included the path to the library in > LLVM_LIB_SEARCH_PATH environment variable. If libpthread.a is a static library, lli won't be successful loading it. Try relinking lli, but add this to its tools/lli/Makefile: TOOLLINKOPTS :=
2007 Dec 21
2
[LLVMdev] Interprocedural optimizations in LLVM
Hi Everyone, Can Someone tell me all the interprocedural optimizations that LLVM 2.1 supports. Thank You, Naineet Patel CSE IITB
2008 Jun 05
0
[LLVMdev] Using annotation attributes
> I'm trying to annotate certain functions in C code, and do something with > these functions in my LLVM pass. I annotate the C code like this: > > int __attribute__((annotate("annot"))) function() { > > This nicely gets added to the LLVM bitcode in an > @llvm.global.annotations global. Now I had hoped that it'd be easy to extract > a list of functions
2006 Mar 14
0
[LLVMdev] Selectively Disable Inlining for Functions
...ng preserving full source > code information. Preserving full source code information isn't a goal of LLVM, at least if you don't count debug information. :) > Most of the patch is actually boring infrastructure, and you will note that > the actual consultation of the hints in InlineSimple.cpp is just a few lines > leaving much room for further improvements. Yup. >> Here are the specific problems with your patch that I see: >> >> 1. ExplicitInline/ImplicitInline are currently ignored. These fall into >> the class of dangerous information that is ha...