src/share/vm/opto/idealKit.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6877254 Sdiff src/share/vm/opto

src/share/vm/opto/idealKit.cpp

Print this page




 361                                 int adr_idx,
 362                                 bool require_atomic_access) {
 363   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
 364   const TypePtr* adr_type = NULL;
 365   debug_only(adr_type = C->get_adr_type(adr_idx));
 366   Node *mem = memory(adr_idx);
 367   Node* st;
 368   if (require_atomic_access && bt == T_LONG) {
 369     st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val);
 370   } else {
 371     st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt);
 372   }
 373   st = transform(st);
 374   set_memory(st, adr_idx);
 375 
 376   return st;
 377 }
 378 
 379 // Card mark store. Must be ordered so that it will come after the store of
 380 // the oop.
 381 Node* IdealKit::storeCM(Node* ctl, Node* adr, Node *val, Node* oop_store,
 382                         BasicType bt,
 383                         int adr_idx) {
 384   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
 385   const TypePtr* adr_type = NULL;
 386   debug_only(adr_type = C->get_adr_type(adr_idx));
 387   Node *mem = memory(adr_idx);
 388 
 389   // Add required edge to oop_store, optimizer does not support precedence edges.
 390   // Convert required edge to precedence edge before allocation.
 391   Node* st = new (C, 5) StoreCMNode(ctl, mem, adr, adr_type, val, oop_store);
 392 
 393   st = transform(st);
 394   set_memory(st, adr_idx);
 395 
 396   return st;
 397 }
 398 
 399 //---------------------------- do_memory_merge --------------------------------
 400 // The memory from one merging cvstate needs to be merged with the memory for another
 401 // join cvstate. If the join cvstate doesn't have a merged memory yet then we
 402 // can just copy the state from the merging cvstate
 403 
 404 // Merge one slow path into the rest of memory.
 405 void IdealKit::do_memory_merge(Node* merging, Node* join) {
 406 
 407   // Get the region for the join state
 408   Node* join_region = join->in(TypeFunc::Control);
 409   assert(join_region != NULL, "join region must exist");
 410   if (join->in(TypeFunc::Memory) == NULL ) {
 411     join->set_req(TypeFunc::Memory,  merging->in(TypeFunc::Memory));




 361                                 int adr_idx,
 362                                 bool require_atomic_access) {
 363   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
 364   const TypePtr* adr_type = NULL;
 365   debug_only(adr_type = C->get_adr_type(adr_idx));
 366   Node *mem = memory(adr_idx);
 367   Node* st;
 368   if (require_atomic_access && bt == T_LONG) {
 369     st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val);
 370   } else {
 371     st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt);
 372   }
 373   st = transform(st);
 374   set_memory(st, adr_idx);
 375 
 376   return st;
 377 }
 378 
 379 // Card mark store. Must be ordered so that it will come after the store of
 380 // the oop.
 381 Node* IdealKit::storeCM(Node* ctl, Node* adr, Node *val, Node* oop_store, int oop_adr_idx,
 382                         BasicType bt,
 383                         int adr_idx) {
 384   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
 385   const TypePtr* adr_type = NULL;
 386   debug_only(adr_type = C->get_adr_type(adr_idx));
 387   Node *mem = memory(adr_idx);
 388 
 389   // Add required edge to oop_store, optimizer does not support precedence edges.
 390   // Convert required edge to precedence edge before allocation.
 391   Node* st = new (C, 5) StoreCMNode(ctl, mem, adr, adr_type, val, oop_store, oop_adr_idx);
 392 
 393   st = transform(st);
 394   set_memory(st, adr_idx);
 395 
 396   return st;
 397 }
 398 
 399 //---------------------------- do_memory_merge --------------------------------
 400 // The memory from one merging cvstate needs to be merged with the memory for another
 401 // join cvstate. If the join cvstate doesn't have a merged memory yet then we
 402 // can just copy the state from the merging cvstate
 403 
 404 // Merge one slow path into the rest of memory.
 405 void IdealKit::do_memory_merge(Node* merging, Node* join) {
 406 
 407   // Get the region for the join state
 408   Node* join_region = join->in(TypeFunc::Control);
 409   assert(join_region != NULL, "join region must exist");
 410   if (join->in(TypeFunc::Memory) == NULL ) {
 411     join->set_req(TypeFunc::Memory,  merging->in(TypeFunc::Memory));


src/share/vm/opto/idealKit.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File