What is the motivation for pre/main/post loops?

Cao, Joshua joshcao at amazon.com
Wed Feb 7 18:53:09 UTC 2024


I can't find any notes on this. The closest I can find is https://wiki.openjdk.org/pages/viewpage.action?pageId=20415918


> clone loop body and create pre-, main- and post- loops


I can guess why a post loop is useful. We can use it for the remainder iterations after loop unrolling.

However, I cannot think of scenarios where a pre-loop is useful. What are some cases where a

pre-loop is useful?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-compiler-dev/attachments/20240207/24bc6fea/attachment.htm>


More information about the hotspot-compiler-dev mailing list