RFR: 8326962: C2 SuperWord: cache VPointer [v5]
Christian Hagedorn
chagedorn at openjdk.org
Wed Apr 3 07:08:27 UTC 2024
On Wed, 3 Apr 2024 07:02:14 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> 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.
That's true. Here I think I've only commented it since it's allocated specially for the first time in the sub modules. But it does not really add much information per se. It's fine to leave it like that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18577#discussion_r1549039187
More information about the hotspot-compiler-dev
mailing list