RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v5]
Quan Anh Mai
qamai at openjdk.org
Thu Jan 25 14:02:01 UTC 2024
On Thu, 25 Jan 2024 05:06:12 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> I agree. All values are produced by evaluating expressions. In this case we want to query whether a value produced by the compiler evaluating its expression is a constant value (inputs to the expression are constants and the expression had no material side-effects). Meaning if the method returns true then we could use that knowledge in subsequent expressions that may also produce constants or some specific behavior.
>
>> the method compilation has the expression in its original form
>
> So the JIT analyses the bytecode used to place the result on the call stack, before the call, and from that determines if the expression were a constant? This kind of self-analysis is not something I was aware of.
I see, changed `expr` to `val`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17527#discussion_r1466418470
More information about the hotspot-compiler-dev
mailing list