Interesting.
I used to work on LLVM, which is more like a ’traditional’ compiler. So the first thing comes to my mind when talking about loop peeling would be vectorizations. However, I don’t think Turbofan would generate machine codes that leverages vector instructions (maybe I’m wrong). And actually, to me, I’m more interested in seeing native vector instructions support since it would enable a bunch of loop optimizations that are not exist in current V8.
In addition to vectorization, LLVM would peel out some PHIs when it knows they would become loop invariant after some iterations.
Hope this information helps
Bests,
Bekket