Lines Matching refs:load

380 // Find the "early" block for a load, if we considered only memory and
387 static Block* memory_early_block(Node* load, Block* early, Block_Array &bbs) {
390 Node* store = load->in(MemNode::Memory);
391 load->as_Mach()->memory_inputs(base, index);
404 if (mem_inputs_length + 1 < (int) load->req()) {
405 // This "load" has more inputs than just the memory, base and index inputs.
410 if (load->in(0) != NULL) mem_inputs[mem_inputs_length++] = load->in(0);
420 DEBUG_ONLY(assert_dom(deepb, inb, load, bbs));
432 // A load may need to witness memory that nearby stores can overwrite.
434 // from the load to the store, or else move LCA upward to force the
435 // load to (eventually) be scheduled in a block above the store.
441 // store between the load's "early block" and the updated LCA.
443 // back to the load. The caller is expected to schedule the load
445 // preserve anti-dependences. The caller may also hoist the load
447 Block* PhaseCFG::insert_anti_dependences(Block* LCA, Node* load, bool verify) {
448 assert(load->needs_anti_dependence_check(), "must be a load of some sort");
454 uint load_alias_idx = C->get_alias_index(load->adr_type());
464 load->dump(2);
468 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_StrComp),
469 "String compare is only known 'load' that does not conflict with any stores");
470 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_StrEquals),
471 "String equals is a 'load' that does not conflict with any stores");
472 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_StrIndexOf),
473 "String indexOf is a 'load' that does not conflict with any stores");
474 assert(load_alias_idx || (load->is_Mach() && load->as_Mach()->ideal_Opcode() == Op_AryEq),
475 "Arrays equals is a 'load' that do not conflict with any stores");
478 // It is impossible to spoil this load by putting stores before it,
480 // which 'load' must witness.
484 node_idx_t load_index = load->_idx;
486 // Note the earliest legal placement of 'load', as determined by
490 // to look for anti-deps between this load and any store.
498 early = memory_early_block(load, early, _bbs);
512 // prevent the load from sinking. For such a block, set_raise_LCA_mark
518 // 'load' uses some memory state; look for users of the same state.
522 // that 'load' needs to use. We need to force 'load'
524 // the same block as 'load', we insert an anti-dependence
525 // edge load->store.
527 // The relevant stores "nearby" the load consist of a tree rooted
533 Node* initial_mem = load->in(MemNode::Memory);
538 // Examine a nearby store to see if it might interfere with our load.
606 // Some raw memory, such as the load of "top" at an allocation,
613 if (mstore->ideal_Opcode() == Op_SafePoint && load->in(0) == mstore)
618 // Identify a block that the current load must be above,
620 // earliest legal block for 'load'. In the latter case,
626 // 'load' uses memory which is one (or more) of the Phi's inputs.
642 // If any predecessor of the Phi matches the load's "early block",
643 // we do not need a precedence edge between the Phi and 'load'
644 // since the load will be forced into a block preceding the Phi.
683 // Found a possibly-interfering store in the load's 'early' block.
684 // This means 'load' cannot sink at all in the dominator tree.
685 // Add an anti-dep edge, and squeeze 'load' into the highest block.
686 assert(store != load->in(0), "dependence cycle found");
688 assert(store->find_edge(load) != -1, "missing precedence edge");
690 store->add_prec(load);
698 // Finished if 'load' must be scheduled in its 'early' block.
704 // in the load's 'early' block. Move LCA up above all predecessors
710 // The raised LCA will be a lower bound for placing the load,
711 // preventing the load from sinking past any block containing
712 // a store that may invalidate the memory state required by 'load'.
714 LCA = raise_LCA_above_marks(LCA, load->_idx, early, _bbs);
717 // Insert anti-dependence edges from 'load' to each store
725 // add anti_dependence from store to load in its own block
726 assert(store != load->in(0), "dependence cycle found");
728 assert(store->find_edge(load) != -1, "missing precedence edge");
730 store->add_prec(load);
736 // did not interfere with any use of 'load'.