On Tue, 25 Feb 2025 02:45:46 GMT, Chen Liang <li...@openjdk.org> wrote:

> The existing tableSwitch combinator's LF is unnecessarily complex. This patch 
> also simplifies the tableSwitch combinator.

You're gonna have to explain this. Looking at the code, I think the 
optimization here is that, the LambdaForm will just have a single call site for 
all the cases, whereas the intrinsic does emit a call per case? i.e. the point 
is that these do not necessarily have to do exactly the same thing?

I remember that having a call site per case was important from implementing 
this, since even if the selector is not a constant, we can then still inline 
each individual call site. Whereas with a single shared call site, the method 
handle would become not constant.

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

PR Comment: https://git.openjdk.org/jdk/pull/23763#issuecomment-2697769525

Reply via email to