3DMP
2017. 5. 14. 04:17
what code is it?
#define FORCENOINLINE __attribute__((noinline)) /* Force code to NOT be inline */
In brief, this code not use inline in c++ code and UE4 use it as FORCENOINLINE macro,
FORCENOINLINE construct() , you know what it means?, that's right
| Say I have this small function in a source file static void foo() {}
and I build an optimized version of my binary yet I don't want this function inlined (for optimization purposes). is there a macro I can add in a source code to prevent the inlining? | | asked Sep 24 '09 at 20:39 |
|
| |
| You want the gcc -specific noinline attribute. This function attribute prevents a function from being considered for inlining. If the function does not have side-effects, there are optimizations other than inlining that causes function calls to be optimized away, although the function call is live. To keep such calls from being optimized away, put asm ("");
Use it like this: void __attribute__ ((noinline)) foo()
{
...
}
| | answered Sep 24 '09 at 20:46 |
|
| |