GCC is missing a way to query cache line size. This could be provided as a compile-time constant, in the form of predefined macros in a form similar to the existing sizeof macros via something like __SIZEOF_L1_CACHE_LINE__. Or, it could be via a __builtin, like __builtin_l1_cache_line_size().
Results would be consistent with existing --param flags, such that
__builtin_l1_cache_line_size() == 64.
I notice that intel provides the following interface, via:
unsigned int __cacheSize(unsigned int cacheLevel)
"__cacheSize(n) returns the size in kilobytes of the cache at level n. 1 represents the first-level cache. 0 is returned for a non-existent cache level. For example, an application may query the cache size and use it to select block sizes in algorithms that operate on matrices."
ding ding ding!!
The cache block/line size could be different on two different machines so it cannot be constant. Also there is no portable way of figuring out the cache size.