src/share/vm/opto/memnode.cpp

Print this page

        

*** 29,43 **** --- 29,45 ---- #include "oops/objArrayKlass.hpp" #include "opto/addnode.hpp" #include "opto/cfgnode.hpp" #include "opto/compile.hpp" #include "opto/connode.hpp" + #include "opto/convertnode.hpp" #include "opto/loopnode.hpp" #include "opto/machnode.hpp" #include "opto/matcher.hpp" #include "opto/memnode.hpp" #include "opto/mulnode.hpp" + #include "opto/narrowptrnode.hpp" #include "opto/phaseX.hpp" #include "opto/regmask.hpp" // Portions of code courtesy of Clifford Click
*** 2902,2964 **** assert(done_offset == end_offset, ""); return mem; } //============================================================================= - // Do not match memory edge. - uint StrIntrinsicNode::match_edge(uint idx) const { - return idx == 2 || idx == 3; - } - - //------------------------------Ideal------------------------------------------ - // Return a node which is more "ideal" than the current node. Strip out - // control copies - Node *StrIntrinsicNode::Ideal(PhaseGVN *phase, bool can_reshape) { - if (remove_dead_region(phase, can_reshape)) return this; - // Don't bother trying to transform a dead node - if (in(0) && in(0)->is_top()) return NULL; - - if (can_reshape) { - Node* mem = phase->transform(in(MemNode::Memory)); - // If transformed to a MergeMem, get the desired slice - uint alias_idx = phase->C->get_alias_index(adr_type()); - mem = mem->is_MergeMem() ? mem->as_MergeMem()->memory_at(alias_idx) : mem; - if (mem != in(MemNode::Memory)) { - set_req(MemNode::Memory, mem); - return this; - } - } - return NULL; - } - - //------------------------------Value------------------------------------------ - const Type *StrIntrinsicNode::Value( PhaseTransform *phase ) const { - if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP; - return bottom_type(); - } - - //============================================================================= - //------------------------------match_edge------------------------------------- - // Do not match memory edge - uint EncodeISOArrayNode::match_edge(uint idx) const { - return idx == 2 || idx == 3; // EncodeISOArray src (Binary dst len) - } - - //------------------------------Ideal------------------------------------------ - // Return a node which is more "ideal" than the current node. Strip out - // control copies - Node *EncodeISOArrayNode::Ideal(PhaseGVN *phase, bool can_reshape) { - return remove_dead_region(phase, can_reshape) ? this : NULL; - } - - //------------------------------Value------------------------------------------ - const Type *EncodeISOArrayNode::Value(PhaseTransform *phase) const { - if (in(0) && phase->type(in(0)) == Type::TOP) return Type::TOP; - return bottom_type(); - } - - //============================================================================= MemBarNode::MemBarNode(Compile* C, int alias_idx, Node* precedent) : MultiNode(TypeFunc::Parms + (precedent == NULL? 0: 1)), _adr_type(C->get_adr_type(alias_idx)) { init_class_id(Class_MemBar); --- 2904,2913 ----