| Electronic Components Datasheet Search |
|
AN3350 Datasheet(PDF) 112 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3350 Datasheet(HTML) 112 Page - STMicroelectronics |
|
112 / 185 page ![]() Intermediate optimizations AN3350 112/185 Doc ID 018512 Rev 2 The rest of this section explains how to specify which functions to inline and how the compiler performs the inlining: ● Choosing which functions to inline ● Inlining techniques 13.2.1 Choosing which functions to inline The compiler offers several methods to specify which functions are eligible for inlining. To specify that a function is eligible to be inlined, precede its definition with the inline, __inline__ , or __inline keyword. To allow these keywords in C source code turn off the only_std_keywords pragma in your source code. To verify that an eligible function has been inlined or not, use the Non-Inlined Functions option in the IDE’s C/C++ Warnings panel or the warn_notinlined pragma. Example 67 shows an example. Example 67 Specifying to the compiler that a function may be inlined #pragma only_std_keywords off inline int attempt_to_inline(void) { return 10; } To specify that a function must never be inlined, follow its definition’s specifier with __attribute__((never_inline)) .Example 68 shows an example. Example 68 Specifying to the compiler that a function must never be inlined int never_inline(void) __attribute__((never_inline)) { return 20; } To specify that no functions in a file may be inlined, including those that are defined with the inline , __inline__, or __inline keywords, use the dont_inline pragma.Example 69 shows an example. Example 69 Specifying that no functions may be inlined #pragma dont_inline on /* Will not be inlined. */ inline int attempt_to_inline(void) { return 10; } /* Will not be inlined. */ int never_inline(void) __attribute__((never_inline)) { return 20; } |
|
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 |