OPTIMIZATIONS
Function
-OiLib[=<arguments>]
<arguments> are one or multiple of following suboptions:
b: inline calls to the strlen() function
d: inline calls to the fabs() or fabsf() functions
e: inline calls to the memset() function
f: inline calls to the memcpy() function
g: replace shifts left of 1 by array lookup
None
None
None
This option enables the compiler to optimize specific known library functions to reduce execution time. The Compiler frequently uses small functions such as strcpy(), strcmp(), and so forth. The following functions are optimized:
An example for this is:
(void)memset(&buf, 0, 50);
In this case, the call to memset() is replaced with a call to _memset_clear_8bitCount present in the ANSI library (string.c).
An example for this is:
(void)memcpy(&buf, &buf2, 30);
In this case the call to memcpy() is replaced with a call to _memcpy_8bitCount present in the ANSI library (string.c).
Compiling the f() function with the -Oilib=a compiler option (only available for ICG-based backends):
void f(void) {
char *s = strcpy(s, ct);
}
This translates in a similar fashion to the following function:
void g(void) {
s2 = s;
while(*s2++ = *ct++);
}