3 ms·
GCC, ICC, etc, will actually do it with profile guided feedback in whole program optimiation mode, when they determine it is valuable. (Actually, GCC removed i
by DannyBee 10y ago
GCC, ICC, etc, will actually do it with profile guided feedback in whole program optimiation mode, when they determine it is valuable.
(Actually, GCC removed it a few years back, whoops)
- zurn 10y agoLast I heard it was a fragile benchmark stunt, and compilers would enable the optimization in only very limited circumstances. Has there been progress since?
- DannyBee 10y agoYes, in the sense that they can do a lot more. It was implemented initially as a fragile stunt. The real problem with it in C based languages is that it requires the real, true, whole program, because it is impossible to not break the ABI of the structure :) In general, memory locality/etc optimizations are more focused on reorganizing loops to walk the data optimally, instead of reorganizing data so normal loops walk them optimally. (See, e.g., polyhedral loop optimizations, which XLC and others ship with. A good paper to read is PLUTO and PLUTO+)
- deleted 10y ago[deleted]
- zurn 10y agoI'm guessing the GCC feature and removal is this here? https://gcc.gnu.org/gcc-4.8/changes.html https://gcc.gnu.org/gcc-4.8/changes.html "The struct reorg and matrix reorg optimizations (command-line options -fipa-struct-reorg and -fipa-matrix-reorg) have been removed. They did not always work correctly, nor did they work with link-time optimization (LTO), hence were only applicable to programs consisting of a single translation unit. " Though my web searches don't return hits about SoA in connection to GCC reorg optimizations, and a paper[1] about the struct reorg optimization doesn't mention it either... [1] https://www.research.ibm.com/haifa/dept/svt/papers/golovanevsky.pdf https://www.research.ibm.com/haifa/dept/svt/papers/golovanev...