< prev index next >

src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.hpp

Print this page
rev 53157 : [mq]: remove-leftovers.patch


  42 
  43 #ifdef ASSERT
  44   enum verify_type {
  45     ShenandoahLoad,
  46     ShenandoahStore,
  47     ShenandoahValue,
  48     ShenandoahOopStore,
  49     ShenandoahNone,
  50   };
  51 
  52   static bool verify_helper(Node* in, Node_Stack& phis, VectorSet& visited, verify_type t, bool trace, Unique_Node_List& barriers_used);
  53 #endif
  54 
  55 public:
  56   enum { Control,
  57          Memory,
  58          ValueIn
  59   };
  60 
  61   ShenandoahBarrierNode(Node* ctrl, Node* mem, Node* obj, bool allow_fromspace)
  62     : TypeNode(obj->bottom_type()->isa_oopptr() ? obj->bottom_type()->is_oopptr()->cast_to_nonconst() : obj->bottom_type(), 3),
  63       _allow_fromspace(allow_fromspace) {
  64 
  65     init_req(Control, ctrl);
  66     init_req(Memory, mem);
  67     init_req(ValueIn, obj);
  68 
  69     init_class_id(Class_ShenandoahBarrier);
  70   }
  71 
  72   static Node* skip_through_barrier(Node* n);
  73 
  74   static const TypeOopPtr* brooks_pointer_type(const Type* t) {
  75     return t->is_oopptr()->cast_to_nonconst()->add_offset(BrooksPointer::byte_offset())->is_oopptr();
  76   }
  77 
  78   virtual const TypePtr* adr_type() const {
  79     if (bottom_type() == Type::TOP) {
  80       return NULL;
  81     }
  82     //const TypePtr* adr_type = in(MemNode::Address)->bottom_type()->is_ptr();
  83     const TypePtr* adr_type = brooks_pointer_type(bottom_type());
  84     assert(adr_type->offset() == BrooksPointer::byte_offset(), "sane offset");
  85     assert(Compile::current()->alias_type(adr_type)->is_rewritable(), "brooks ptr must be rewritable");
  86     return adr_type;
  87   }
  88 
  89   virtual uint  ideal_reg() const { return Op_RegP; }
  90   virtual uint match_edge(uint idx) const {
  91     return idx >= ValueIn;
  92   }
  93 
  94   Node* Identity_impl(PhaseGVN* phase);
  95 




  42 
  43 #ifdef ASSERT
  44   enum verify_type {
  45     ShenandoahLoad,
  46     ShenandoahStore,
  47     ShenandoahValue,
  48     ShenandoahOopStore,
  49     ShenandoahNone,
  50   };
  51 
  52   static bool verify_helper(Node* in, Node_Stack& phis, VectorSet& visited, verify_type t, bool trace, Unique_Node_List& barriers_used);
  53 #endif
  54 
  55 public:
  56   enum { Control,
  57          Memory,
  58          ValueIn
  59   };
  60 
  61   ShenandoahBarrierNode(Node* ctrl, Node* mem, Node* obj, bool allow_fromspace)
  62     : TypeNode(obj->bottom_type(), 3),
  63       _allow_fromspace(allow_fromspace) {
  64 
  65     init_req(Control, ctrl);
  66     init_req(Memory, mem);
  67     init_req(ValueIn, obj);
  68 
  69     init_class_id(Class_ShenandoahBarrier);
  70   }
  71 
  72   static Node* skip_through_barrier(Node* n);
  73 
  74   static const TypeOopPtr* brooks_pointer_type(const Type* t) {
  75     return t->is_oopptr()->add_offset(BrooksPointer::byte_offset())->is_oopptr();
  76   }
  77 
  78   virtual const TypePtr* adr_type() const {
  79     if (bottom_type() == Type::TOP) {
  80       return NULL;
  81     }
  82     //const TypePtr* adr_type = in(MemNode::Address)->bottom_type()->is_ptr();
  83     const TypePtr* adr_type = brooks_pointer_type(bottom_type());
  84     assert(adr_type->offset() == BrooksPointer::byte_offset(), "sane offset");
  85     assert(Compile::current()->alias_type(adr_type)->is_rewritable(), "brooks ptr must be rewritable");
  86     return adr_type;
  87   }
  88 
  89   virtual uint  ideal_reg() const { return Op_RegP; }
  90   virtual uint match_edge(uint idx) const {
  91     return idx >= ValueIn;
  92   }
  93 
  94   Node* Identity_impl(PhaseGVN* phase);
  95 


< prev index next >