On Thu, 16 Apr 2026 19:22:07 GMT, Vladimir Ivanov <[email protected]> wrote:
>> It was to give intrinsic another chance to succeed if it fails due to >> non-constant context on first attempt, >> https://github.com/openjdk/jdk/pull/24104#discussion_r2814976511 >> >> Currently, if intrinsification fails then we set the generator for >> CallStaticJavaNode in `Compile::inline_incrementally_one` >> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/compile.cpp#L2108 >> >> `Compile::inline_incrementally_cleanup` called after >> `Compile::inline_incrementally_one` internally calls IGVN optimizations >> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/compile.cpp#L2213 >> >> CallStaticJavaNode idealization then re-injects the the failed intrinsic >> call node to _late_inlines list for another intrinsification attempt. >> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/callnode.cpp#L1175 >> >> If we inline the fallback on first intrinsification failure then we loose >> another opportunity to intrinsify, _vector_late_inlines collects such >> callgenerators and then once we are through with intrinsification attempts >> it inline the failed intrinsic calls towards the end on the lines of >> _string_late_inlines. >> >> https://github.com/openjdk/jdk/pull/24104/changes#diff-f076857d7da81f56709da3de1511b1105727032186cde4d02c678667761f46eaR2252 > > Ok, but you could delay vector operation intrinsification until a full round > of late inlining is over and then dispatch between intrinsic and fallback > implementation. > > Overall, I'm not fully satisfied with current implementation. Please, extract > it in a separate PR and let's discuss it there. Hi @iwanowww This pull request performs partial intrinsification of slice API and if it does not succeed then we attempt inlining vector API based fallback implementation. moving compiler side change into a new PR will also involve factoring out Java side changes related to slice. I agree with you that existing handling in `CallGenerator::do_late_inline_helper` is somewhat messy, I have cleaned up the handling for populating _vector_late_lines in the latest patch. Request your to kindly have re-look and let me know if this looks fine now. Best Regards ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24104#discussion_r3098274362
