Mercurial > hg > truffle
comparison src/share/vm/c1/c1_Optimizer.cpp @ 2446:13bc79b5c9c8
7033154: Improve C1 arraycopy performance
Summary: better static analysis. Take advantage of array copy stubs.
Reviewed-by: never
author | roland |
---|---|
date | Sun, 03 Apr 2011 12:00:54 +0200 |
parents | 403dc4c1d7f5 |
children | d4c1fbc3de95 |
comparison
equal
deleted
inserted
replaced
2445:08eb13460b3a | 2446:13bc79b5c9c8 |
---|---|
642 void NullCheckVisitor::do_NewMultiArray (NewMultiArray* x) { nce()->handle_NewArray(x); } | 642 void NullCheckVisitor::do_NewMultiArray (NewMultiArray* x) { nce()->handle_NewArray(x); } |
643 void NullCheckVisitor::do_CheckCast (CheckCast* x) {} | 643 void NullCheckVisitor::do_CheckCast (CheckCast* x) {} |
644 void NullCheckVisitor::do_InstanceOf (InstanceOf* x) {} | 644 void NullCheckVisitor::do_InstanceOf (InstanceOf* x) {} |
645 void NullCheckVisitor::do_MonitorEnter (MonitorEnter* x) { nce()->handle_AccessMonitor(x); } | 645 void NullCheckVisitor::do_MonitorEnter (MonitorEnter* x) { nce()->handle_AccessMonitor(x); } |
646 void NullCheckVisitor::do_MonitorExit (MonitorExit* x) { nce()->handle_AccessMonitor(x); } | 646 void NullCheckVisitor::do_MonitorExit (MonitorExit* x) { nce()->handle_AccessMonitor(x); } |
647 void NullCheckVisitor::do_Intrinsic (Intrinsic* x) { nce()->clear_last_explicit_null_check(); } | 647 void NullCheckVisitor::do_Intrinsic (Intrinsic* x) { nce()->handle_Intrinsic(x); } |
648 void NullCheckVisitor::do_BlockBegin (BlockBegin* x) {} | 648 void NullCheckVisitor::do_BlockBegin (BlockBegin* x) {} |
649 void NullCheckVisitor::do_Goto (Goto* x) {} | 649 void NullCheckVisitor::do_Goto (Goto* x) {} |
650 void NullCheckVisitor::do_If (If* x) {} | 650 void NullCheckVisitor::do_If (If* x) {} |
651 void NullCheckVisitor::do_IfInstanceOf (IfInstanceOf* x) {} | 651 void NullCheckVisitor::do_IfInstanceOf (IfInstanceOf* x) {} |
652 void NullCheckVisitor::do_TableSwitch (TableSwitch* x) {} | 652 void NullCheckVisitor::do_TableSwitch (TableSwitch* x) {} |
1021 } | 1021 } |
1022 | 1022 |
1023 | 1023 |
1024 void NullCheckEliminator::handle_Intrinsic(Intrinsic* x) { | 1024 void NullCheckEliminator::handle_Intrinsic(Intrinsic* x) { |
1025 if (!x->has_receiver()) { | 1025 if (!x->has_receiver()) { |
1026 if (x->id() == vmIntrinsics::_arraycopy) { | |
1027 for (int i = 0; i < x->number_of_arguments(); i++) { | |
1028 x->set_arg_needs_null_check(i, !set_contains(x->argument_at(i))); | |
1029 } | |
1030 } | |
1031 | |
1026 // Be conservative | 1032 // Be conservative |
1027 clear_last_explicit_null_check(); | 1033 clear_last_explicit_null_check(); |
1028 return; | 1034 return; |
1029 } | 1035 } |
1030 | 1036 |