1450 // |
1450 // |
1451 |
1451 |
1452 // factory methods in "int adr_idx" |
1452 // factory methods in "int adr_idx" |
1453 Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, |
1453 Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt, |
1454 int adr_idx, |
1454 int adr_idx, |
1455 MemNode::MemOrd mo, bool require_atomic_access) { |
1455 MemNode::MemOrd mo, LoadNode::ControlDependency control_dependency, bool require_atomic_access) { |
1456 assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" ); |
1456 assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" ); |
1457 const TypePtr* adr_type = NULL; // debug-mode-only argument |
1457 const TypePtr* adr_type = NULL; // debug-mode-only argument |
1458 debug_only(adr_type = C->get_adr_type(adr_idx)); |
1458 debug_only(adr_type = C->get_adr_type(adr_idx)); |
1459 Node* mem = memory(adr_idx); |
1459 Node* mem = memory(adr_idx); |
1460 Node* ld; |
1460 Node* ld; |
1461 if (require_atomic_access && bt == T_LONG) { |
1461 if (require_atomic_access && bt == T_LONG) { |
1462 ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t, mo); |
1462 ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t, mo, control_dependency); |
1463 } else if (require_atomic_access && bt == T_DOUBLE) { |
1463 } else if (require_atomic_access && bt == T_DOUBLE) { |
1464 ld = LoadDNode::make_atomic(C, ctl, mem, adr, adr_type, t, mo); |
1464 ld = LoadDNode::make_atomic(C, ctl, mem, adr, adr_type, t, mo, control_dependency); |
1465 } else { |
1465 } else { |
1466 ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo); |
1466 ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo, control_dependency); |
1467 } |
1467 } |
1468 ld = _gvn.transform(ld); |
1468 ld = _gvn.transform(ld); |
1469 if ((bt == T_OBJECT) && C->do_escape_analysis() || C->eliminate_boxing()) { |
1469 if ((bt == T_OBJECT) && C->do_escape_analysis() || C->eliminate_boxing()) { |
1470 // Improve graph before escape analysis and boxing elimination. |
1470 // Improve graph before escape analysis and boxing elimination. |
1471 record_for_igvn(ld); |
1471 record_for_igvn(ld); |