Loop unrolling doesn't take into account whether it will decrease or increase performance
Submitted by Eero Tamminen
Assigned to Ian Romanick
Description
Currently loop unrolling is done in frontend. This is done based on heuristics, not on actual data from backend whether and how much unrolling makes sense for given HW: will unrolling run out of registers for SIMD16, how many instructions fit into cache...
Backend should provide this kind of information for unrolling and frontend should utilize it (either before unrolling, to control how much to do it, or after unrolling to revert it).
(Frontend probably should be fixed to push loop invariant code outside of loop before devoting time to improving unrolling itself.)
Version: git