Microsoft Corporation
REDUCED INSTRUCTIONS TO GENERATE GLOBAL VARIABLE ADDRESSES

Last updated:

Abstract:

In order to reduce the number of instructions that the compiler generates to load the address of a global variable into a register, the compiler uses a technique that analyzes the global variables used in each function in order to estimate which global variables will be located within the same memory page and have a common base address. A base global variable is selected for each function whose address is fully resolved. The address of each subsequent global variable is constructed using an offset relative to the address of the base global variable that is based on the subsequent global variable's position in a global variable order list.

Status:
Application
Type:

Utility

Filling date:

22 Apr 2022

Issue date:

4 Aug 2022