Is there a portable __declspec(selectany) ?

18 views
Skip to first unread message

Ivan Rosales

unread,
Nov 30, 2022, 3:10:37 PM11/30/22
to AV1 Discussion
I'm trying to get rid of duplicate data in av1/common/common_data.h by moving some of the array definitions to av1/common/common_data.c. However, moving over some of the definitions is resulting in worse code generation. See CL:

https://aomedia-review.googlesource.com/c/aom/+/167381

Is there a portable __declspec(selectany) that would allow the compiler to both see the contents of the arrays while avoiding duplicate data? Estimated savings are about 25kb on windows using __declspec(selectany). Any alternative solutions?

Thanks
Reply all
Reply to author
Forward
0 new messages