Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Inline expansion


Related Topics

In the News (Sun 20 Apr 14)

  
  CLHS: Declaration INLINE, NOTINLINE
inline specifies that it is desirable for the compiler to produce inline calls to the functions named by function-names; that is, the code for a specified function-name should be integrated into the calling routine, appearing ``in line'' in place of a procedure call.
inline and notinline declarations otherwise have no effect when the lexically visible definition of function-name is a macro definition.
inline and notinline declarations of functions that appear before the body of a flet or labels form that defines that function are bound declarations.
www.cs.colostate.edu /meps/HyperSpec/Body/dec_inlinecm_notinline.html   (446 words)

  
 Inline function - Wikipedia, the free encyclopedia
In computer science, an inline function is a programming language construct used to suggest to a compiler that a particular function be subjected to in-line expansion; that is, it suggests that the compiler insert the complete body of the function in every context where that function is used.
Inline expansion is typically used to eliminate the inherent time overhead that occurs in calling a function; it is typically used for functions that execute very quickly, as this overhead is more significant in this case.
Also, in some languages inline functions interact intimately with the compilation model; for example, in C++, it is necessary to define an inline function in every module that uses it, whereas ordinary functions must be defined in only a single module.
en.wikipedia.org /wiki/Inline_function   (961 words)

  
 inline, __inline, __forceinline (C/C++ Languages)   (Site not responding. Last check: 2007-11-04)
The inline and __inline specifiers instruct the compiler to insert a copy of the function body into each place the function is called.
The insertion (called inline expansion or inlining) occurs only if the compiler's cost/benefit analysis show it to be profitable.
Inline expansion alleviates the function-call overhead at the potential cost of larger code size.
msdn.microsoft.com /library/en-us/vclang/html/_pluslang_inline_specifier.asp?frame=true   (733 words)

  
 [No title]
This process, called an inline expansion of the function body, does not affect the scope of the function name or its arguments.
Inline expansion is not always possible or feasible.
Explicit and implicit inline requests are best reserved for small, frequently used functions, such as the operator functions that implement overloaded operators.
www.uncp.edu /home/wei/cpp_review/inlinef.doc   (200 words)

  
 Man Page inline.1
Inline files have a suffix of.il, for example: % CC foo.il hello.c Inlining is done by code generator (cg).
Coding Conventions for all Sun Systems Inline templates should be coded as expansions of C- compatible procedure calls, with the difference that the return address cannot be depended upon to be in the expected place, since no call instruction will have been executed.
The floating point stack will be empty at the start of the inline expansion template, and must be empty (except for a returned floating point value) at the end.
developers.sun.com /prodtech/cc/documentation/ss11/mr/man1/inline.1.html   (1249 words)

  
 inline functions
The compiler cannot inline a function that is in a different translation unit (assuming it does seperate compilation, which AFAIK they all do).
Inline should be used for small definitions, and in most such cases rarely the definition is changed slightly.
The purpose of inline functions is to encourage programmers to decompose their functions into smaller functions and allow the compiler to inline them *automatically*.
www.codecomments.com /message280788.html   (2551 words)

  
 5.8 Inline Expansion   (Site not responding. Last check: 2007-11-04)
Inline expansion is a compiler optimization technique that reduces the overhead of a function call by simply not doing the call: instead, the compiler effectively rewrites the program to appear as though the definition of the called function was inserted at each call site.
When the function expanded inline is large, the program after inline expansion may be substantially larger than the original program.
If the program becomes too large, inline expansion hurts speed rather than helping it, since hardware resources such as physical memory and cache will be exhausted.
www.umiacs.umd.edu /~bonnie/courses/programming/cmu_manual/node155.html   (602 words)

  
 CodeGuru Forums - C++ General: What are the differences between inline functions and macros?
The main purpose of these inline functions (usually one or two lines of code) is to return state information about objects; short functions are sensitive to the overhead of function calls.
A: Inline functions are similar to macros because they both are expanded at compile time, but the macros are expanded by the preprocessor, while inline functions are parsed by the compiler.
Inline functions are specified using the same syntax as any other function except that they include the inline keyword in the function declaration.
www.codeguru.com /forum/showthread.php?t=328273   (1192 words)

  
 5.8.1 Inline Expansion Recording   (Site not responding. Last check: 2007-11-04)
Inline expansion requires that the source for the inline expanded function to be available when calls to the function are compiled.
Instead, the programmer must tell the compiler to record the inline expansion before the definition of the inline expanded function is compiled.
When the output file is loaded, the inline expansion is made available for subsequent compilations; there is no need to compile the definition again to record the inline expansion.
www.ifi.uio.no /~kt-lab/lambdalab/doc/CMUCL/node156.html   (208 words)

  
 inline_depth (C/C++)
For example, if the inline depth is four, and if A calls B and B then calls C, all three calls will be expanded inline.
However, if the closest inline expansion is two, only A and B are expanded, and C remains as a function call.
If the inline depth is six and during expansion the preprocessor encounters an inline_depth pragma with a value of eight, the depth remains six.
msdn2.microsoft.com /en-us/library/cx053bca.aspx   (229 words)

  
 Inline Assembly   (Site not responding. Last check: 2007-11-04)
By default, the compiler inlines a number of standard C, C++, and math library functions.
Also, if one of your functions has the same name as one of the compiler's supplied library functions, the compiler assumes that it is one of the latter and replaces the call with the inlined version.
Automatic inline expansion of library functions is not related to the inline expansion that the compiler does during interprocedural optimizations.
www.osc.edu /hpc/manuals/ia64/old_docs2/c_ug/linux98.htm   (631 words)

  
 PRB: Unresolved Externals for Inline Functions
Inline functions are not visible outside of the source file where they are defined.
The Inline Specifier section in the C++ Language Reference states, "Functions that are declared as inline and that are not class member functions have internal linkage unless otherwise specified."
Force a function version of the inline function to be created in the module that it is defined in.
support.microsoft.com /kb/123768   (475 words)

  
 Info Node: (eudc)Inline Query Expansion
The expansion is performed by the command `M-x eudc-expand-inline' which is available from the `Expand Inline Query' menu item but can also be conveniently bound to a key shortcut (Note: Installation).
After querying the server for the given string, the expansion specified by `eudc-inline-expansion-format' is inserted in the buffer at point.
Inline queries consisting of two words are considered as consisting of a first name followed by a surname.
www.cs.vassar.edu /cgi-bin/info2www?(eudc)Inline+Query+Expansion   (557 words)

  
 Inline expansion - Wikipedia, the free encyclopedia
In the context of functional programming languages, inline expansion is often referred to as beta reduction, a term used in the lambda calculus, the formal language underlying these languages.
Inline expansion itself is an optimization, since it eliminates call overhead, but it is much more important as an enabling transformation.
That is, once the body of the function is expanded in the context of its call site, often with arguments that may be fixed constants, the code is opened to a variety of new optimizations that were not possible before.
en.wikipedia.org /wiki/Inline_expansion   (1000 words)

  
 Inline Expansion
Inline expansion or inlining for short is a compiler optimization which "expands" a function call site into the actual implementation of the function which is called, rather than each call transferring control to a common piece of code.
This reduces overhead associated with the function call, which is especially important for small and frequently called functions, and it helps call-site-specific compiler optimizations, especially constant propagation.
The main drawback is that the expansion usually results in a larger binary code, which can actually hurt performance if it damages locality of reference or exceeds resource constraints.
www.javvin.com /softwareglossary/InlineExpansion.html   (94 words)

  
 LWN: The cost of inline functions
In many cases, inline expansion of functions is necessary; some of these functions employ various sorts of assembly language trickery that must be part of the calling function.
The problem with inline functions is that they replicate the function body every time they are called.
An inline function may seem like it should be faster, but that is not necessarily the case.
lwn.net /Articles/82495   (1012 words)

  
 Criteria for Inline Function Expansion
Once the criteria are met, the compiler picks the routines whose inline expansion will provide the greatest benefit to program performance.
Inline a function if the inline expansion will not increase the size of the final program.
Inline a function if it is declared with the inline or __inline keywords.
www.intel.com /software/products/compilers/clin/docs/ug_cpp/lin1105.htm   (197 words)

  
 [No title]
Note that an INLINE proclamation does two things: (1) It tells the compiler to do extra things when it sees the function -definition-, to make it possible to code the function inline.
Note that while implementations are never required to perform inline expansion of function calls, many implementations that do support inline expansion will not be able to respond to local INLINE requests if this technique is not followed.
Rationale: Local INLINE declarations are of little use without some way of alerting the compiler to the possibility of inline expansion before the function is compiled.
www.cs.cmu.edu /afs/cs.cmu.edu/project/clisp/archive-ftp/compiler/passed/allow-local-inline   (519 words)

  
 Dr. Dobb's | Inline Redux | September 22, 2003
It doesn't affect other parts of the standard language, in that writing inline on a function does not change how you use the function (for example, you can still take the function's address), and it is not possible for standards-conforming C++ code to programmatically detect whether a given function was declared as inline or not.
Modern compilers are usually better than programmers are at deciding which function calls to inline, including whether to perform inline expansion of the same function at some call sites but not at others.
Among other things, this compiler is able to inline virtual member functions by assuming that the receiver of the virtual call will be of a given declared type (in order to avoid the cost not only of the function call but of the extra expense of virtual dispatch).
www.ddj.com /dept/cpp/184403879   (2683 words)

  
 header files auto inline? - GameDev.Net Discussion Forums
Inline functions must also be defined in header files, or in the same.cpp file where it is being used, since the compiler needs to know the function body to be able to inline it.
You only really want to inline small and common functions thou, so like if you have a func with a few lines that gets called alot, then i define it in the header, as stated in post above, it does have to be in the class def.
The insertion (called inline expansion or inlining) occurs only if the compiler's cost/benefit analysis show it to be profitable.
www.gamedev.net /community/forums/topic.asp?topic_id=428277   (534 words)

  
 CSc 520 Principles of Programming Languages :
The most important and popular inter-procedural optimization is inline expansion, that is replacing the call of a procedure with the procedure's body.
If, after expansion, a procedure is so large (or contains such complicated expressions) that the number of registers provided by the architecture is not enough, then spill code will have to be inserted when we run out of registers.
Hence, the body of a macro is analyzed statically in the environment of the caller, the body of an inlined procedure is analyzed in the environment of the callee (itself).
www.cs.arizona.edu /~collberg/Teaching/520/2005/Html/Html-32   (972 words)

  
 Criteria for Inline Function Expansion
Once these criteria are met, the compiler picks the routines whose inline expansions will provide the greatest benefit to program performance.
The default heuristic always inlines very small functions that meet the minimum inline criteria.
When you do not use profile-guided optimizations with -ip or -ipo, the compiler uses less aggressive inlining heuristics: it inlines a function if the inline expansion does not increase the size of the final program.
www.wpi.edu /Academics/CCC/Unix/Docs/ifc/f_ug/ipo_cri.htm   (367 words)

  
 Function Inline Expansion   (Site not responding. Last check: 2007-11-04)
Function inline expansion eliminates procedure-call overhead and allows general optimization methods to apply across the expanded code.
An inline function can be recursive, but only one level of inline expansion is performed if it is.
The address of an inline function can be taken and expressions that imply the conversion of the inlined function name to an address are allowed.
www.helsinki.fi /atk/unix/dec_manuals/DOC_40D/AQTLTBTE/DOCU_143.HTM   (229 words)

  
 /Obn - Control Inline Expansion (Windows CE .NET Application Development)   (Site not responding. Last check: 2007-11-04)
This option controls the inline expansion of functions, where n is a digit from zero through two.
Expands only functions marked as inline or __inline or in a C++ member function defined within a class declaration, which is default with /O1, /O2, and /Ox.
Expansion occurs at compiler discretion, often referred to as auto-inlining.
msdn.microsoft.com /library/en-us/wcechp40/html/ccrefObn-ControlInlineExpansion.asp?frame=true   (123 words)

  
 Semi-Inline Expansion
Semi-inline expansion shares a single copy of a function across all the calls in a component by converting the inline expansion into a local function (see section 5.6.) This takes up less space when there are multiple calls, but also provides less opportunity for context dependent optimization.
This mechanism of inline expansion combined with local call also allows recursive functions to be inline expanded.
Although recursive functions are often so complex that there is little advantage to semi-inline expansion, it can still be useful in the same sort of cases where normal inline expansion is especially advantageous, i.e.
www.ifi.uio.no /~kt-lab/lambdalab/doc/CMUCL/node157.html   (134 words)

  
 Inline Expansion of Subprograms
If a pragma Inline applies to a callable entity, this indicates that inline expansion is desired for all calls to that entity.
If a pragma Inline applies to a generic subprogram, this indicates that inline expansion is desired for all calls to all instances of that generic subprogram.
Note also that the implementation can inline calls even when no such desire was expressed by a pragma, so long as the semantics of the program remains unchanged.
www.adaic.org /standards/05aarm/html/AA-6-3-2.html   (413 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.