getMostFrequentByte is needed to optimize emitStoresForConstant in CGDecl.cpp for pattern initialization.
It should not affect compiled code. Different algorithm but isBytewiseValue behavior should be unchanged.
From @pcc prototype for -ftrivial-auto-var-init=pattern optimizations
use std::array