1225 }
1226
1227 process_users_of_allocation(boxing);
1228
1229 #ifndef PRODUCT
1230 if (PrintEliminateAllocations) {
1231 tty->print("++++ Eliminated: %d ", boxing->_idx);
1232 boxing->method()->print_short_name(tty);
1233 tty->cr();
1234 }
1235 #endif
1236
1237 return true;
1238 }
1239
1240 //---------------------------set_eden_pointers-------------------------
1241 void PhaseMacroExpand::set_eden_pointers(Node* &eden_top_adr, Node* &eden_end_adr) {
1242 if (UseTLAB) { // Private allocation: load from TLS
1243 Node* thread = transform_later(new ThreadLocalNode());
1244 int tlab_top_offset = in_bytes(JavaThread::tlab_top_offset());
1245 int tlab_end_offset = in_bytes(JavaThread::tlab_end_offset());
1246 eden_top_adr = basic_plus_adr(top()/*not oop*/, thread, tlab_top_offset);
1247 eden_end_adr = basic_plus_adr(top()/*not oop*/, thread, tlab_end_offset);
1248 } else { // Shared allocation: load from globals
1249 CollectedHeap* ch = Universe::heap();
1250 address top_adr = (address)ch->top_addr();
1251 address end_adr = (address)ch->end_addr();
1252 eden_top_adr = makecon(TypeRawPtr::make(top_adr));
1253 eden_end_adr = basic_plus_adr(eden_top_adr, end_adr - top_adr);
1254 }
1255 }
1256
1257
1258 Node* PhaseMacroExpand::make_load(Node* ctl, Node* mem, Node* base, int offset, const Type* value_type, BasicType bt) {
1259 Node* adr = basic_plus_adr(base, offset);
1260 const TypePtr* adr_type = adr->bottom_type()->is_ptr();
1261 Node* value = LoadNode::make(_igvn, ctl, mem, adr, adr_type, value_type, bt, MemNode::unordered);
1262 transform_later(value);
1263 return value;
1264 }
1265
1266
1267 Node* PhaseMacroExpand::make_store(Node* ctl, Node* mem, Node* base, int offset, Node* value, BasicType bt) {
|
1225 }
1226
1227 process_users_of_allocation(boxing);
1228
1229 #ifndef PRODUCT
1230 if (PrintEliminateAllocations) {
1231 tty->print("++++ Eliminated: %d ", boxing->_idx);
1232 boxing->method()->print_short_name(tty);
1233 tty->cr();
1234 }
1235 #endif
1236
1237 return true;
1238 }
1239
1240 //---------------------------set_eden_pointers-------------------------
1241 void PhaseMacroExpand::set_eden_pointers(Node* &eden_top_adr, Node* &eden_end_adr) {
1242 if (UseTLAB) { // Private allocation: load from TLS
1243 Node* thread = transform_later(new ThreadLocalNode());
1244 int tlab_top_offset = in_bytes(JavaThread::tlab_top_offset());
1245 int tlab_fast_path_end_offset = in_bytes(JavaThread::tlab_fast_path_end_offset());
1246 eden_top_adr = basic_plus_adr(top()/*not oop*/, thread, tlab_top_offset);
1247 eden_end_adr = basic_plus_adr(top()/*not oop*/, thread, tlab_fast_path_end_offset);
1248 } else { // Shared allocation: load from globals
1249 CollectedHeap* ch = Universe::heap();
1250 address top_adr = (address)ch->top_addr();
1251 address end_adr = (address)ch->end_addr();
1252 eden_top_adr = makecon(TypeRawPtr::make(top_adr));
1253 eden_end_adr = basic_plus_adr(eden_top_adr, end_adr - top_adr);
1254 }
1255 }
1256
1257
1258 Node* PhaseMacroExpand::make_load(Node* ctl, Node* mem, Node* base, int offset, const Type* value_type, BasicType bt) {
1259 Node* adr = basic_plus_adr(base, offset);
1260 const TypePtr* adr_type = adr->bottom_type()->is_ptr();
1261 Node* value = LoadNode::make(_igvn, ctl, mem, adr, adr_type, value_type, bt, MemNode::unordered);
1262 transform_later(value);
1263 return value;
1264 }
1265
1266
1267 Node* PhaseMacroExpand::make_store(Node* ctl, Node* mem, Node* base, int offset, Node* value, BasicType bt) {
|