提交 1051bb86 编写于 作者: N never

6920346: G1: "must avoid base_memory and AliasIdxTop"

Reviewed-by: kvn
上级 d5eaaf4c
...@@ -583,9 +583,22 @@ public: ...@@ -583,9 +583,22 @@ public:
// Preceeding equivalent StoreCMs may be eliminated. // Preceeding equivalent StoreCMs may be eliminated.
class StoreCMNode : public StoreNode { class StoreCMNode : public StoreNode {
private: private:
virtual uint hash() const { return StoreNode::hash() + _oop_alias_idx; }
virtual uint cmp( const Node &n ) const {
return _oop_alias_idx == ((StoreCMNode&)n)._oop_alias_idx
&& StoreNode::cmp(n);
}
virtual uint size_of() const { return sizeof(*this); }
int _oop_alias_idx; // The alias_idx of OopStore int _oop_alias_idx; // The alias_idx of OopStore
public: public:
StoreCMNode( Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, Node *oop_store, int oop_alias_idx ) : StoreNode(c,mem,adr,at,val,oop_store), _oop_alias_idx(oop_alias_idx) {} StoreCMNode( Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val, Node *oop_store, int oop_alias_idx ) :
StoreNode(c,mem,adr,at,val,oop_store),
_oop_alias_idx(oop_alias_idx) {
assert(_oop_alias_idx >= Compile::AliasIdxRaw ||
_oop_alias_idx == Compile::AliasIdxBot && Compile::current()->AliasLevel() == 0,
"bad oop alias idx");
}
virtual int Opcode() const; virtual int Opcode() const;
virtual Node *Identity( PhaseTransform *phase ); virtual Node *Identity( PhaseTransform *phase );
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape); virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册