We saw -Wnonnull warnings with GCC in JDK-8270083, then we avoided it with disabling compiler warnings. But it is just a workaround. We need to refactor it.
Comments from Kim Barrett:
https://github.com/openjdk/jdk/pull/4719#issuecomment-876904878
The potential difficulty with doing that is the same as for markWord - see JDK-8235362. A different option might be to make the various categories of Register be enum classes without any defined enumerators. That wouldn't support the existing XXXRegisterImpl derivation from AbstractRegisterImpl. I'm not sure that relationship is needed; it may not even be good. The only use I can find is in the various assert_different_registers, and that could be done differently. (The numerous overloads could also probably be simplified using variadic templates.)
Comments from Kim Barrett:
https://github.com/openjdk/jdk/pull/4719#issuecomment-876904878
The potential difficulty with doing that is the same as for markWord - see JDK-8235362. A different option might be to make the various categories of Register be enum classes without any defined enumerators. That wouldn't support the existing XXXRegisterImpl derivation from AbstractRegisterImpl. I'm not sure that relationship is needed; it may not even be good. The only use I can find is in the various assert_different_registers, and that could be done differently. (The numerous overloads could also probably be simplified using variadic templates.)
- relates to
-
JDK-8272315 Improve assert_different_registers
-
- Resolved
-
-
JDK-8269122 The use of "extern const" for Register definitions generates poor code
-
- Resolved
-
-
JDK-8270083 -Wnonnull errors happen with GCC 11.1.1
-
- Resolved
-
-
JDK-8271869 AArch64: build errors with GCC11 in frame::saved_oop_result
-
- Resolved
-