< prev index next >

src/share/vm/opto/idealKit.cpp

Print this page




 351                      const Type* t,
 352                      BasicType bt,
 353                      int adr_idx,
 354                      bool require_atomic_access) {
 355 
 356   assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" );
 357   const TypePtr* adr_type = NULL; // debug-mode-only argument
 358   debug_only(adr_type = C->get_adr_type(adr_idx));
 359   Node* mem = memory(adr_idx);
 360   Node* ld;
 361   if (require_atomic_access && bt == T_LONG) {
 362     ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t, MemNode::unordered);
 363   } else {
 364     ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, MemNode::unordered);
 365   }
 366   return transform(ld);
 367 }
 368 
 369 Node* IdealKit::store(Node* ctl, Node* adr, Node *val, BasicType bt,
 370                       int adr_idx,
 371                       MemNode::MemOrd mo, bool require_atomic_access) {

 372   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory");
 373   const TypePtr* adr_type = NULL;
 374   debug_only(adr_type = C->get_adr_type(adr_idx));
 375   Node *mem = memory(adr_idx);
 376   Node* st;
 377   if (require_atomic_access && bt == T_LONG) {
 378     st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val, mo);
 379   } else {
 380     st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo);



 381   }
 382   st = transform(st);
 383   set_memory(st, adr_idx);
 384 
 385   return st;
 386 }
 387 
 388 // Card mark store. Must be ordered so that it will come after the store of
 389 // the oop.
 390 Node* IdealKit::storeCM(Node* ctl, Node* adr, Node *val, Node* oop_store, int oop_adr_idx,
 391                         BasicType bt,
 392                         int adr_idx) {
 393   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
 394   const TypePtr* adr_type = NULL;
 395   debug_only(adr_type = C->get_adr_type(adr_idx));
 396   Node *mem = memory(adr_idx);
 397 
 398   // Add required edge to oop_store, optimizer does not support precedence edges.
 399   // Convert required edge to precedence edge before allocation.
 400   Node* st = new (C) StoreCMNode(ctl, mem, adr, adr_type, val, oop_store, oop_adr_idx);




 351                      const Type* t,
 352                      BasicType bt,
 353                      int adr_idx,
 354                      bool require_atomic_access) {
 355 
 356   assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" );
 357   const TypePtr* adr_type = NULL; // debug-mode-only argument
 358   debug_only(adr_type = C->get_adr_type(adr_idx));
 359   Node* mem = memory(adr_idx);
 360   Node* ld;
 361   if (require_atomic_access && bt == T_LONG) {
 362     ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t, MemNode::unordered);
 363   } else {
 364     ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, MemNode::unordered);
 365   }
 366   return transform(ld);
 367 }
 368 
 369 Node* IdealKit::store(Node* ctl, Node* adr, Node *val, BasicType bt,
 370                       int adr_idx,
 371                       MemNode::MemOrd mo, bool require_atomic_access,
 372                       bool mismatched) {
 373   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory");
 374   const TypePtr* adr_type = NULL;
 375   debug_only(adr_type = C->get_adr_type(adr_idx));
 376   Node *mem = memory(adr_idx);
 377   Node* st;
 378   if (require_atomic_access && bt == T_LONG) {
 379     st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val, mo);
 380   } else {
 381     st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo);
 382   }
 383   if (mismatched) {
 384     st->as_Store()->set_mismatched_access();
 385   }
 386   st = transform(st);
 387   set_memory(st, adr_idx);
 388 
 389   return st;
 390 }
 391 
 392 // Card mark store. Must be ordered so that it will come after the store of
 393 // the oop.
 394 Node* IdealKit::storeCM(Node* ctl, Node* adr, Node *val, Node* oop_store, int oop_adr_idx,
 395                         BasicType bt,
 396                         int adr_idx) {
 397   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
 398   const TypePtr* adr_type = NULL;
 399   debug_only(adr_type = C->get_adr_type(adr_idx));
 400   Node *mem = memory(adr_idx);
 401 
 402   // Add required edge to oop_store, optimizer does not support precedence edges.
 403   // Convert required edge to precedence edge before allocation.
 404   Node* st = new (C) StoreCMNode(ctl, mem, adr, adr_type, val, oop_store, oop_adr_idx);


< prev index next >