src/share/vm/c1/c1_Optimizer.cpp

changeset 5921
ce0cc25bc5e2
parent 5914
d13d7aba8c12
child 6198
55fb97c4c58d
     1.1 --- a/src/share/vm/c1/c1_Optimizer.cpp	Fri Oct 11 19:51:31 2013 -0700
     1.2 +++ b/src/share/vm/c1/c1_Optimizer.cpp	Sat Oct 12 12:12:59 2013 +0200
     1.3 @@ -531,6 +531,7 @@
     1.4    void do_UnsafePrefetchRead (UnsafePrefetchRead*  x);
     1.5    void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
     1.6    void do_ProfileCall    (ProfileCall*     x);
     1.7 +  void do_ProfileReturnType (ProfileReturnType*  x);
     1.8    void do_ProfileInvoke  (ProfileInvoke*   x);
     1.9    void do_RuntimeCall    (RuntimeCall*     x);
    1.10    void do_MemBar         (MemBar*          x);
    1.11 @@ -658,6 +659,7 @@
    1.12    void handle_ExceptionObject (ExceptionObject* x);
    1.13    void handle_Phi             (Phi* x);
    1.14    void handle_ProfileCall     (ProfileCall* x);
    1.15 +  void handle_ProfileReturnType (ProfileReturnType* x);
    1.16  };
    1.17  
    1.18  
    1.19 @@ -718,6 +720,7 @@
    1.20  void NullCheckVisitor::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
    1.21  void NullCheckVisitor::do_ProfileCall    (ProfileCall*     x) { nce()->clear_last_explicit_null_check();
    1.22                                                                  nce()->handle_ProfileCall(x); }
    1.23 +void NullCheckVisitor::do_ProfileReturnType (ProfileReturnType* x) { nce()->handle_ProfileReturnType(x); }
    1.24  void NullCheckVisitor::do_ProfileInvoke  (ProfileInvoke*   x) {}
    1.25  void NullCheckVisitor::do_RuntimeCall    (RuntimeCall*     x) {}
    1.26  void NullCheckVisitor::do_MemBar         (MemBar*          x) {}
    1.27 @@ -1142,6 +1145,10 @@
    1.28    }
    1.29  }
    1.30  
    1.31 +void NullCheckEliminator::handle_ProfileReturnType(ProfileReturnType* x) {
    1.32 +  x->set_needs_null_check(!set_contains(x->ret()));
    1.33 +}
    1.34 +
    1.35  void Optimizer::eliminate_null_checks() {
    1.36    ResourceMark rm;
    1.37  

mercurial