--- old/src/share/vm/opto/memnode.cpp 2017-06-28 15:44:49.000000000 -0700 +++ new/src/share/vm/opto/memnode.cpp 2017-06-28 15:44:49.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -203,10 +203,10 @@ assert(mphi->bottom_type() == Type::MEMORY, "memory phi required"); const TypePtr *t = mphi->adr_type(); if (t == TypePtr::BOTTOM || t == TypeRawPtr::BOTTOM || - t->isa_oopptr() && !t->is_oopptr()->is_known_instance() && - t->is_oopptr()->cast_to_exactness(true) - ->is_oopptr()->cast_to_ptr_type(t_oop->ptr()) - ->is_oopptr()->cast_to_instance_id(t_oop->instance_id()) == t_oop) { + (t->isa_oopptr() && !t->is_oopptr()->is_known_instance() && + t->is_oopptr()->cast_to_exactness(true) + ->is_oopptr()->cast_to_ptr_type(t_oop->ptr()) + ->is_oopptr()->cast_to_instance_id(t_oop->instance_id()) == t_oop)) { // clone the Phi with our address type result = mphi->split_out_instance(t_adr, igvn); } else { @@ -319,7 +319,7 @@ if (can_reshape && igvn != NULL && (igvn->_worklist.member(address) || - igvn->_worklist.size() > 0 && (t_adr != adr_type())) ) { + (igvn->_worklist.size() > 0 && t_adr != adr_type())) ) { // The address's base and type may change when the address is processed. // Delay this mem node transformation until the address is processed. phase->is_IterGVN()->_worklist.push(this); @@ -819,6 +819,9 @@ load = new LoadPNode(ctl, mem, adr, adr_type, rt->is_ptr(), mo, control_dependency); } break; + default: + // ShouldNotReachHere(); ??? + break; } assert(load != NULL, "LoadNode should have been created"); if (unaligned) { @@ -1201,7 +1204,7 @@ // of the original value. It is done in split_through_phi(). return NULL; } else if (base->is_Load() || - base->is_DecodeN() && base->in(1)->is_Load()) { + (base->is_DecodeN() && base->in(1)->is_Load())) { // Eliminate the load of boxed value for integer types from the cache // array by deriving the value from the index into the array. // Capture the offset of the load and then reverse the computation. @@ -1225,10 +1228,10 @@ Node* elements[4]; int shift = exact_log2(type2aelembytes(T_OBJECT)); int count = address->unpack_offsets(elements, ARRAY_SIZE(elements)); - if ((count > 0) && elements[0]->is_Con() && - ((count == 1) || - (count == 2) && elements[1]->Opcode() == Op_LShiftX && - elements[1]->in(2) == phase->intcon(shift))) { + if (count > 0 && elements[0]->is_Con() && + (count == 1 || + (count == 2 && elements[1]->Opcode() == Op_LShiftX && + elements[1]->in(2) == phase->intcon(shift)))) { ciObjArray* array = base_type->const_oop()->as_obj_array(); // Fetch the box object cache[0] at the base of the array and get its value ciInstance* box = array->obj_at(0)->as_instance(); @@ -2362,9 +2365,10 @@ { return new StorePNode(ctl, mem, adr, adr_type, val, mo); } + default: + ShouldNotReachHere(); + return (StoreNode*)NULL; } - ShouldNotReachHere(); - return (StoreNode*)NULL; } StoreLNode* StoreLNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo) { @@ -4304,8 +4308,9 @@ if( base_memory()->is_MergeMem() ) { MergeMemNode *new_mbase = base_memory()->as_MergeMem(); Node *m = phase->transform(new_mbase); // Rollup any cycles - if( m != NULL && (m->is_top() || - m->is_MergeMem() && m->as_MergeMem()->base_memory() == empty_mem) ) { + if( m != NULL && + (m->is_top() || + (m->is_MergeMem() && m->as_MergeMem()->base_memory() == empty_mem)) ) { // propagate rollup of dead cycle to self set_req(Compile::AliasIdxBot, empty_mem); }