equal
deleted
inserted
replaced
42 #include "opto/parse.hpp" |
42 #include "opto/parse.hpp" |
43 #include "opto/runtime.hpp" |
43 #include "opto/runtime.hpp" |
44 #include "runtime/deoptimization.hpp" |
44 #include "runtime/deoptimization.hpp" |
45 #include "runtime/sharedRuntime.hpp" |
45 #include "runtime/sharedRuntime.hpp" |
46 |
46 |
|
47 #ifndef PRODUCT |
47 extern int explicit_null_checks_inserted, |
48 extern int explicit_null_checks_inserted, |
48 explicit_null_checks_elided; |
49 explicit_null_checks_elided; |
|
50 #endif |
49 |
51 |
50 //---------------------------------array_load---------------------------------- |
52 //---------------------------------array_load---------------------------------- |
51 void Parse::array_load(BasicType elem_type) { |
53 void Parse::array_load(BasicType elem_type) { |
52 const Type* elem = Type::TOP; |
54 const Type* elem = Type::TOP; |
53 Node* adr = array_addressing(elem_type, 0, &elem); |
55 Node* adr = array_addressing(elem_type, 0, &elem); |
995 next_block->next_path_num(); |
997 next_block->next_path_num(); |
996 } |
998 } |
997 return; |
999 return; |
998 } |
1000 } |
999 |
1001 |
1000 explicit_null_checks_inserted++; |
1002 NOT_PRODUCT(explicit_null_checks_inserted++); |
1001 |
1003 |
1002 // Generate real control flow |
1004 // Generate real control flow |
1003 Node *tst = _gvn.transform( new BoolNode( c, btest ) ); |
1005 Node *tst = _gvn.transform( new BoolNode( c, btest ) ); |
1004 |
1006 |
1005 // Sanity check the probability value |
1007 // Sanity check the probability value |
1011 { PreserveJVMState pjvms(this); |
1013 { PreserveJVMState pjvms(this); |
1012 Node* iftrue = _gvn.transform( new IfTrueNode (iff) ); |
1014 Node* iftrue = _gvn.transform( new IfTrueNode (iff) ); |
1013 set_control(iftrue); |
1015 set_control(iftrue); |
1014 |
1016 |
1015 if (stopped()) { // Path is dead? |
1017 if (stopped()) { // Path is dead? |
1016 explicit_null_checks_elided++; |
1018 NOT_PRODUCT(explicit_null_checks_elided++); |
1017 if (C->eliminate_boxing()) { |
1019 if (C->eliminate_boxing()) { |
1018 // Mark the successor block as parsed |
1020 // Mark the successor block as parsed |
1019 branch_block->next_path_num(); |
1021 branch_block->next_path_num(); |
1020 } |
1022 } |
1021 } else { // Path is live. |
1023 } else { // Path is live. |
1031 // False branch |
1033 // False branch |
1032 Node* iffalse = _gvn.transform( new IfFalseNode(iff) ); |
1034 Node* iffalse = _gvn.transform( new IfFalseNode(iff) ); |
1033 set_control(iffalse); |
1035 set_control(iffalse); |
1034 |
1036 |
1035 if (stopped()) { // Path is dead? |
1037 if (stopped()) { // Path is dead? |
1036 explicit_null_checks_elided++; |
1038 NOT_PRODUCT(explicit_null_checks_elided++); |
1037 if (C->eliminate_boxing()) { |
1039 if (C->eliminate_boxing()) { |
1038 // Mark the successor block as parsed |
1040 // Mark the successor block as parsed |
1039 next_block->next_path_num(); |
1041 next_block->next_path_num(); |
1040 } |
1042 } |
1041 } else { // Path is live. |
1043 } else { // Path is live. |