Mercurial > hg > truffle
comparison src/share/vm/opto/locknode.hpp @ 4790:b0ff910edfc9
7128355: assert(!nocreate) failed: Cannot build a phi for a block already parsed
Summary: Do not common BoxLock nodes and avoid creating phis of boxes.
Reviewed-by: never
author | kvn |
---|---|
date | Thu, 12 Jan 2012 14:45:04 -0800 |
parents | e9a5e0a812c8 |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
4779:c8d8e124380c | 4790:b0ff910edfc9 |
---|---|
47 # include "adfiles/ad_ppc.hpp" | 47 # include "adfiles/ad_ppc.hpp" |
48 #endif | 48 #endif |
49 | 49 |
50 //------------------------------BoxLockNode------------------------------------ | 50 //------------------------------BoxLockNode------------------------------------ |
51 class BoxLockNode : public Node { | 51 class BoxLockNode : public Node { |
52 const int _slot; | 52 const int _slot; // stack slot |
53 RegMask _inmask; | 53 RegMask _inmask; // OptoReg corresponding to stack slot |
54 bool _is_eliminated; // indicates this lock was safely eliminated | 54 bool _is_eliminated; // Associated locks were safely eliminated |
55 | 55 |
56 public: | 56 public: |
57 BoxLockNode( int lock ); | 57 BoxLockNode( int lock ); |
58 virtual int Opcode() const; | 58 virtual int Opcode() const; |
59 virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const; | 59 virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const; |
66 virtual const class Type *bottom_type() const { return TypeRawPtr::BOTTOM; } | 66 virtual const class Type *bottom_type() const { return TypeRawPtr::BOTTOM; } |
67 virtual uint ideal_reg() const { return Op_RegP; } | 67 virtual uint ideal_reg() const { return Op_RegP; } |
68 | 68 |
69 static OptoReg::Name reg(Node* box_node); | 69 static OptoReg::Name reg(Node* box_node); |
70 static BoxLockNode* box_node(Node* box_node); | 70 static BoxLockNode* box_node(Node* box_node); |
71 static bool same_slot(Node* box1, Node* box2); | 71 static bool same_slot(Node* box1, Node* box2) { |
72 return box1->as_BoxLock()->_slot == box2->as_BoxLock()->_slot; | |
73 } | |
72 int stack_slot() const { return _slot; } | 74 int stack_slot() const { return _slot; } |
73 | 75 |
74 bool is_eliminated() const { return _is_eliminated; } | 76 bool is_eliminated() const { return _is_eliminated; } |
75 // mark lock as eliminated. | 77 // mark lock as eliminated. |
76 void set_eliminated() { _is_eliminated = true; } | 78 void set_eliminated() { _is_eliminated = true; } |