[X86] 32-byte alignment of small loops
| Bugzilla Link | 33307 |
| Version | trunk |
| OS | Windows NT |
| CC | @RKSimon,@rotateright,@ZviRackover |
Extended Description
X86 optimization guide directly states that 32-byte alignment of small loops may benefit from LSD(Loop Stream Detector) if some condition are met.
It seems that X86 LLVM backend does nothing related to this. It would be nice to implement this optimization to speed-up execution of small loops.
https://stackoverflow.com/questions/25958649/code-alignment-in-one-object-file-is-affecting-the-performance-of-a-function-in/26003659#26003659
Code with small loops should be aligned on 16-byte boundaries and code with loops that do not fit in the prefetch should be aligned on 32-byte boundaries.
aligning as 32-byte will make your codes more slower. this will cause nop cost, cache misses, ITLB misses
and rarly, CPUs that has no uop cache will not available to run on loop buffer.