src/share/vm/opto/cfgnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6663848 Sdiff src/share/vm/opto

src/share/vm/opto/cfgnode.cpp

Print this page




2000 }
2001 #endif
2002 
2003 //=============================================================================
2004 //------------------------------Identity---------------------------------------
2005 // Check for CreateEx being Identity.
2006 Node *CreateExNode::Identity( PhaseTransform *phase ) {
2007   if( phase->type(in(1)) == Type::TOP ) return in(1);
2008   if( phase->type(in(0)) == Type::TOP ) return in(0);
2009   // We only come from CatchProj, unless the CatchProj goes away.
2010   // If the CatchProj is optimized away, then we just carry the
2011   // exception oop through.
2012   CallNode *call = in(1)->in(0)->as_Call();
2013 
2014   return ( in(0)->is_CatchProj() && in(0)->in(0)->in(1) == in(1) )
2015     ? this
2016     : call->in(TypeFunc::Parms);
2017 }
2018 
2019 //=============================================================================






















2020 #ifndef PRODUCT
2021 void NeverBranchNode::format( PhaseRegAlloc *ra_, outputStream *st) const {
2022   st->print("%s", Name());
2023 }
2024 #endif


2000 }
2001 #endif
2002 
2003 //=============================================================================
2004 //------------------------------Identity---------------------------------------
2005 // Check for CreateEx being Identity.
2006 Node *CreateExNode::Identity( PhaseTransform *phase ) {
2007   if( phase->type(in(1)) == Type::TOP ) return in(1);
2008   if( phase->type(in(0)) == Type::TOP ) return in(0);
2009   // We only come from CatchProj, unless the CatchProj goes away.
2010   // If the CatchProj is optimized away, then we just carry the
2011   // exception oop through.
2012   CallNode *call = in(1)->in(0)->as_Call();
2013 
2014   return ( in(0)->is_CatchProj() && in(0)->in(0)->in(1) == in(1) )
2015     ? this
2016     : call->in(TypeFunc::Parms);
2017 }
2018 
2019 //=============================================================================
2020 //------------------------------Value------------------------------------------
2021 // Check for being unreachable.
2022 const Type *NeverBranchNode::Value( PhaseTransform *phase ) const {
2023   if (!in(0) || in(0)->is_top()) return Type::TOP;
2024   return bottom_type();
2025 }
2026 
2027 //------------------------------Ideal------------------------------------------
2028 // Check for no longer being part of a loop
2029 Node *NeverBranchNode::Ideal(PhaseGVN *phase, bool can_reshape) {
2030   if (can_reshape && !in(0)->is_Loop()) {
2031     // Dead code elimination can sometimes delete this projection so
2032     // if it's not there, there's nothing to do.
2033     Node* fallthru = proj_out(0);
2034     if (fallthru != NULL) {
2035       phase->is_IterGVN()->subsume_node(fallthru, in(0));
2036     }
2037     return phase->C->top();
2038   }
2039   return NULL;
2040 }
2041 
2042 #ifndef PRODUCT
2043 void NeverBranchNode::format( PhaseRegAlloc *ra_, outputStream *st) const {
2044   st->print("%s", Name());
2045 }
2046 #endif
src/share/vm/opto/cfgnode.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File