Mercurial > hg > truffle
comparison src/share/vm/c1/c1_Optimizer.cpp @ 12882:ce0cc25bc5e2
8026054: New type profiling points: type of return values at calls
Summary: x86 interpreter and c1 type profiling for return values at calls
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Sat, 12 Oct 2013 12:12:59 +0200 |
parents | d13d7aba8c12 |
children | de6a9e811145 |
comparison
equal
deleted
inserted
replaced
12881:ed2c74787eb5 | 12882:ce0cc25bc5e2 |
---|---|
529 void do_UnsafePutObject(UnsafePutObject* x); | 529 void do_UnsafePutObject(UnsafePutObject* x); |
530 void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x); | 530 void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x); |
531 void do_UnsafePrefetchRead (UnsafePrefetchRead* x); | 531 void do_UnsafePrefetchRead (UnsafePrefetchRead* x); |
532 void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x); | 532 void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x); |
533 void do_ProfileCall (ProfileCall* x); | 533 void do_ProfileCall (ProfileCall* x); |
534 void do_ProfileReturnType (ProfileReturnType* x); | |
534 void do_ProfileInvoke (ProfileInvoke* x); | 535 void do_ProfileInvoke (ProfileInvoke* x); |
535 void do_RuntimeCall (RuntimeCall* x); | 536 void do_RuntimeCall (RuntimeCall* x); |
536 void do_MemBar (MemBar* x); | 537 void do_MemBar (MemBar* x); |
537 void do_RangeCheckPredicate(RangeCheckPredicate* x); | 538 void do_RangeCheckPredicate(RangeCheckPredicate* x); |
538 #ifdef ASSERT | 539 #ifdef ASSERT |
656 void handle_AccessMonitor (AccessMonitor* x); | 657 void handle_AccessMonitor (AccessMonitor* x); |
657 void handle_Intrinsic (Intrinsic* x); | 658 void handle_Intrinsic (Intrinsic* x); |
658 void handle_ExceptionObject (ExceptionObject* x); | 659 void handle_ExceptionObject (ExceptionObject* x); |
659 void handle_Phi (Phi* x); | 660 void handle_Phi (Phi* x); |
660 void handle_ProfileCall (ProfileCall* x); | 661 void handle_ProfileCall (ProfileCall* x); |
662 void handle_ProfileReturnType (ProfileReturnType* x); | |
661 }; | 663 }; |
662 | 664 |
663 | 665 |
664 // NEEDS_CLEANUP | 666 // NEEDS_CLEANUP |
665 // There may be other instructions which need to clear the last | 667 // There may be other instructions which need to clear the last |
716 void NullCheckVisitor::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {} | 718 void NullCheckVisitor::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {} |
717 void NullCheckVisitor::do_UnsafePrefetchRead (UnsafePrefetchRead* x) {} | 719 void NullCheckVisitor::do_UnsafePrefetchRead (UnsafePrefetchRead* x) {} |
718 void NullCheckVisitor::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {} | 720 void NullCheckVisitor::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {} |
719 void NullCheckVisitor::do_ProfileCall (ProfileCall* x) { nce()->clear_last_explicit_null_check(); | 721 void NullCheckVisitor::do_ProfileCall (ProfileCall* x) { nce()->clear_last_explicit_null_check(); |
720 nce()->handle_ProfileCall(x); } | 722 nce()->handle_ProfileCall(x); } |
723 void NullCheckVisitor::do_ProfileReturnType (ProfileReturnType* x) { nce()->handle_ProfileReturnType(x); } | |
721 void NullCheckVisitor::do_ProfileInvoke (ProfileInvoke* x) {} | 724 void NullCheckVisitor::do_ProfileInvoke (ProfileInvoke* x) {} |
722 void NullCheckVisitor::do_RuntimeCall (RuntimeCall* x) {} | 725 void NullCheckVisitor::do_RuntimeCall (RuntimeCall* x) {} |
723 void NullCheckVisitor::do_MemBar (MemBar* x) {} | 726 void NullCheckVisitor::do_MemBar (MemBar* x) {} |
724 void NullCheckVisitor::do_RangeCheckPredicate(RangeCheckPredicate* x) {} | 727 void NullCheckVisitor::do_RangeCheckPredicate(RangeCheckPredicate* x) {} |
725 #ifdef ASSERT | 728 #ifdef ASSERT |
1140 for (int i = 0; i < x->nb_profiled_args(); i++) { | 1143 for (int i = 0; i < x->nb_profiled_args(); i++) { |
1141 x->set_arg_needs_null_check(i, !set_contains(x->profiled_arg_at(i))); | 1144 x->set_arg_needs_null_check(i, !set_contains(x->profiled_arg_at(i))); |
1142 } | 1145 } |
1143 } | 1146 } |
1144 | 1147 |
1148 void NullCheckEliminator::handle_ProfileReturnType(ProfileReturnType* x) { | |
1149 x->set_needs_null_check(!set_contains(x->ret())); | |
1150 } | |
1151 | |
1145 void Optimizer::eliminate_null_checks() { | 1152 void Optimizer::eliminate_null_checks() { |
1146 ResourceMark rm; | 1153 ResourceMark rm; |
1147 | 1154 |
1148 NullCheckEliminator nce(this); | 1155 NullCheckEliminator nce(this); |
1149 | 1156 |