--- old/src/hotspot/share/ci/ciStreams.hpp 2019-03-11 14:25:29.490355662 +0100 +++ new/src/hotspot/share/ci/ciStreams.hpp 2019-03-11 14:25:29.286355665 +0100 @@ -221,6 +221,7 @@ // or checkcast, get the referenced klass. ciKlass* get_klass(bool& will_link); int get_klass_index() const; + bool is_klass_never_null() const; // If this bytecode is one of the ldc variants, get the referenced // constant. Do not attempt to resolve it, since that would require @@ -287,6 +288,14 @@ } } + bool is_never_null() { + if (at_return_type()) { + return _sig->returns_never_null(); + } else { + return _sig->is_never_null_at(_pos); + } + } + // next klass in the signature ciKlass* next_klass() { ciKlass* sig_k;