1 /* |
1 /* |
2 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
187 init_class_id(Class_LoadBarrier); |
187 init_class_id(Class_LoadBarrier); |
188 BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2(); |
188 BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2(); |
189 bs->register_potential_barrier_node(this); |
189 bs->register_potential_barrier_node(this); |
190 } |
190 } |
191 |
191 |
|
192 uint LoadBarrierNode::size_of() const { |
|
193 return sizeof(*this); |
|
194 } |
|
195 |
|
196 uint LoadBarrierNode::cmp(const Node& n) const { |
|
197 ShouldNotReachHere(); |
|
198 return 0; |
|
199 } |
|
200 |
192 const Type *LoadBarrierNode::bottom_type() const { |
201 const Type *LoadBarrierNode::bottom_type() const { |
193 const Type** floadbarrier = (const Type **)(Compile::current()->type_arena()->Amalloc_4((Number_of_Outputs)*sizeof(Type*))); |
202 const Type** floadbarrier = (const Type **)(Compile::current()->type_arena()->Amalloc_4((Number_of_Outputs)*sizeof(Type*))); |
194 Node* in_oop = in(Oop); |
203 Node* in_oop = in(Oop); |
195 floadbarrier[Control] = Type::CONTROL; |
204 floadbarrier[Control] = Type::CONTROL; |
196 floadbarrier[Memory] = Type::MEMORY; |
205 floadbarrier[Memory] = Type::MEMORY; |
197 floadbarrier[Oop] = in_oop == NULL ? Type::TOP : in_oop->bottom_type(); |
206 floadbarrier[Oop] = in_oop == NULL ? Type::TOP : in_oop->bottom_type(); |
198 return TypeTuple::make(Number_of_Outputs, floadbarrier); |
207 return TypeTuple::make(Number_of_Outputs, floadbarrier); |
|
208 } |
|
209 |
|
210 const TypePtr* LoadBarrierNode::adr_type() const { |
|
211 ShouldNotReachHere(); |
|
212 return NULL; |
199 } |
213 } |
200 |
214 |
201 const Type *LoadBarrierNode::Value(PhaseGVN *phase) const { |
215 const Type *LoadBarrierNode::Value(PhaseGVN *phase) const { |
202 const Type** floadbarrier = (const Type **)(phase->C->type_arena()->Amalloc_4((Number_of_Outputs)*sizeof(Type*))); |
216 const Type** floadbarrier = (const Type **)(phase->C->type_arena()->Amalloc_4((Number_of_Outputs)*sizeof(Type*))); |
203 const Type* val_t = phase->type(in(Oop)); |
217 const Type* val_t = phase->type(in(Oop)); |