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

Emanuel Peter epeter at openjdk.org
Fri Jun 23 14:12:06 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.

Tests are building...

I already am getting this, from our build system: `Toolchain: clang (clang/LLVM from Xcode 12.4)`, for the `macosx-aarch64-...` builds.


.../src/hotspot/share/opto/vmaskloop.cpp:970:20: error: format string is not a string literal [-Werror,-Wformat-nonliteral]
    tty->vprint_cr(format, ap);


That means we won't get any test coverage on those platforms from this test run.

src/hotspot/share/opto/vmaskloop.cpp line 269:

> 267:     Node_List* worklist = new Node_List(_arena);
> 268:     if (!collect_statements_helper(store, MemNode::ValueIn, stmt, worklist)) {
> 269:       return false;

Why does the `store` need special handling here? Can you not just throw it on the `worklist`? Would be nice to have the code be shorter ;)

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

PR Comment: https://git.openjdk.org/jdk/pull/14581#issuecomment-1604335503
PR Review Comment: https://git.openjdk.org/jdk/pull/14581#discussion_r1239867900


More information about the hotspot-compiler-dev mailing list