RFR: 8324433: Introduce a way to determine if an expression is evaluated as a constant by the Jit compiler [v7]
Quan Anh Mai
qamai at openjdk.org
Thu Jan 25 14:01:59 UTC 2024
> 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 `MemorySessionImpl::checkValidStateRaw` to eliminate the lifetime check on global sessions without imposing additional branches on other non-global sessions. This is similar to `__builtin_constant_p` in GCC and clang.
>
> Please kindly give your opinion as well as your reviews, thanks very much.
Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
change expr to val, add examples
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17527/files
- new: https://git.openjdk.org/jdk/pull/17527/files/b4445e2e..84f9f7eb
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17527&range=06
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17527&range=05-06
Stats: 51 lines in 1 file changed: 28 ins; 4 del; 19 mod
Patch: https://git.openjdk.org/jdk/pull/17527.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17527/head:pull/17527
PR: https://git.openjdk.org/jdk/pull/17527
More information about the core-libs-dev
mailing list