comparison src/share/vm/opto/library_call.cpp @ 2444:07acc51c1d2a

7032314: Allow to generate CallLeafNoFPNode in IdealKit Summary: Added CallLeafNoFPNode generation to IdealKit. Added i_o synchronization. Reviewed-by: never
author kvn
date Sat, 02 Apr 2011 09:49:27 -0700
parents 3d58a4983660
children 13bc79b5c9c8
comparison
equal deleted inserted replaced
2443:f8b038506985 2444:07acc51c1d2a
1118 Node* target = _gvn.transform( makecon(TypeOopPtr::make_from_constant(target_array, true)) ); 1118 Node* target = _gvn.transform( makecon(TypeOopPtr::make_from_constant(target_array, true)) );
1119 jint target_length = target_array->length(); 1119 jint target_length = target_array->length();
1120 const TypeAry* target_array_type = TypeAry::make(TypeInt::CHAR, TypeInt::make(0, target_length, Type::WidenMin)); 1120 const TypeAry* target_array_type = TypeAry::make(TypeInt::CHAR, TypeInt::make(0, target_length, Type::WidenMin));
1121 const TypeAryPtr* target_type = TypeAryPtr::make(TypePtr::BotPTR, target_array_type, target_array->klass(), true, Type::OffsetBot); 1121 const TypeAryPtr* target_type = TypeAryPtr::make(TypePtr::BotPTR, target_array_type, target_array->klass(), true, Type::OffsetBot);
1122 1122
1123 IdealKit kit(gvn(), control(), merged_memory(), false, true); 1123 IdealKit kit(this, false, true);
1124 #define __ kit. 1124 #define __ kit.
1125 Node* zero = __ ConI(0); 1125 Node* zero = __ ConI(0);
1126 Node* one = __ ConI(1); 1126 Node* one = __ ConI(1);
1127 Node* cache = __ ConI(cache_i); 1127 Node* cache = __ ConI(cache_i);
1128 Node* md2 = __ ConI(md2_i); 1128 Node* md2 = __ ConI(md2_i);
1169 __ bind(outer_loop); 1169 __ bind(outer_loop);
1170 }__ end_loop(); __ dead(i); 1170 }__ end_loop(); __ dead(i);
1171 __ bind(return_); 1171 __ bind(return_);
1172 1172
1173 // Final sync IdealKit and GraphKit. 1173 // Final sync IdealKit and GraphKit.
1174 sync_kit(kit); 1174 final_sync(kit);
1175 Node* result = __ value(rtn); 1175 Node* result = __ value(rtn);
1176 #undef __ 1176 #undef __
1177 C->set_has_loops(true); 1177 C->set_has_loops(true);
1178 return result; 1178 return result;
1179 } 1179 }
2316 } else { 2316 } else {
2317 // We can't tell at compile time if we are storing in the Java heap or outside 2317 // We can't tell at compile time if we are storing in the Java heap or outside
2318 // of it. So we need to emit code to conditionally do the proper type of 2318 // of it. So we need to emit code to conditionally do the proper type of
2319 // store. 2319 // store.
2320 2320
2321 IdealKit ideal(gvn(), control(), merged_memory()); 2321 IdealKit ideal(this);
2322 #define __ ideal. 2322 #define __ ideal.
2323 // QQQ who knows what probability is here?? 2323 // QQQ who knows what probability is here??
2324 __ if_then(heap_base_oop, BoolTest::ne, null(), PROB_UNLIKELY(0.999)); { 2324 __ if_then(heap_base_oop, BoolTest::ne, null(), PROB_UNLIKELY(0.999)); {
2325 // Sync IdealKit and graphKit. 2325 // Sync IdealKit and graphKit.
2326 set_all_memory( __ merged_memory()); 2326 sync_kit(ideal);
2327 set_control(__ ctrl());
2328 Node* st = store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type); 2327 Node* st = store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type);
2329 // Update IdealKit memory. 2328 // Update IdealKit memory.
2330 __ set_all_memory(merged_memory()); 2329 __ sync_kit(this);
2331 __ set_ctrl(control());
2332 } __ else_(); { 2330 } __ else_(); {
2333 __ store(__ ctrl(), adr, val, type, alias_type->index(), is_volatile); 2331 __ store(__ ctrl(), adr, val, type, alias_type->index(), is_volatile);
2334 } __ end_if(); 2332 } __ end_if();
2335 // Final sync IdealKit and GraphKit. 2333 // Final sync IdealKit and GraphKit.
2336 sync_kit(ideal); 2334 final_sync(ideal);
2337 #undef __ 2335 #undef __
2338 } 2336 }
2339 } 2337 }
2340 } 2338 }
2341 2339