RFR: 8340093: C2 SuperWord: implement cost model [v4]

Emanuel Peter epeter at openjdk.org
Thu Nov 6 08:06:03 UTC 2025


On Thu, 6 Nov 2025 07:56:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/vectorization.cpp line 604:
>> 
>>> 602: // If needed, we could also use platform specific costs, if the
>>> 603: // default here is not accurate enough.
>>> 604: float VLoopAnalyzer::cost_for_scalar_node(int opcode) const {
>> 
>> You need a `BasicType` parameter for this method, some opcodes are used for multiple kinds of operands.
>
> Will add it :)

Well, I actually tried it right now, and it would take a bit of engineering at the call sites. In quite a few cases the BasicType is not immediately available.

Is it ok if we ignore it for now, and only add it in once we really need it?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27803#discussion_r2497906091


More information about the hotspot-compiler-dev mailing list