Inline expansion - CompWisdom
About us  |  Why use us?  |  Press  |  Contact us

 

Topic: Inline expansion


Related Topics



  
 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.
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.
This automatic type of inlining is a critical optimization in functional languages and object-oriented programming languages, which rely on it to give enough context to their typically small functions to make classical optimization effective.
http://en.wikipedia.org/wiki/In-line_expansion   (1144 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.
Besides the problems associated with in-line expansion in general, inline functions as a language feature may not be as valuable as they appear, for a number of reasons:
For problems with the optimization itself, rather than the language feature, see problems with inline expansion.
http://en.wikipedia.org/wiki/Inline_function   (940 words)

  
 Inline Assembly
Automatic inline expansion of library functions is not related to the inline expansion that the compiler does during interprocedural optimizations.
Consequently, if the program defines a function with the same name as one of the known library routines, you must use the -nolib_inline option to ensure that the program's function is the one used.
Sometimes inline expansion of library functions can cause unexpected results.
http://www.intel.com/software/products/compilers/clin/docs/ug_cpp/lin1154.htm   (684 words)

  
 PRB: Unresolved Externals for Inline Functions
Inline functions are not visible outside of the source file where they are defined.
Force a function version of the inline function to be created in the module that it is defined in.
The function is declared in a header (.H) file, defined as an inline function in one source (.CPP) file, and called from a second source (.CPP) file.
http://support.microsoft.com/kb/123768/EN-US   (475 words)

  
 2. How to up the CODE efficient. : FUJITSU
Inline expansion optimization is expanded the process of function for call ahead instead of function call to defined function in C source.
To use "inline candidate selection function" in Softune C Analyzer is recommended.
When using a lot of signed 1 byte/2 bytes data, code size is increased at comparing as unsigned data.
http://www.fujitsu.com/global/services/microelectronics/product/micom/support/knowhow/fr/soft02.html   (890 words)

  
 Descriptions of Optimizations
One of the optimization techniques the compiler uses is inline expansion, where a call to a subprogram is replaced by a copy of the subprogram itself.
Because inline expansion can increase the speed of your program but can also make it larger, you may need to consider which is more important to you, execution speed or program size.
This section describes only the more significant optimizations, and emphasizes ways that you can write code at a high level and allow the compiler to do the work of making the resulting application as fast and as small as possible.
http://www.ocsystems.com/user_guide/powerada/html/powerada-85.html   (1065 words)

  
 Man Page inline.1
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.
An inline-directive is a command of the form:.inline identifier, argsize This declares a block of code for the routine named by iden- tifier, with argsize as the total size of the routine's arguments, in bytes.
"Techniques for Optimizing Applications: High Performance Computing" by Rajat P. Garg and Ilya Sharapov uses Fortran to provide a useful explanation of inline templates.
http://developers.sun.com/prodtech/cc/documentation/ss8_docs/man1/inline.1.html   (595 words)

  
 CodeGuru Forums - C++ General: What are the differences between inline functions and macros?
Inline functions are specified using the same syntax as any other function except that they include the inline keyword in the function declaration.
Because there is no guarantee that an inline function will actually be inlined, you can bypass the compiler optimization by using the __forceinline keyword.
In C++ a class's member functions can be declared inline either by using the inline keyword or by placing the function definition within the class definition.
http://www.codeguru.com/forum/showthread.php?t=328273   (1271 words)

  
 [No title]
Inline queries consisting of two words are considered as consisting of a first name followed by a surname.
If the query consists of more than two words, then the first one is considered as the first name and the remaining words are all considered as surname constituents.
For instance, use the following (setq eudc-inline-query-format '((name) (firstname) (firstname name))) to indicate that single word expansion queries are to be considered as surnames and if no match is found then they should be tried as first names.
http://www.rpi.edu/dept/acm/arch/rs_aix43/bin/lib/xemacs/xemacs-packages/info/eudc.info   (4207 words)

  
 CSc 520 Principles of Programming Languages :
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).
The most important and popular inter-procedural optimization is inline expansion, that is replacing the call of a procedure with the procedure's body.
An inline function is expanded after semantic analysis.
http://www.cs.arizona.edu/~collberg/Teaching/520/2005/Html/Html-32   (972 words)

  
 TSQLMacro - Macro Expansion for SQL Server T-SQL Development
Inline expansion is somewhat more complex as it involves parameter substitution as well as comment matching.
After expansion, three SELECT statements will be available -- one of the primary TSQLMacro design goals is to affect surrounding code and comment blocks as little as possible.
The expansion text for this might be "SELECT B FROM A".
http://www.datamanipulation.net/tsqlmacro/tsqlmacrodesignspec.asp   (1136 words)

  
 Tru64 UNIX
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.
When only preprocessing a file, all pragmas recognized by Compaq C are written unaltered to the output.
http://h30097.www3.hp.com/dtk/Compaq_C_Compiler/doc/lrm/DOCU0030.HTM   (1771 words)

  
 Bigloo homepage -- Papers & Reports
Inline function expansion is an optimization that may improve program performance by removing calling sequences and enlarging the scope of other optimizations.
In order to get rid of this annoying effect, we present, an easy to implement, inlining optimization that minimizes code size growth by combining a compile-time algorithm deciding when expansion should occur with different expansion frameworks describing how they should be performed.
Unfortunately it also has the drawback of enlarging programs.
http://pauillac.inria.fr/cdrom/www/bigloo/bigloo-17.html   (972 words)

  
 URGENT : __forceinline - GameDev.Net Discussion Forums
Before I divided the classes to source/header files all the functions were considered to be inline expanded (since they were fully listed in each class' header).
The Intel and Microsoft compilers can inline from a source file, if you enable such optimizations.
If you wish to have other source files use the inline, you need to declare & define the function in the header file..
http://www.gamedev.net/community/forums/topic.asp?topic_id=285037   (668 words)

  
 Articles - Compiler
Popular optimizations are inline expansion, dead code elimination, constant propagation, loop transformation, register allocation or even auto parallelization.
http://www.sewing-center.com/articles/Compiler   (2699 words)

  
 [No title]
We add an implementation permission for pragma Inline only, because changing the definition of program unit pragmas would affect many other pragmas.
At best this AI should be pathological with regard to pragma Inline.
True, but you want it to be in a position where it can be obeyed (other impediments notwithstanding) as often as possible.
http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00309.TXT?rev=1.2   (2649 words)

  
 [No title]
-O4 Inline expansion: if one subroutine in a file is called elsewhere in the file, the optimizer may (or may not) expand it inline at the point of call.
The following will be affected by -fsimple: rounding and trapping modes (user must not alter tham), inexact exceptions, production of infinity and NaN, and the sign of zero results.
-O2 Basic optimizations: induction variable elimination; common subexpressions (local and global); algebraic simplification; constant and copy propagation; loop invariant removal; register allocation; basic block merging; tail recursion and tail call elimination; dead code elimination; complex expression expansion.
http://www.math.ucla.edu/help/os/unix/compute_servers/fortran-SC3.0   (3573 words)

  
 CMUCL User's Manual: Advanced Compiler Use and Efficiency Hints
Source level optimization eliminates the need for macros to optimize their expansion, and also increases the effectiveness of inline expansion.
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.
This effectively inline expands the function, but without the code duplication that results from defining the function normally and then declaring it inline.
http://www.math.sunysb.edu/~sorin/online-docs/cmucl/compiler-hint.html   (11993 words)

  
 Chapter 6. Inlining and Interprocedural Analysis
The calling tree written to the listing file includes the nesting depth level of each call in each program unit and the aggregate nesting depth (the sum of the nesting depths for each call site, starting from the main program).
The loop level, depth, and manual options allow you to specify certain instances of the routines to process with the –inline or –ipa options.
–inline_looplevel=2 inlines only routines called at the most deeply-nested level and one loop less deeply-nested.
http://techpubs.sgi.com/library/dynaweb_docs/0620/SGI_Developer/books/MproPF_PG/sgi_html/ch06.html   (1959 words)

  
 C++ Final Optimizations
You could use template metaprogramming to create a class that computed the sine of a number using a series expansion.
In other words, inlining large functions or functions that call other (possibly inlined) functions is not a good idea.
In theory, it should have done the same thing as the factorial example and generated a single move instruction.
http://www.tantalon.com/pete/cppopt/final.htm   (3704 words)

  
 KCGL1 Help CXX /OPTIMIZE
[NO]INLINE Controls the inline expansion of functions for code optimization.
To control inlining, you can specify one of the following keywords: NONE Prevents inline optimization, even if requested by defining a member function of the class body or by using the inline keyword.
Specify an integer from 0 (no optimization) to 4 (full optimization).
http://cctr.umkc.edu/htbin/helpgate/HELP/CXX/_OPTIMIZE   (514 words)

  
 Classes: Inline Functions and Outside Members
One of Stroustrup's main goals in C++ was that programs would not incur a high cost from using data abstraction and encapsulation rather than client code access to data.
What this means is discussed with a simple non-method, and then with a class example.
#include inline int square(int n) { return n*n; } int main() { int a, b; cin >> a; b = square(a); cout << b << "\n"; }
http://homepages.feis.herts.ac.uk/~2com0060/cpp/cpp-node7.html   (1731 words)

  
 [No title]
-Qipo multi-file ip optimizations that includes: - inline function expansion - interprocedural constant propagation - monitoring module-level static variables - dead code elimination - propagation of function characteristics - passing arguments in registers - loop-invariant code motion -Qprof_gen Instruments the program for profiling: to get the execution count of each basic block.
Enables interprocedural optimizations and has the same effect as -Qip.
http://www.spec.org/osg/cpu2000/flags/HP-20030729-Windows-ICL70.txt   (1015 words)

  
 KCGL1 Help ADA Positional_Qualifiers
This option overrides any occurrences of the pragmas INLINE or INLINE_GENERIC in the source code, without your having to edit the source file.
Provides some optimization, but development considerations and ease of debugging take preference over optimization.
By default, the ADA command applies full optimization with time as the primary optimization criterion (like /OPTIMIZE=TIME, but observing uses of the pragma OPTIMIZE).
http://cctr.umkc.edu/HELP/ADA/POSITIONAL_QUALIFIERS   (2632 words)

  
 Interprocedural Optimizations
Enhances multifile optimization; multifile inline function expansion, interprocedural constant and function characteristics propagation, monitoring module-level static variables; dead code elimination
Compile all objects over entire program with multifile interprocedural optimizations.
Optimizes across files and produces a multi-file object file.
http://www.osc.edu/hpc/manuals/ia64/docs/f_ug/grp_ipo.htm   (150 words)

  
 CLHS: Issue ALLOW-LOCAL-INLINE Writeup
In order for local INLINE declarations to be useful, we need part 1
NOTINLINE proclamation might suppress some optimizations that would
* just save the definition for possible local inline
http://www.cs.cmu.edu/afs/cs.cmu.edu/project/ai-repository-2/ai/html/hyperspec/HyperSpec/Issues/iss007-writeup.html   (590 words)

  
 C166: INLINE EXPANSION OF LIBRARY FUNCTIONS
However, you may choose a memory model that uses far function calls and library functions (other than those in intrins.h) that are not expanded inline.
The intrinsic library functions (those in intrins.h) are always expanded inline as documented.
I have noticed that the strcpy function also generates inline code.
http://www.keil.com/support/docs/1141.htm   (148 words)

  
 Criteria for Inline Function Expansion
The inlining heuristics used by the compiler differ, based on whether or not you use profile-guided optimizations (-prof_use).
If you do not use profile-guided optimizations with -ip or -ipo[value], the compiler uses less aggressive inlining heuristics:
Inline a function if the inline expansion will not increase the size of the final program.
http://www.intel.com/software/products/compilers/clin/docs/ug_cpp/lin1105.htm   (197 words)

  
 Index
Interprocedural Optimizations (IPO): Inline Expansion of Library Functions
http://www.physics.ohio-state.edu/doco/intel/compiler70/docs/c_ug/idxlist.htm   (174 words)

  
 HP OpenVMS systems - C
inline int my_max (int x, int y) { if (x >= y) return (x); else return (y); }
#include "t.h" extern inline int my_max (int x, int y);
function, the compiler creates an inline auxiliary definition of the function, which is associated with the function being declared (
http://h71000.www7.hp.com/commercial/c/docs/6180p005.html   (1843 words)

  
 Overview: Interprocedural Optimizations
Inline function expansion is one of the main optimizations performed by the interprocedural optimizer.
For function calls that the compiler believes are frequently executed, the compiler might decide to replace the instructions of the call with code for the function itself.
With -ip, the compiler performs inline function expansion for calls to procedures defined within the current source file.
http://developer.intel.com/software/products/compilers/clin/docs/ug_cpp/lin1146.htm   (221 words)

  
 [No title]
Thus none of these three implementations do the inline expansion in the example above.
Benefits: Users will know how to use INLINE proclamations correctly.
The only alternative would appear to be to require the compiler to always save the definition of every function, and that doesn't seem reasonable.
http://www.cs.cmu.edu/afs/cs.cmu.edu/project/clisp/archive-ftp/compiler/passed/proclaim-inline-where   (289 words)

  
 Issue 010301.2
inline expansion, it could be described as a constant value without
We think there is no useful information that would
This problem cannot be solved by insisting that the abstract instance tree
http://www.eagercon.com/dwarf/issues/010301-2.htm   (1901 words)

  
 /Obn - Control Inline Expansion
This option controls the inline expansion of functions, where n is a digit from zero through two.
Expansion occurs at compiler discretion, often referred to as auto-inlining.
Expands functions marked as inline or __inline and any other function that the compiler chooses.
http://msdn.microsoft.com/library/en-us/wcepbguide5/html/wce50conObnControlInlineExpansion.asp?frame=true   (125 words)

  
 inline vs. __forceinline
For example, the compiler may refuse to inline functions that have loops or functions that are simply too large, even if they are declared inline.
MS Visual C++, as well as several other compilers, now offer non-standard keywords that control the inline expansion of a function, in addition to the standard inline keyword.
__forceinline should be used only when all the following conditions hold true: inline is not respected by the compiler, your code is not to be ported to other platforms, and you are certain that inlining really boosts performance (and of course, you truly need that performance boost).
http://www.devx.com/tips/Tip/13553   (285 words)

  
 CIS 166 C++ Programming
Inline expansion is not always possible or feasible.
Alternatively, you can both declare and define a member function within its class, in which case it is called an inline function.
This process, called an inline expansion of the function body, does not affect the scope of the function name or its arguments.
http://www.monroeccc.edu/ckelly/Courses/CIS166/Chp6Lecture.htm   (1572 words)

  
 DEC C
directive, DEC C expands the function as inline code whenever appropriate as determined by a platform-specific algorithm.
Inline expansion of functions reduces execution time by eliminating function-call overhead and allowing the compiler's general optimization methods to apply across the expanded code.
Function inlining is the inline expansion of function calls; it replaces the function call with the function code itself.
http://www.myths.com/pub/doc/openvms/decc/5492p020.htm   (1719 words)

  
 CLHS: Declaration INLINE, NOTINLINE
While no conforming implementation is required to perform inline expansion of user-defined functions, those implementations that do attempt to recognize the following paradigm:
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 of functions that appear before the body of a flet or labels form that defines that function are bound declarations.
http://clhs.lisp.se/Body/d_inline.htm   (446 words)

  
 making virtual function inline - GameDev.Net Discussion Forums
The compiler generally ignores the inline keyword when it thinks it's smarter than you about optimizations, which is often (it often actually is smarter, but not always).
Posted - 9/12/2004 8:31:56 AM Virtual functions can't be inline because they are always called via a function pointer, and a function pointer must point to a real function.
Each compiler is different, but they tend to ignore it for functions over a certain size, recursive functions, and inline functions that call each other too many times (causing the inline expansion to build up to be over that certain size).
http://www.gamedev.net/community/forums/topic.asp?topic_id=269968   (324 words)

  
 SBCL 0.9.9.38 User Manual
This special knowledge is used in various ways (open coding, inline expansion, source transformation), but the implications to the user are basically the same:
When a function call is open coded, inline code whose effect is equivalent to the function call is substituted for that function call.
Since Common Lisp forbids the redefinition of standard functions, the compiler can have special knowledge of these standard functions embedded in it.
http://sbcl.sourceforge.net/manual/Open-Coding-and-Inline-Expansion.html   (334 words)

  
 Controlling Inline Expansion of User Functions
Preserve the source position of inlined code instead of assigning the call-site source position to inlined code.
-Ob0: disables inline expansion of user-defined functions; however, statement functions are always inlined.
The compiler enables you to control the amount of inline function expansion, with the options shown in the following summary.
http://www.ae.utexas.edu/lrc/fortran/intel/f_ug2/ipo_ilct.htm   (147 words)

  
 [No title]
(The optimizations consist of inline expansion and loop unrolling.) I have not actually tried this product (I just got a demo disc today) and this should in no way be considered an endorsement of the product by either myself or Digital Equipment Corporation.
One of the claims which impressed me was the ability to understand many different syntax variants and convert them to a more standard form.
However, it looks like it would be worth considering for some applications.
http://www-h.eng.cam.ac.uk/help/pkc/languages/fortran_FAQ.html   (15852 words)

  
 Compiling C for Vectorization, Parallelization, and Inline Expansion
They apply the following concepts: converting for loops to while loops, and then into DO loops, variable substitution (to help alleviate dynamic memory problems), and inlining.
Although the machine they use in the paper was a parallel vector machine, it is easy to apply the results to a single processor vector machine.
Compiling C for Vectorization, Parallelization, and Inline Expansion
http://www.cs.berkeley.edu/~samw/projects/cs265/p241-allen.html   (68 words)

  
 [No title]
I can declare the variable in scoreboard.ccp,it work but i don't think it s the better way to do that.
Z000001BigGuy03-06-200002:24 PMbigguy@valveworld.comIf this is the first time you have compiled the client dll, you need to turn off the inline function expansion.
So if you take out that var it doesnt crash?
http://www.telefragged.com/message_boards/hlpp/Forum3/000012.ubb   (670 words)

  
 Inline Expansion Problem - Half-Life Programming Planet Forums
Inline Expansion Problem - Half-Life Programming Planet Forums
I even tried editing the.DSW file and adding the command myself, but it just removes it once I save the game.
Hi, When I try to turn off Inline Expansion in Visual Studio by adding the "/Ob0" line, it just deletes the line I am adding, and dosen't save it..
http://www.telefragged.com/message_boards/hlpp/Forum3/HTML/000016.shtml   (85 words)

  
 Inline Expansion of Subprograms
Inline, which is a program unit pragma (see 10.1.5), is as follows:
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.
This is for uniformity with other program unit pragmas.
http://www.adaic.org/standards/95aarm/html/AA-6-3-2.html   (214 words)

  
 CiteULike: Profile-guided Automatic Inline Expansion for C Programs
An automatic inter-file inliner that uses profile information has been implemented and integrated into an optimizing C compiler.
These issues are: integration into a compiler, program representation, hazard prevention, expansion sequence control, and program modification.
CiteULike: Profile-guided Automatic Inline Expansion for C Programs
http://www.citeulike.org/article/91028   (126 words)

  
 Optimization Choices
In most cases, -O2 is recommended over -O1 because the -O2 option enables inline expansion, which helps programs that have many function calls.
http://www.osc.edu/hpc/manuals/ia64/docs2/c_ug/linux302.htm   (96 words)

  
 Ada95 Reference Manual - 6.3.2 Inline Expansion of Subprograms
The form of a pragma Inline, which is a program unit pragma, See section 10.1.5 Pragmas and Program Units, is as follows:
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.
The pragma shall apply to one or more callable entities or generic subprograms.
http://swt.cs.tu-berlin.de/~barr/ada/html/arm95/arm95_111.html   (170 words)

  
 Inline Expansion Tags
These are text items which will probably vary from response to response.
These control sequences are known as Inline Expansion Tags.
Inline Expansion Tags have the format: {tag}, and can be included anywhere in the message text.
http://www.pscs.co.uk/helpdesk/vpop3help/vpop3/autoresponderinlineexpansiontags.htm   (268 words)

Compwisdom
 About us   |  Why use us?   |  Press   |  Contact us

 Copyright © 2006 CompWisdom.com Usage implies agreement with terms.