62 bool _arguments_validated;
63
64 static const TypeFunc* arraycopy_type() {
65 const Type** fields = TypeTuple::fields(ParmLimit - TypeFunc::Parms);
66 fields[Src] = TypeInstPtr::BOTTOM;
67 fields[SrcPos] = TypeInt::INT;
68 fields[Dest] = TypeInstPtr::BOTTOM;
69 fields[DestPos] = TypeInt::INT;
70 fields[Length] = TypeInt::INT;
71 fields[SrcLen] = TypeInt::INT;
72 fields[DestLen] = TypeInt::INT;
73 fields[SrcKlass] = TypeKlassPtr::BOTTOM;
74 fields[DestKlass] = TypeKlassPtr::BOTTOM;
75 const TypeTuple *domain = TypeTuple::make(ParmLimit, fields);
76
77 // create result type (range)
78 fields = TypeTuple::fields(0);
79
80 const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
81
82 return TypeFunc::make(domain, range);
83 }
84
85 ArrayCopyNode(Compile* C, bool alloc_tightly_coupled);
86
87 intptr_t get_length_if_constant(PhaseGVN *phase) const;
88 int get_count(PhaseGVN *phase) const;
89 static const TypePtr* get_address_type(PhaseGVN *phase, Node* n);
90
91 Node* try_clone_instance(PhaseGVN *phase, bool can_reshape, int count);
92 bool prepare_array_copy(PhaseGVN *phase, bool can_reshape,
93 Node*& adr_src, Node*& base_src, Node*& adr_dest, Node*& base_dest,
94 BasicType& copy_type, const Type*& value_type, bool& disjoint_bases);
95 void array_copy_test_overlap(PhaseGVN *phase, bool can_reshape,
96 bool disjoint_bases, int count,
97 Node*& forward_ctl, Node*& backward_ctl);
98 Node* array_copy_forward(PhaseGVN *phase, bool can_reshape, Node* ctl,
99 Node* start_mem_src, Node* start_mem_dest,
100 const TypePtr* atp_src, const TypePtr* atp_dest,
101 Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
102 BasicType copy_type, const Type* value_type, int count);
|
62 bool _arguments_validated;
63
64 static const TypeFunc* arraycopy_type() {
65 const Type** fields = TypeTuple::fields(ParmLimit - TypeFunc::Parms);
66 fields[Src] = TypeInstPtr::BOTTOM;
67 fields[SrcPos] = TypeInt::INT;
68 fields[Dest] = TypeInstPtr::BOTTOM;
69 fields[DestPos] = TypeInt::INT;
70 fields[Length] = TypeInt::INT;
71 fields[SrcLen] = TypeInt::INT;
72 fields[DestLen] = TypeInt::INT;
73 fields[SrcKlass] = TypeKlassPtr::BOTTOM;
74 fields[DestKlass] = TypeKlassPtr::BOTTOM;
75 const TypeTuple *domain = TypeTuple::make(ParmLimit, fields);
76
77 // create result type (range)
78 fields = TypeTuple::fields(0);
79
80 const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
81
82 return TypeFunc::make(domain, domain, range);
83 }
84
85 ArrayCopyNode(Compile* C, bool alloc_tightly_coupled);
86
87 intptr_t get_length_if_constant(PhaseGVN *phase) const;
88 int get_count(PhaseGVN *phase) const;
89 static const TypePtr* get_address_type(PhaseGVN *phase, Node* n);
90
91 Node* try_clone_instance(PhaseGVN *phase, bool can_reshape, int count);
92 bool prepare_array_copy(PhaseGVN *phase, bool can_reshape,
93 Node*& adr_src, Node*& base_src, Node*& adr_dest, Node*& base_dest,
94 BasicType& copy_type, const Type*& value_type, bool& disjoint_bases);
95 void array_copy_test_overlap(PhaseGVN *phase, bool can_reshape,
96 bool disjoint_bases, int count,
97 Node*& forward_ctl, Node*& backward_ctl);
98 Node* array_copy_forward(PhaseGVN *phase, bool can_reshape, Node* ctl,
99 Node* start_mem_src, Node* start_mem_dest,
100 const TypePtr* atp_src, const TypePtr* atp_dest,
101 Node* adr_src, Node* base_src, Node* adr_dest, Node* base_dest,
102 BasicType copy_type, const Type* value_type, int count);
|