On Tue, 4 Mar 2025 14:33:27 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

>> In that case, won't the root form be customized and the table switch names 
>> be inlined into the root form?
>
> The root would e.g. have a constant BMH pointing at a _shared_ tableSwitch 
> LF. So, the BMH fields would be seen as constant as well, including the list 
> of cases. The issue is that the bytecode of the tableSwitch BMH will not be 
> using the intrinsic, since it's not customized itself, i.e. it will only have 
> a single call site for all cases.

I think we could get around this by always wrapping the `tableSwitch` MH in an 
`exactInvoker`, which adds the customization check for its callee. It would 
mean we will also separately customize any tableSwitch MH that's part of a 
larger chain.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23763#discussion_r1979591207

Reply via email to