选项 -fipa-struct-sfc,-fipa-struct-sfc-bitfield,-fipa-struct-sfc-shadow

说明

图1 结构体静态成员压缩示意图

使用方法

在编译选项中加入:

-O3 -flto -flto-partition=one -fipa-struct-reorg=2 -fipa-struct-sfc -fipa-struct-sfc-bitfield -fipa-struct-sfc-shadow

-fipa-struct-sfc 选项需要在开启 -O3 -flto -flto-partition=one 以及 -fipa-struct-reorg 等级大于 2(或使用 -fipa-reorder-fields) 的基础上才能使能。

-fipa-struct-sfc-bitfield, -fipa-struct-sfc-shadow 选项需要在开启 -fipa-struct-sfc 的基础上才能使能。