comparison src/share/vm/opto/cfgnode.cpp @ 127:e0bd2e08e3d0

6663848: assert(i < Max(),"oob") in C2 with -Xcomp Summary: NeverBranchNodes aren't handled properly Reviewed-by: kvn, sgoldman, rasbold, jrose
author never
date Thu, 24 Apr 2008 11:13:03 -0700
parents 72f4a668df19
children 885ed790ecf0
comparison
equal deleted inserted replaced
126:72f4a668df19 127:e0bd2e08e3d0
2017 ? this 2017 ? this
2018 : call->in(TypeFunc::Parms); 2018 : call->in(TypeFunc::Parms);
2019 } 2019 }
2020 2020
2021 //============================================================================= 2021 //=============================================================================
2022 //------------------------------Value------------------------------------------
2023 // Check for being unreachable.
2024 const Type *NeverBranchNode::Value( PhaseTransform *phase ) const {
2025 if (!in(0) || in(0)->is_top()) return Type::TOP;
2026 return bottom_type();
2027 }
2028
2029 //------------------------------Ideal------------------------------------------
2030 // Check for no longer being part of a loop
2031 Node *NeverBranchNode::Ideal(PhaseGVN *phase, bool can_reshape) {
2032 if (can_reshape && !in(0)->is_Loop()) {
2033 // Dead code elimination can sometimes delete this projection so
2034 // if it's not there, there's nothing to do.
2035 Node* fallthru = proj_out(0);
2036 if (fallthru != NULL) {
2037 phase->is_IterGVN()->subsume_node(fallthru, in(0));
2038 }
2039 return phase->C->top();
2040 }
2041 return NULL;
2042 }
2043
2022 #ifndef PRODUCT 2044 #ifndef PRODUCT
2023 void NeverBranchNode::format( PhaseRegAlloc *ra_, outputStream *st) const { 2045 void NeverBranchNode::format( PhaseRegAlloc *ra_, outputStream *st) const {
2024 st->print("%s", Name()); 2046 st->print("%s", Name());
2025 } 2047 }
2026 #endif 2048 #endif