Mercurial > hg > truffle
comparison src/share/vm/opto/locknode.hpp @ 66:6dbf1a175d6b
6672848: (Escape Analysis) improve lock elimination with EA
Summary: Remove lock/unlock MemBar nodes and specify locks in debug info for deoptimization.
Reviewed-by: never
author | kvn |
---|---|
date | Fri, 14 Mar 2008 16:40:42 -0700 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
65:99269dbf4ba8 | 66:6dbf1a175d6b |
---|---|
25 //------------------------------BoxLockNode------------------------------------ | 25 //------------------------------BoxLockNode------------------------------------ |
26 class BoxLockNode : public Node { | 26 class BoxLockNode : public Node { |
27 public: | 27 public: |
28 const int _slot; | 28 const int _slot; |
29 RegMask _inmask; | 29 RegMask _inmask; |
30 bool _is_eliminated; // indicates this lock was safely eliminated | |
30 | 31 |
31 BoxLockNode( int lock ); | 32 BoxLockNode( int lock ); |
32 virtual int Opcode() const; | 33 virtual int Opcode() const; |
33 virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const; | 34 virtual void emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const; |
34 virtual uint size(PhaseRegAlloc *ra_) const; | 35 virtual uint size(PhaseRegAlloc *ra_) const; |
39 virtual uint cmp( const Node &n ) const; | 40 virtual uint cmp( const Node &n ) const; |
40 virtual const class Type *bottom_type() const { return TypeRawPtr::BOTTOM; } | 41 virtual const class Type *bottom_type() const { return TypeRawPtr::BOTTOM; } |
41 virtual uint ideal_reg() const { return Op_RegP; } | 42 virtual uint ideal_reg() const { return Op_RegP; } |
42 | 43 |
43 static OptoReg::Name stack_slot(Node* box_node); | 44 static OptoReg::Name stack_slot(Node* box_node); |
45 | |
46 bool is_eliminated() { return _is_eliminated; } | |
47 // mark lock as eliminated. | |
48 void set_eliminated() { _is_eliminated = true; } | |
44 | 49 |
45 #ifndef PRODUCT | 50 #ifndef PRODUCT |
46 virtual void format( PhaseRegAlloc *, outputStream *st ) const; | 51 virtual void format( PhaseRegAlloc *, outputStream *st ) const; |
47 virtual void dump_spec(outputStream *st) const { st->print(" Lock %d",_slot); } | 52 virtual void dump_spec(outputStream *st) const { st->print(" Lock %d",_slot); } |
48 #endif | 53 #endif |