RFR: JDK-8308994: C2: Re-implement experimental post loop vectorization
Emanuel Peter
epeter at openjdk.org
Fri Jun 23 12:28:08 UTC 2023
On Wed, 21 Jun 2023 08:24:19 GMT, Pengfei Li <pli at openjdk.org> wrote:
> ## TL;DR
>
> This patch completely re-implements C2's experimental post loop vectorization for better stability, maintainability and performance. Compared with the original implementation, this new implementation adds a standalone loop phase in C2's ideal loop phases and can vectorize more post loops. The original implementation and all code related to multi-versioned post loops are deleted in this patch. More details about this patch can be found in the document replied in this pull request.
src/hotspot/share/opto/vmaskloop.cpp line 63:
> 61: if (cl->is_vector_masked()) return;
> 62: // Skip non-post loop
> 63: if (!cl->is_post_loop()) return;
Check before enterin, and assert here.
src/hotspot/share/opto/vmaskloop.cpp line 71:
> 69: if (cl->loopexit()->in(0) != cl) return;
> 70: // Skip if some loop operations are pinned to the backedge
> 71: if (cl->back_control()->outcnt() != 1) return;
It would be interesting to have some trace flag that tells us why we bailed out here and did not do the post-loop vectorization.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14581#discussion_r1239751423
PR Review Comment: https://git.openjdk.org/jdk/pull/14581#discussion_r1239753834
More information about the hotspot-dev
mailing list