| Electronic Components Datasheet Search |
|
AN3350 Datasheet(PDF) 113 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3350 Datasheet(HTML) 113 Page - STMicroelectronics |
|
113 / 185 page ![]() AN3350 Intermediate optimizations Doc ID 018512 Rev 2 113/185 #pragma dont_inline off /* Will be inlined, if possible. */ inline int also_attempt_to_inline(void) { return 10; } Some kinds of functions are never inlined: ● Functions with variable argument lists ● Functions defined with __attribute__((never_inline)) ● Functions compiled with #pragma optimize_for_size on or the Optimize For Size setting in the IDE’s Global Optimizations panel ● Functions which have their addresses stored in variables The compiler will not inline these functions, even if they are defined with the inline, __inline__ , or __inline keywords. 13.2.2 Inlining techniques The depth of inlining explains how many levels of function calls the compiler will inline. The Inline Depth setting in the IDE’s C/C++ Language settings panel and the inline_depth pragma control inlining depth. Normally, the compiler only inlines an eligible function if it has already translated the function’s definition. In other words, if an eligible function has not yet been compiled, the compiler has no object code to insert. To overcome this limitation, the compiler can perform interprocedural analysis (IPA) either in file or program mode. This lets the compiler evaluate all the functions in a file or even the entire program before inlining the code. The IPA setting in the IDE’s C/C++ Language settings panel and the ipa pragma control this capability. The compiler normally inlines functions from the first function in a chain of function calls to the last function called. Alternately, the compiler may inline functions from the last function called to the first function in a chain of function calls. The Bottom-up Inlining option in the IDE’s C/C++ Language settings panel and the inline_bottom_up and inline_bottom_up_once pragmas control this reverse method of inlining. Some functions that have not been defined with the inline, __inline__, or __inline keywords may still be good candidates to be inlined. Automatic inlining allows the compiler to inline these functions in addition to the functions that you explicitly specify as eligible for inlining. The Auto-Inline option in the IDE’s C/C++ Language panel and the auto_inline pragma control this capability. When inlining, the compiler calculates the complexity of a function by counting the number of statements, operands, and operations in a function to determine whether or not to inline an eligible function. The compiler does not inline functions that exceed a maximum complexity. The compiler uses three settings to control the extent of inlined functions: ● Maximum auto-inlining complexity: the threshold for which a function may be auto- inlined ● Maximum complexity: the threshold for which any eligible function may be inlined ● Maximum total complexity: the threshold for all inlining in a function The inline_max_auto_size, inline_max_size, and inline_max_total_size pragmas control these thresholds, respectively. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |