< prev index next >

src/hotspot/share/opto/idealKit.cpp

Print this page

343 }
344 
345 //----------------------------- make_load ----------------------------
346 Node* IdealKit::load(Node* ctl,
347                      Node* adr,
348                      const Type* t,
349                      BasicType bt,
350                      int adr_idx,
351                      bool require_atomic_access,
352                      MemNode::MemOrd mo,
353                      LoadNode::ControlDependency control_dependency) {
354 
355   assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" );
356   const TypePtr* adr_type = nullptr; // debug-mode-only argument
357   DEBUG_ONLY(adr_type = C->get_adr_type(adr_idx));
358   Node* mem = memory(adr_idx);
359   Node* ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo, control_dependency, require_atomic_access);
360   return transform(ld);
361 }
362 











363 Node* IdealKit::store(Node* ctl, Node* adr, Node *val, BasicType bt,
364                       int adr_idx,
365                       MemNode::MemOrd mo, bool require_atomic_access,
366                       bool mismatched) {
367   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory");
368   const TypePtr* adr_type = nullptr;
369   DEBUG_ONLY(adr_type = C->get_adr_type(adr_idx));
370   Node *mem = memory(adr_idx);
371   Node* st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo, require_atomic_access);
372   if (mismatched) {
373     st->as_Store()->set_mismatched_access();
374   }
375   st = transform(st);
376   set_memory(st, adr_idx);
377 
378   return st;
379 }
380 
381 //---------------------------- do_memory_merge --------------------------------
382 // The memory from one merging cvstate needs to be merged with the memory for another

343 }
344 
345 //----------------------------- make_load ----------------------------
346 Node* IdealKit::load(Node* ctl,
347                      Node* adr,
348                      const Type* t,
349                      BasicType bt,
350                      int adr_idx,
351                      bool require_atomic_access,
352                      MemNode::MemOrd mo,
353                      LoadNode::ControlDependency control_dependency) {
354 
355   assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" );
356   const TypePtr* adr_type = nullptr; // debug-mode-only argument
357   DEBUG_ONLY(adr_type = C->get_adr_type(adr_idx));
358   Node* mem = memory(adr_idx);
359   Node* ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo, control_dependency, require_atomic_access);
360   return transform(ld);
361 }
362 
363 // Load AOT runtime constant
364 Node* IdealKit::load_aot_const(Node* adr, const Type* t) {
365   BasicType bt = t->basic_type();
366   const TypePtr* adr_type = nullptr; // debug-mode-only argument
367   DEBUG_ONLY(adr_type = C->get_adr_type(Compile::AliasIdxRaw));
368   Node* ctl = (Node*)C->root(); // Raw memory access needs control
369   Node* ld = LoadNode::make(_gvn, ctl, C->immutable_memory(), adr, adr_type, t, bt, MemNode::unordered,
370                             LoadNode::DependsOnlyOnTest, false, false, false, false, 0);
371   return transform(ld);
372 }
373 
374 Node* IdealKit::store(Node* ctl, Node* adr, Node *val, BasicType bt,
375                       int adr_idx,
376                       MemNode::MemOrd mo, bool require_atomic_access,
377                       bool mismatched) {
378   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory");
379   const TypePtr* adr_type = nullptr;
380   DEBUG_ONLY(adr_type = C->get_adr_type(adr_idx));
381   Node *mem = memory(adr_idx);
382   Node* st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo, require_atomic_access);
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 //---------------------------- do_memory_merge --------------------------------
393 // The memory from one merging cvstate needs to be merged with the memory for another
< prev index next >