RFR: JDK-8308994: C2: Re-implement experimental post loop vectorization

Emanuel Peter epeter at openjdk.org
Fri Jun 23 11:15:10 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/superword.cpp line 4297:

> 4295: 
> 4296: bool SWPointer::Tracer::slp_trace_alignment() {
> 4297:   return _slp && _slp->is_trace_alignment();

Aha, here you wrap it. You have some uses above that could be replaced with this now. But again, even better would be if we had a general trace flag that could trace it for any context, not just SuperWord.

src/hotspot/share/opto/superword.hpp line 251:

> 249:   int count_size(int size) {
> 250:     return _stats[exact_log2(size)];
> 251:   }

Add assert from `record_size`?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14581#discussion_r1239685755
PR Review Comment: https://git.openjdk.org/jdk/pull/14581#discussion_r1239691320


More information about the hotspot-dev mailing list