hotspot/src/share/vm/opto/graphKit.hpp
changeset 33449 8aca535611b8
parent 33105 294e48b4f704
child 33459 9d377e6f0e4c
equal deleted inserted replaced
33447:fa16119dcde7 33449:8aca535611b8
   511   // We choose the unordered semantics by default because we have
   511   // We choose the unordered semantics by default because we have
   512   // adapted the `do_put_xxx' and `do_get_xxx' procedures for the case
   512   // adapted the `do_put_xxx' and `do_get_xxx' procedures for the case
   513   // of volatile fields.
   513   // of volatile fields.
   514   Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt,
   514   Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt,
   515                   MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest,
   515                   MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest,
   516                   bool require_atomic_access = false) {
   516                   bool require_atomic_access = false, bool unaligned = false,
       
   517                   bool mismatched = false) {
   517     // This version computes alias_index from bottom_type
   518     // This version computes alias_index from bottom_type
   518     return make_load(ctl, adr, t, bt, adr->bottom_type()->is_ptr(),
   519     return make_load(ctl, adr, t, bt, adr->bottom_type()->is_ptr(),
   519                      mo, control_dependency, require_atomic_access);
   520                      mo, control_dependency, require_atomic_access,
       
   521                      unaligned, mismatched);
   520   }
   522   }
   521   Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, const TypePtr* adr_type,
   523   Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, const TypePtr* adr_type,
   522                   MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest,
   524                   MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest,
   523                   bool require_atomic_access = false) {
   525                   bool require_atomic_access = false, bool unaligned = false,
       
   526                   bool mismatched = false) {
   524     // This version computes alias_index from an address type
   527     // This version computes alias_index from an address type
   525     assert(adr_type != NULL, "use other make_load factory");
   528     assert(adr_type != NULL, "use other make_load factory");
   526     return make_load(ctl, adr, t, bt, C->get_alias_index(adr_type),
   529     return make_load(ctl, adr, t, bt, C->get_alias_index(adr_type),
   527                      mo, control_dependency, require_atomic_access);
   530                      mo, control_dependency, require_atomic_access,
       
   531                      unaligned, mismatched);
   528   }
   532   }
   529   // This is the base version which is given an alias index.
   533   // This is the base version which is given an alias index.
   530   Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, int adr_idx,
   534   Node* make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, int adr_idx,
   531                   MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest,
   535                   MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency = LoadNode::DependsOnlyOnTest,
   532                   bool require_atomic_access = false);
   536                   bool require_atomic_access = false, bool unaligned = false,
       
   537                   bool mismatched = false);
   533 
   538 
   534   // Create & transform a StoreNode and store the effect into the
   539   // Create & transform a StoreNode and store the effect into the
   535   // parser's memory state.
   540   // parser's memory state.
   536   //
   541   //
   537   // We must ensure that stores of object references will be visible
   542   // We must ensure that stores of object references will be visible
   540   // semantics, if the stored value is an object reference that might
   545   // semantics, if the stored value is an object reference that might
   541   // point to a new object and may become externally visible.
   546   // point to a new object and may become externally visible.
   542   Node* store_to_memory(Node* ctl, Node* adr, Node* val, BasicType bt,
   547   Node* store_to_memory(Node* ctl, Node* adr, Node* val, BasicType bt,
   543                         const TypePtr* adr_type,
   548                         const TypePtr* adr_type,
   544                         MemNode::MemOrd mo,
   549                         MemNode::MemOrd mo,
   545                         bool require_atomic_access = false) {
   550                         bool require_atomic_access = false,
       
   551                         bool unaligned = false,
       
   552                         bool mismatched = false) {
   546     // This version computes alias_index from an address type
   553     // This version computes alias_index from an address type
   547     assert(adr_type != NULL, "use other store_to_memory factory");
   554     assert(adr_type != NULL, "use other store_to_memory factory");
   548     return store_to_memory(ctl, adr, val, bt,
   555     return store_to_memory(ctl, adr, val, bt,
   549                            C->get_alias_index(adr_type),
   556                            C->get_alias_index(adr_type),
   550                            mo, require_atomic_access);
   557                            mo, require_atomic_access,
       
   558                            unaligned, mismatched);
   551   }
   559   }
   552   // This is the base version which is given alias index
   560   // This is the base version which is given alias index
   553   // Return the new StoreXNode
   561   // Return the new StoreXNode
   554   Node* store_to_memory(Node* ctl, Node* adr, Node* val, BasicType bt,
   562   Node* store_to_memory(Node* ctl, Node* adr, Node* val, BasicType bt,
   555                         int adr_idx,
   563                         int adr_idx,
   556                         MemNode::MemOrd,
   564                         MemNode::MemOrd,
   557                         bool require_atomic_access = false);
   565                         bool require_atomic_access = false,
       
   566                         bool unaligned = false,
       
   567                         bool mismatched = false);
   558 
   568 
   559 
   569 
   560   // All in one pre-barrier, store, post_barrier
   570   // All in one pre-barrier, store, post_barrier
   561   // Insert a write-barrier'd store.  This is to let generational GC
   571   // Insert a write-barrier'd store.  This is to let generational GC
   562   // work; we have to flag all oop-stores before the next GC point.
   572   // work; we have to flag all oop-stores before the next GC point.
   575                   const TypePtr* adr_type,
   585                   const TypePtr* adr_type,
   576                   Node* val,
   586                   Node* val,
   577                   const TypeOopPtr* val_type,
   587                   const TypeOopPtr* val_type,
   578                   BasicType bt,
   588                   BasicType bt,
   579                   bool use_precise,
   589                   bool use_precise,
   580                   MemNode::MemOrd mo);
   590                   MemNode::MemOrd mo,
       
   591                   bool mismatched = false);
   581 
   592 
   582   Node* store_oop_to_object(Node* ctl,
   593   Node* store_oop_to_object(Node* ctl,
   583                             Node* obj,   // containing obj
   594                             Node* obj,   // containing obj
   584                             Node* adr,   // actual adress to store val at
   595                             Node* adr,   // actual adress to store val at
   585                             const TypePtr* adr_type,
   596                             const TypePtr* adr_type,
   606                              Node* obj,   // containing obj
   617                              Node* obj,   // containing obj
   607                              Node* adr,   // actual adress to store val at
   618                              Node* adr,   // actual adress to store val at
   608                              const TypePtr* adr_type,
   619                              const TypePtr* adr_type,
   609                              Node* val,
   620                              Node* val,
   610                              BasicType bt,
   621                              BasicType bt,
   611                              MemNode::MemOrd mo);
   622                              MemNode::MemOrd mo,
       
   623                              bool mismatched = false);
   612 
   624 
   613   // For the few case where the barriers need special help
   625   // For the few case where the barriers need special help
   614   void pre_barrier(bool do_load, Node* ctl,
   626   void pre_barrier(bool do_load, Node* ctl,
   615                    Node* obj, Node* adr, uint adr_idx, Node* val, const TypeOopPtr* val_type,
   627                    Node* obj, Node* adr, uint adr_idx, Node* val, const TypeOopPtr* val_type,
   616                    Node* pre_val,
   628                    Node* pre_val,