RFR: 8326962: C2 SuperWord: cache VPointer [v5]

Emanuel Peter epeter at openjdk.org
Wed Apr 3 07:08:27 UTC 2024


On Wed, 3 Apr 2024 06:41:07 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> It is not lazy, they are allocated and cached in `compute_and_cache`. Like all other `VLoopAnalyzer` submodules. Maybe I missed your point 😅
>
> I've meant that it's not allocated in the constructor as you initialize it with `nullptr`. It's only initialized once you call `compute_and_cache()` which may not happen if we bail out earlier. That's what I've meant with "lazy" but that was probably not clear enough :-)

Aha, I see. I mean all other submodules are handled the same. They also cannot really be used until `VLoopAnalyzer::setup_submodules` returns with success. I guess this here is the first instance where the data structure itself is only allocated after the constructor. But I feel like if anybody has a question about where it is allocated, they can just search the reference. If I start putting down such detailed comments, then I need to put them everywhere. And that will clutter the code.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18577#discussion_r1549022826


More information about the hotspot-compiler-dev mailing list