RFR: 8261137: Optimization of Box nodes in uncommon_trap [v11]

Vladimir Kozlov kvn at openjdk.java.net
Thu Apr 1 17:47:17 UTC 2021


On Thu, 1 Apr 2021 17:41:31 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>>> Okay. Lets do as @iwanowww suggesting.
>> 
>> Should we implement `dump_node` or should we just use `assert(alloc == NULL || alloc->is_Allocate() || alloc->as_CallStaticJava()->is_boxing_method(), "unexpected call node");`  without dumping?
>
> Creating node's dump string in separate method is complicated.
> We can just use `false` in assert:
> #ifdef ASSERT
>   if (alloc != nullptr && !alloc->is_Allocate() && !alloc->as_CallStaticJava()->is_boxing_method()) {
>     alloc->dump();
>     assert(false, "unexpected call node for scalar replacement");
>   }
> #endif

I did not see your latest changes before answering your question. You did exactly as I suggested. Good.

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

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


More information about the hotspot-compiler-dev mailing list