< prev index next >

src/share/vm/opto/multnode.cpp

Print this page

        

*** 29,38 **** --- 29,39 ---- #include "opto/mathexactnode.hpp" #include "opto/multnode.hpp" #include "opto/opcodes.hpp" #include "opto/phaseX.hpp" #include "opto/regmask.hpp" + #include "opto/shenandoahSupport.hpp" #include "opto/type.hpp" //============================================================================= //------------------------------MultiNode-------------------------------------- const RegMask &MultiNode::out_RegMask() const {
*** 123,132 **** --- 124,134 ---- Node* n = in(0); if (n == NULL) return; // should be assert, but NodeHash makes bogons if (n->is_Mach()) return; // mach. projs. are not type-safe if (n->is_Start()) return; // alas, starts can have mach. projs. also if (_con == SCMemProjNode::SCMEMPROJCON ) return; + if (_con == ShenandoahWBMemProjNode::SWBMEMPROJCON ) return; const Type* t = n->bottom_type(); if (t == Type::TOP) return; // multi is dead assert(_con < t->is_tuple()->cnt(), "ProjNode::_con must be in range"); }
*** 146,206 **** uint ProjNode::ideal_reg() const { return bottom_type()->ideal_reg(); } //-------------------------------is_uncommon_trap_proj---------------------------- ! // Return true if proj is the form of "proj->[region->..]call_uct" ! bool ProjNode::is_uncommon_trap_proj(Deoptimization::DeoptReason reason) { int path_limit = 10; Node* out = this; for (int ct = 0; ct < path_limit; ct++) { out = out->unique_ctrl_out(); if (out == NULL) ! return false; if (out->is_CallStaticJava()) { ! int req = out->as_CallStaticJava()->uncommon_trap_request(); if (req != 0) { Deoptimization::DeoptReason trap_reason = Deoptimization::trap_request_reason(req); if (trap_reason == reason || reason == Deoptimization::Reason_none) { ! return true; } } ! return false; // don't do further after call } if (out->Opcode() != Op_Region) ! return false; } ! return false; } //-------------------------------is_uncommon_trap_if_pattern------------------------- ! // Return true for "if(test)-> proj -> ... ! // | ! // V ! // other_proj->[region->..]call_uct" ! // // "must_reason_predicate" means the uct reason must be Reason_predicate ! bool ProjNode::is_uncommon_trap_if_pattern(Deoptimization::DeoptReason reason) { Node *in0 = in(0); ! if (!in0->is_If()) return false; // Variation of a dead If node. ! if (in0->outcnt() < 2) return false; IfNode* iff = in0->as_If(); // we need "If(Conv2B(Opaque1(...)))" pattern for reason_predicate if (reason != Deoptimization::Reason_none) { if (iff->in(1)->Opcode() != Op_Conv2B || iff->in(1)->in(1)->Opcode() != Op_Opaque1) { ! return false; } } ProjNode* other_proj = iff->proj_out(1-_con); if (other_proj == NULL) // Should never happen, but make Parfait happy. ! return false; ! if (other_proj->is_uncommon_trap_proj(reason)) { assert(reason == Deoptimization::Reason_none || Compile::current()->is_predicate_opaq(iff->in(1)->in(1)), "should be on the list"); ! return true; } ! return false; } --- 148,211 ---- uint ProjNode::ideal_reg() const { return bottom_type()->ideal_reg(); } //-------------------------------is_uncommon_trap_proj---------------------------- ! // Return uncommon trap call node if proj is for "proj->[region->..]call_uct" ! // NULL otherwise ! CallStaticJavaNode* ProjNode::is_uncommon_trap_proj(Deoptimization::DeoptReason reason) { int path_limit = 10; Node* out = this; for (int ct = 0; ct < path_limit; ct++) { out = out->unique_ctrl_out(); if (out == NULL) ! return NULL; if (out->is_CallStaticJava()) { ! CallStaticJavaNode* call = out->as_CallStaticJava(); ! int req = call->uncommon_trap_request(); if (req != 0) { Deoptimization::DeoptReason trap_reason = Deoptimization::trap_request_reason(req); if (trap_reason == reason || reason == Deoptimization::Reason_none) { ! return call; } } ! return NULL; // don't do further after call } if (out->Opcode() != Op_Region) ! return NULL; } ! return NULL; } //-------------------------------is_uncommon_trap_if_pattern------------------------- ! // Return uncommon trap call node for "if(test)-> proj -> ... ! // | ! // V ! // other_proj->[region->..]call_uct" ! // NULL otherwise // "must_reason_predicate" means the uct reason must be Reason_predicate ! CallStaticJavaNode* ProjNode::is_uncommon_trap_if_pattern(Deoptimization::DeoptReason reason) { Node *in0 = in(0); ! if (!in0->is_If()) return NULL; // Variation of a dead If node. ! if (in0->outcnt() < 2) return NULL; IfNode* iff = in0->as_If(); // we need "If(Conv2B(Opaque1(...)))" pattern for reason_predicate if (reason != Deoptimization::Reason_none) { if (iff->in(1)->Opcode() != Op_Conv2B || iff->in(1)->in(1)->Opcode() != Op_Opaque1) { ! return NULL; } } ProjNode* other_proj = iff->proj_out(1-_con); if (other_proj == NULL) // Should never happen, but make Parfait happy. ! return NULL; ! CallStaticJavaNode* call = other_proj->is_uncommon_trap_proj(reason); ! if (call != NULL) { assert(reason == Deoptimization::Reason_none || Compile::current()->is_predicate_opaq(iff->in(1)->in(1)), "should be on the list"); ! return call; } ! return NULL; }
< prev index next >