On Thu, 25 Jan 2024 05:06:12 GMT, David Holmes 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
On Wed, 24 Jan 2024 19:37:40 GMT, Paul Sandoz wrote:
>> It is still weird to talk about expressions at this level. We really check
>> if the value is constant, like the method name suggests now. Yes, this
>> implicitly tests that the expression that produced that value is fully
>>
On Wed, 24 Jan 2024 18:48:34 GMT, Aleksey Shipilev wrote:
>> @dholmes-ora Indeed it's a compiler magic, albeit not really weird. While
>> the method execution only receives the evaluated value of `expr`, the method
>> compilation has the expression in its original form. As a result, it can
>>
On Wed, 24 Jan 2024 07:15:12 GMT, Quan Anh Mai wrote:
>> This seems really weird to me for Java code. The method doesn't get the
>> original "expression" it only gets the value of that expression after it has
>> been evaluated. Is there some kind of weird "magic" happening here?
>
>
On Wed, 24 Jan 2024 09:03:43 GMT, Aleksey Shipilev wrote:
>> That sounds like a better name for the class, although I think
>> `jdk.internal.misc` is more suitable than `jdk.internal.vm`. Do you have any
>> preference? Thanks.
>
> +1 to `ConstantSupport`. I think `jdk.internal.vm` is a proper
On Tue, 23 Jan 2024 22:49:49 GMT, Quan Anh Mai wrote:
>> src/java.base/share/classes/jdk/internal/misc/JitCompiler.java line 32:
>>
>>> 30: * Just-in-time-compiler-related queries
>>> 31: */
>>> 32: public class JitCompiler {
>>
>> An alternative name and location is
On Tue, 23 Jan 2024 22:41:44 GMT, Quan Anh Mai wrote:
>> src/java.base/share/classes/jdk/internal/misc/JitCompiler.java line 119:
>>
>>> 117: * @see #isCompileConstant(boolean)
>>> 118: */
>>> 119: @IntrinsicCandidate
>>
>> Note how the Java entry for MH intrinsic we have
On Wed, 24 Jan 2024 06:27:20 GMT, David Holmes wrote:
>> I think of this as an expression that is always evaluated to the same value.
>> The value itself is not interesting, it is the set of values that this
>> expression can take that we are talking about.
>
> This seems really weird to me
On Tue, 23 Jan 2024 22:46:20 GMT, Quan Anh Mai wrote:
>> src/java.base/share/classes/jdk/internal/misc/JitCompiler.java line 56:
>>
>>> 54: */
>>> 55: @IntrinsicCandidate
>>> 56: public static boolean isCompileConstant(boolean expr) {
>>
>> Here and in other places: probably not
On Tue, 23 Jan 2024 20:01:45 GMT, Paul Sandoz wrote:
>> Quan Anh Mai has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> ident
>
> src/java.base/share/classes/jdk/internal/misc/JitCompiler.java line 32:
>
>> 30: *
On Tue, 23 Jan 2024 17:42:40 GMT, Aleksey Shipilev wrote:
>> Quan Anh Mai has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> ident
>
> src/java.base/share/classes/jdk/internal/misc/JitCompiler.java line 56:
>
>> 54: */
>> 55:
On Tue, 23 Jan 2024 17:40:52 GMT, Aleksey Shipilev wrote:
>> Quan Anh Mai has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> ident
>
> src/java.base/share/classes/jdk/internal/misc/JitCompiler.java line 119:
>
>> 117: * @see
On Tue, 23 Jan 2024 17:21:47 GMT, Quan Anh Mai wrote:
>> Hi,
>>
>> This patch introduces `JitCompiler::isConstantExpression` which can be used
>> to statically determine whether an expression has been constant-folded by
>> the Jit compiler, leading to more constant-folding opportunities. For
On Tue, 23 Jan 2024 17:21:47 GMT, Quan Anh Mai wrote:
>> Hi,
>>
>> This patch introduces `JitCompiler::isConstantExpression` which can be used
>> to statically determine whether an expression has been constant-folded by
>> the Jit compiler, leading to more constant-folding opportunities. For
> Hi,
>
> This patch introduces `JitCompiler::isConstantExpression` which can be used
> to statically determine whether an expression has been constant-folded by the
> Jit compiler, leading to more constant-folding opportunities. For example, it
> can be used in
15 matches
Mail list logo