src/share/vm/c1/c1_Canonicalizer.cpp

Print this page
rev 4136 : 7153771: array bound check elimination for c1
Summary: when possible optimize out array bound checks, inserting predicates when needed.
Reviewed-by:


 920     x->set_index(index);
 921     x->set_log2_scale(log2_scale);
 922     if (PrintUnsafeOptimization) {
 923       tty->print_cr("Canonicalizer: UnsafeRawOp id %d: base = id %d, index = id %d, log2_scale = %d",
 924                     x->id(), x->base()->id(), x->index()->id(), x->log2_scale());
 925     }
 926   }
 927 }
 928 
 929 void Canonicalizer::do_RoundFP(RoundFP* x) {}
 930 void Canonicalizer::do_UnsafeGetRaw(UnsafeGetRaw* x) { if (OptimizeUnsafes) do_UnsafeRawOp(x); }
 931 void Canonicalizer::do_UnsafePutRaw(UnsafePutRaw* x) { if (OptimizeUnsafes) do_UnsafeRawOp(x); }
 932 void Canonicalizer::do_UnsafeGetObject(UnsafeGetObject* x) {}
 933 void Canonicalizer::do_UnsafePutObject(UnsafePutObject* x) {}
 934 void Canonicalizer::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {}
 935 void Canonicalizer::do_UnsafePrefetchRead (UnsafePrefetchRead*  x) {}
 936 void Canonicalizer::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
 937 void Canonicalizer::do_ProfileCall(ProfileCall* x) {}
 938 void Canonicalizer::do_ProfileInvoke(ProfileInvoke* x) {}
 939 void Canonicalizer::do_RuntimeCall(RuntimeCall* x) {}


 940 void Canonicalizer::do_MemBar(MemBar* x) {}


 920     x->set_index(index);
 921     x->set_log2_scale(log2_scale);
 922     if (PrintUnsafeOptimization) {
 923       tty->print_cr("Canonicalizer: UnsafeRawOp id %d: base = id %d, index = id %d, log2_scale = %d",
 924                     x->id(), x->base()->id(), x->index()->id(), x->log2_scale());
 925     }
 926   }
 927 }
 928 
 929 void Canonicalizer::do_RoundFP(RoundFP* x) {}
 930 void Canonicalizer::do_UnsafeGetRaw(UnsafeGetRaw* x) { if (OptimizeUnsafes) do_UnsafeRawOp(x); }
 931 void Canonicalizer::do_UnsafePutRaw(UnsafePutRaw* x) { if (OptimizeUnsafes) do_UnsafeRawOp(x); }
 932 void Canonicalizer::do_UnsafeGetObject(UnsafeGetObject* x) {}
 933 void Canonicalizer::do_UnsafePutObject(UnsafePutObject* x) {}
 934 void Canonicalizer::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {}
 935 void Canonicalizer::do_UnsafePrefetchRead (UnsafePrefetchRead*  x) {}
 936 void Canonicalizer::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
 937 void Canonicalizer::do_ProfileCall(ProfileCall* x) {}
 938 void Canonicalizer::do_ProfileInvoke(ProfileInvoke* x) {}
 939 void Canonicalizer::do_RuntimeCall(RuntimeCall* x) {}
 940 void Canonicalizer::do_RangeCheckPredicate(RangeCheckPredicate* x) {}
 941 void Canonicalizer::do_Assert(Assert* x) {}
 942 void Canonicalizer::do_MemBar(MemBar* x) {}