On Wed, 30 Jul 2025 12:21:14 GMT, Tobias Hartmann <thartm...@openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update src/java.base/share/classes/jdk/internal/reflect/Reflection.java >> >> Co-authored-by: ExE Boss <3889017+exe-b...@users.noreply.github.com> > > src/hotspot/share/opto/memnode.cpp line 1986: > >> 1984: // (Folds up the 2nd indirection in >> Reflection.getClassAccessFlags(aClassConstant).) >> 1985: assert(Opcode() == Op_LoadUS, "must load an unsigned short from >> _access_flags"); >> 1986: return TypeInt::make(klass->access_flags()); > > I think this optimization should stay because the `_getSuperclass` intrinsic > still emits a load from `Klass::access_flags_offset()` that could potentially > be optimized here, see: > https://github.com/openjdk/jdk/blob/ed70910b0f3e1b19d915ec13ac3434407d01bc5d/src/hotspot/share/opto/library_call.cpp#L4081-L4088 > -> > https://github.com/openjdk/jdk/blob/ed70910b0f3e1b19d915ec13ac3434407d01bc5d/src/hotspot/share/opto/library_call.cpp#L3970-L3973 > > You can still remove the lines referencing `Reflection.getClassAccessFlags`. Thank you, right, the code still references Klass::_access_flags. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26517#discussion_r2243330614