Rate This Document
Findability
Accuracy
Completeness
Readability

-fipa-struct-sfc, -fipa-struct-sfc-bitfield, -fipa-struct-sfc-shadow

Description

  • -fipa-struct-sfc: enables compression optimization for static members in a structure. During compilation, the maximum amount of data stored in structure members is identified, and the data types of members are compressed to reduce the structure size.
  • -fipa-struct-sfc-bitfield: sub-option for optimizing the compression of static members in a structure. After this option is enabled, the target members can be further compressed into bit fields.
Figure 1 Compression of static members in a structure
  • -fipa-struct-sfc-shadow: sub-option for optimizing the compression of static members in a structure. After this option is enabled, static member hiding is activated. That is, duplicate members will be hidden when the system checks whether the values of members of the same type in a structure are the same.

Usage

Add the following content to the option:

-O3 -flto -flto-partition=one -fipa-struct-reorg=2 -fipa-struct-sfc -fipa-struct-sfc-bitfield -fipa-struct-sfc-shadow
  • The -fipa-struct-sfc option can be enabled only when -O3 -flto -flto-partition=one is enabled and the -fipa-struct-reorg level is 2 or higher (or -fipa-reorder-fields is used).
  • The -fipa-struct-sfc-bitfield and -fipa-struct-sfc-shadow options can be enabled only when the -fipa-struct-sfc option is enabled.