RFR: 8257211: C2: Enable call devirtualization during post-parse phase [v3]

Nils Eliasson neliasso at openjdk.java.net
Thu Dec 3 21:20:57 UTC 2020


On Thu, 3 Dec 2020 00:05:38 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> src/hotspot/share/opto/multnode.cpp line 66:
>> 
>>> 64: }
>>> 65: 
>>> 66: ProjNode* MultiNode::proj_out_or_null(uint which_proj, bool is_io_use) const {
>> 
>> This MultiNode::proj_out_or_null and the MultiNode::proj_out_or_null above are very similar but with a few differences. The only use of this method has is_io_use false.
>> 
>> I feel that there might be a risk of mixup in the future. Perhaps a different name can help? I don't have a better solution so I don't require you to fix this.
>
> I considered merging them and introduce `is_io_use` as an optional argument, but was concerned that code which currently effectively doesn't care about the flavor of projection it gets (regular or IO) may fail. 
> (I suspect it may be a lurking bug when it happens, but wanted to play it safe here.)
> 
> Since as you pointed out there's only a single use site, I can just inline the code there. What do you think?

Keep it as it is. When more uses are added in the future - it might become more obvious how to make them distinct from each other.

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

PR: https://git.openjdk.java.net/jdk/pull/1550


More information about the hotspot-compiler-dev mailing list