--- old/src/hotspot/share/c1/c1_Instruction.hpp 2018-12-03 15:48:56.184379669 -0800 +++ new/src/hotspot/share/c1/c1_Instruction.hpp 2018-12-03 15:48:56.040374169 -0800 @@ -649,12 +649,14 @@ private: int _pf_flags; // the flags of the phi function int _index; // to value on operand stack (index < 0) or to local + ciType* _exact_type; // preserve type information for flattened arrays. public: // creation - Phi(ValueType* type, BlockBegin* b, int index) + Phi(ValueType* type, BlockBegin* b, int index, ciType* exact_type) : Instruction(type->base()) , _pf_flags(0) , _index(index) + , _exact_type(exact_type) { _block = b; NOT_PRODUCT(set_printable_bci(Value(b)->printable_bci())); @@ -663,6 +665,14 @@ } } + virtual ciType* exact_type() const { + return _exact_type; + } + + virtual ciType* declared_type() const { + return _exact_type; + } + // flags enum Flag { no_flag = 0,