org.jikesrvm.compilers.opt.escape
Class UnsyncReplacer

java.lang.Object
  extended by org.jikesrvm.compilers.opt.escape.UnsyncReplacer

final class UnsyncReplacer
extends Object

Replace calls to synchronized methods to calls specialized to be unsynchronized.


Field Summary
private static InvokeeThreadLocalContext context
          Singleton: a single context representing "specialize this method when the invokee of this method is thread-local"
private  OptOptions options
          Controlling compiler options
private  Register reg
          The register to replace
 
Constructor Summary
private UnsyncReplacer(Register r, OptOptions options)
           
 
Method Summary
static UnsyncReplacer getReplacer(Instruction inst, IR ir)
          Generate an instance of this class for a particular instantiation site.
 void transform()
          Perform the transformation
private  void transform(RegisterOperand rop)
          Perform the transformation for a given register appearance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reg

private final Register reg
The register to replace


options

private final OptOptions options
Controlling compiler options


context

private static final InvokeeThreadLocalContext context
Singleton: a single context representing "specialize this method when the invokee of this method is thread-local"

Constructor Detail

UnsyncReplacer

private UnsyncReplacer(Register r,
                       OptOptions options)
Parameters:
r - the register operand target of the allocation
options - controlling compiler options
Method Detail

getReplacer

public static UnsyncReplacer getReplacer(Instruction inst,
                                         IR ir)
Generate an instance of this class for a particular instantiation site.

Parameters:
inst - the allocation site
ir - governing ir
Returns:
the object, or null if illegal

transform

public void transform()
Perform the transformation


transform

private void transform(RegisterOperand rop)
Perform the transformation for a given register appearance

Parameters:
rop - The def or use to check