harpoon.Backend.Analysis
Class MakeGCThreadSafe

java.lang.Object
  |
  +--harpoon.Analysis.Tree.Simplification
        |
        +--harpoon.Backend.Analysis.MakeGCThreadSafe

public class MakeGCThreadSafe
extends Simplification

MakeGCThreadSafe adds checks to see whether another thread has caused a GC, and if so, halts the current thread by calling out to the runtime. The check is added to the beginning of each method (after the METHOD node), and to backedges (before JUMPs and CJUMPs that can branch to an earlier node). The purpose of the former is to ensure that all threads halt in a timely manner.

This pass is invoked in harpoon.Main.SAMain.

Version:
$Id: MakeGCThreadSafe.java,v 1.3 2002/02/26 22:43:06 cananian Exp $
Author:
Karen K. Zee <kkz@alum.mit.edu>

Nested Class Summary
 
Nested classes inherited from class harpoon.Analysis.Tree.Simplification
Simplification.Rule
 
Field Summary
 
Fields inherited from class harpoon.Analysis.Tree.Simplification
_ADD, _ALIGN, _AND, _BINOP, _CALL, _CJUMP, _CMPEQ, _CMPGE, _CMPGT, _CMPLE, _CMPLT, _CMPNE, _CONST, _CONST0, _CONST1, _CONSTm1, _CONSTNULL, _DATUM, _DIV, _ESEQ, _EXPR, _JUMP, _LABEL, _MEM, _METHOD, _MOVE, _MUL, _NAME, _NATIVECALL, _OR, _REM, _RETURN, _SEGMENT, _SEQ, _SHL, _SHR, _TEMP, _THROW, _UNOP, _USHR, _XOR
 
Method Summary
static HCodeFactory codeFactory(HCodeFactory parent, Frame f)
          Code factory for adding GC polling calls to a canonical tree.
static List HCE_RULES(Code code, Frame f)
           
 
Methods inherited from class harpoon.Analysis.Tree.Simplification
_KIND, _OP, codeFactory, contains, simplify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

codeFactory

public static HCodeFactory codeFactory(HCodeFactory parent,
                                       Frame f)
Code factory for adding GC polling calls to a canonical tree. Clones the tree before doing optimization in-place. (Stolen from Analysis.Tree.JumpOptimization; it wouldn't have made any sense to subclass.)


HCE_RULES

public static List HCE_RULES(Code code,
                             Frame f)