src/share/vm/c1/c1_Optimizer.cpp

changeset 5914
d13d7aba8c12
parent 4947
acadb114c818
child 5921
ce0cc25bc5e2
     1.1 --- a/src/share/vm/c1/c1_Optimizer.cpp	Wed Oct 09 11:05:17 2013 -0700
     1.2 +++ b/src/share/vm/c1/c1_Optimizer.cpp	Wed Oct 09 16:32:21 2013 +0200
     1.3 @@ -657,6 +657,7 @@
     1.4    void handle_Intrinsic       (Intrinsic* x);
     1.5    void handle_ExceptionObject (ExceptionObject* x);
     1.6    void handle_Phi             (Phi* x);
     1.7 +  void handle_ProfileCall     (ProfileCall* x);
     1.8  };
     1.9  
    1.10  
    1.11 @@ -715,7 +716,8 @@
    1.12  void NullCheckVisitor::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {}
    1.13  void NullCheckVisitor::do_UnsafePrefetchRead (UnsafePrefetchRead*  x) {}
    1.14  void NullCheckVisitor::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
    1.15 -void NullCheckVisitor::do_ProfileCall    (ProfileCall*     x) { nce()->clear_last_explicit_null_check(); }
    1.16 +void NullCheckVisitor::do_ProfileCall    (ProfileCall*     x) { nce()->clear_last_explicit_null_check();
    1.17 +                                                                nce()->handle_ProfileCall(x); }
    1.18  void NullCheckVisitor::do_ProfileInvoke  (ProfileInvoke*   x) {}
    1.19  void NullCheckVisitor::do_RuntimeCall    (RuntimeCall*     x) {}
    1.20  void NullCheckVisitor::do_MemBar         (MemBar*          x) {}
    1.21 @@ -1134,6 +1136,11 @@
    1.22    }
    1.23  }
    1.24  
    1.25 +void NullCheckEliminator::handle_ProfileCall(ProfileCall* x) {
    1.26 +  for (int i = 0; i < x->nb_profiled_args(); i++) {
    1.27 +    x->set_arg_needs_null_check(i, !set_contains(x->profiled_arg_at(i)));
    1.28 +  }
    1.29 +}
    1.30  
    1.31  void Optimizer::eliminate_null_checks() {
    1.32    ResourceMark rm;

mercurial