ipa_rescopes_globals

Rescopes the application global variables, that are only used in one function, to local static. The change to static enables other optimizations that improve alias analysis and load/store optimizations.

Syntax
#pragma ipa_rescopes_globals on | off 
  
Remarks

Ensure that the following requirements are met to rescope the application global variables to local static:

For a simple example, compile/assemble your startup code without program IPA. Compile all of the application code with program IPA, #pragma ipa_rescopes_globals on and link the startup objects, your application objects and the library archives (For more details on Program IPA linking procedures, refer "Interprocedural Analysis").

For a complex example where the application sources are put into groups, compiled and then pre-built into several archives or partially linked objects and the build procedure cannot be matched with the simple example, following changes to the build procedure are suggested:

Generating a successful link

Optimization prevents an improper build. If you do not get a successful link or you only get a few such link errors, identify the source file that defines the "undefined" symbol and try one of the following (in decreasing order of general preference):