src/share/vm/opto/ifnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-comp Sdiff src/share/vm/opto

src/share/vm/opto/ifnode.cpp

Print this page




 486           iftrap = u;
 487           u = c;
 488         }
 489       }
 490       if (u->in(0) == iftrap && u->is_CallStaticJava()) {
 491         int req = u->as_CallStaticJava()->uncommon_trap_request();
 492         if (Deoptimization::trap_request_reason(req) ==
 493             Deoptimization::Reason_range_check) {
 494           found_trap = true;
 495         }
 496       }
 497     }
 498   }
 499   if (!found_trap)  return 0;   // sorry, no cigar
 500 
 501   // Look for index+offset form
 502   Node* ind = l;
 503   jint  off = 0;
 504   if (l->is_top()) {
 505     return 0;
 506   } else if (l->is_Add()) {
 507     if ((off = l->in(1)->find_int_con(0)) != 0) {
 508       ind = l->in(2);
 509     } else if ((off = l->in(2)->find_int_con(0)) != 0) {
 510       ind = l->in(1);
 511     }
 512   } else if ((off = l->find_int_con(-1)) >= 0) {
 513     // constant offset with no variable index
 514     ind = NULL;
 515   } else {
 516     // variable index with no constant offset (or dead negative index)
 517     off = 0;
 518   }
 519 
 520   // Return all the values:
 521   index  = ind;
 522   offset = off;
 523   range  = r;
 524   return flip_test;
 525 }
 526 




 486           iftrap = u;
 487           u = c;
 488         }
 489       }
 490       if (u->in(0) == iftrap && u->is_CallStaticJava()) {
 491         int req = u->as_CallStaticJava()->uncommon_trap_request();
 492         if (Deoptimization::trap_request_reason(req) ==
 493             Deoptimization::Reason_range_check) {
 494           found_trap = true;
 495         }
 496       }
 497     }
 498   }
 499   if (!found_trap)  return 0;   // sorry, no cigar
 500 
 501   // Look for index+offset form
 502   Node* ind = l;
 503   jint  off = 0;
 504   if (l->is_top()) {
 505     return 0;
 506   } else if (l->Opcode() == Op_AddI) {
 507     if ((off = l->in(1)->find_int_con(0)) != 0) {
 508       ind = l->in(2);
 509     } else if ((off = l->in(2)->find_int_con(0)) != 0) {
 510       ind = l->in(1);
 511     }
 512   } else if ((off = l->find_int_con(-1)) >= 0) {
 513     // constant offset with no variable index
 514     ind = NULL;
 515   } else {
 516     // variable index with no constant offset (or dead negative index)
 517     off = 0;
 518   }
 519 
 520   // Return all the values:
 521   index  = ind;
 522   offset = off;
 523   range  = r;
 524   return flip_test;
 525 }
 526 


src/share/vm/opto/ifnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File