Status of LoopPeeling

32 views
Skip to first unread message

Bekket McClane

unread,
Sep 8, 2018, 10:50:38 PM9/8/18
to v8-dev
Hi,

I'm currently studying some graph reduction passes.
It seems that LoopPeeling is only used when certain flag is turn on. I'm curious about the status and usage of this pass

Also, though the algorithm does the eligibility check, it doesn't do any suitability check - it just peels the first iteration anyway. To me, this doesn't make much sense, since force peeling the first iteration not always give you performance improvement. Is there any specific reasons for doing this?

Thank you.

Bekket

ja...@google.com

unread,
Sep 10, 2018, 9:28:02 AM9/10/18
to v8-dev


On Sunday, September 9, 2018 at 4:50:38 AM UTC+2, Bekket McClane wrote:
Hi,

I'm currently studying some graph reduction passes.
It seems that LoopPeeling is only used when certain flag is turn on. I'm curious about the status and usage of this pass

The pass is on by default.
 

Also, though the algorithm does the eligibility check, it doesn't do any suitability check - it just peels the first iteration anyway. To me, this doesn't make much sense, since force peeling the first iteration not always give you performance improvement. Is there any specific reasons for doing this?

Right, we just have not done the work of figuring out a suitable heuristic to enable loop peeling. We had some rough ideas, but we have never tried them. Do you know of any good heuristics for loop peeling (or literature where it is discussed)?

Cheers, Jaro
 

Thank you.

Bekket

Bekket McClane

unread,
Sep 10, 2018, 2:20:23 PM9/10/18
to v8-...@googlegroups.com
Hi Jaro,

Thanks for your reply.
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

Cheers, Jaro
 

Thank you.

Bekket

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to a topic in the Google Groups "v8-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-dev/UOrrj3d94Ww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-dev+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages