804 #endif |
804 #endif |
805 |
805 |
806 //----------------------------LoadNode::make----------------------------------- |
806 //----------------------------LoadNode::make----------------------------------- |
807 // Polymorphic factory method: |
807 // Polymorphic factory method: |
808 Node *LoadNode::make(PhaseGVN& gvn, Node *ctl, Node *mem, Node *adr, const TypePtr* adr_type, const Type *rt, BasicType bt, MemOrd mo, |
808 Node *LoadNode::make(PhaseGVN& gvn, Node *ctl, Node *mem, Node *adr, const TypePtr* adr_type, const Type *rt, BasicType bt, MemOrd mo, |
809 ControlDependency control_dependency, bool unaligned, bool mismatched, bool unsafe) { |
809 ControlDependency control_dependency, bool unaligned, bool mismatched, bool unsafe, uint8_t barrier_data) { |
810 Compile* C = gvn.C; |
810 Compile* C = gvn.C; |
811 |
811 |
812 // sanity check the alias category against the created node type |
812 // sanity check the alias category against the created node type |
813 assert(!(adr_type->isa_oopptr() && |
813 assert(!(adr_type->isa_oopptr() && |
814 adr_type->offset() == oopDesc::klass_offset_in_bytes()), |
814 adr_type->offset() == oopDesc::klass_offset_in_bytes()), |
855 load->set_mismatched_access(); |
855 load->set_mismatched_access(); |
856 } |
856 } |
857 if (unsafe) { |
857 if (unsafe) { |
858 load->set_unsafe_access(); |
858 load->set_unsafe_access(); |
859 } |
859 } |
|
860 load->set_barrier_data(barrier_data); |
860 if (load->Opcode() == Op_LoadN) { |
861 if (load->Opcode() == Op_LoadN) { |
861 Node* ld = gvn.transform(load); |
862 Node* ld = gvn.transform(load); |
862 return new DecodeNNode(ld, ld->bottom_type()->make_ptr()); |
863 return new DecodeNNode(ld, ld->bottom_type()->make_ptr()); |
863 } |
864 } |
864 |
865 |
865 return load; |
866 return load; |
866 } |
867 } |
867 |
868 |
868 LoadLNode* LoadLNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo, |
869 LoadLNode* LoadLNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo, |
869 ControlDependency control_dependency, bool unaligned, bool mismatched, bool unsafe) { |
870 ControlDependency control_dependency, bool unaligned, bool mismatched, bool unsafe, uint8_t barrier_data) { |
870 bool require_atomic = true; |
871 bool require_atomic = true; |
871 LoadLNode* load = new LoadLNode(ctl, mem, adr, adr_type, rt->is_long(), mo, control_dependency, require_atomic); |
872 LoadLNode* load = new LoadLNode(ctl, mem, adr, adr_type, rt->is_long(), mo, control_dependency, require_atomic); |
872 if (unaligned) { |
873 if (unaligned) { |
873 load->set_unaligned_access(); |
874 load->set_unaligned_access(); |
874 } |
875 } |
876 load->set_mismatched_access(); |
877 load->set_mismatched_access(); |
877 } |
878 } |
878 if (unsafe) { |
879 if (unsafe) { |
879 load->set_unsafe_access(); |
880 load->set_unsafe_access(); |
880 } |
881 } |
|
882 load->set_barrier_data(barrier_data); |
881 return load; |
883 return load; |
882 } |
884 } |
883 |
885 |
884 LoadDNode* LoadDNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo, |
886 LoadDNode* LoadDNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo, |
885 ControlDependency control_dependency, bool unaligned, bool mismatched, bool unsafe) { |
887 ControlDependency control_dependency, bool unaligned, bool mismatched, bool unsafe, uint8_t barrier_data) { |
886 bool require_atomic = true; |
888 bool require_atomic = true; |
887 LoadDNode* load = new LoadDNode(ctl, mem, adr, adr_type, rt, mo, control_dependency, require_atomic); |
889 LoadDNode* load = new LoadDNode(ctl, mem, adr, adr_type, rt, mo, control_dependency, require_atomic); |
888 if (unaligned) { |
890 if (unaligned) { |
889 load->set_unaligned_access(); |
891 load->set_unaligned_access(); |
890 } |
892 } |