coins.backend.gen
クラス CodeGenerator.Match

java.lang.Object
  |
  +--coins.backend.gen.CodeGenerator.Match
含まれているクラス:
CodeGenerator

class CodeGenerator.Match
extends java.lang.Object

Node of matching tree (or DAG)


フィールドの概要
(パッケージプライベート)  int cost1
          cost
(パッケージプライベート)  int cost2
          cost
(パッケージプライベート)  LirNode dest
          Destination register variable node.
(パッケージプライベート)  java.util.Map genLabelTbl
          Label table.
(パッケージプライベート)  CodeGenerator.Match[] kid
          Direct children of this operator.
(パッケージプライベート)  int[] order
          Code generation order.
(パッケージプライベート)  LirNode orig
          Original LIR operator being matched.
(パッケージプライベート)  CodeGenerator.Match[] rLeaf
          Place of leaf nodes in the rule.
(パッケージプライベート)  int[] rLeafIndex
           
(パッケージプライベート)  Rule rule
          The rule best-matched.
(パッケージプライベート)  LirNode[] src
          Source register variable nodes.
(パッケージプライベート)  CodeGenerator.Match[] subtrees
          Root of subinstruction tree.
(パッケージプライベート)  int suNumber
          Sethi-Ullman number.
(パッケージプライベート)  CodeGenerator.Match[] tLeaf
          Place of leaf node in the output instruction tree.
(パッケージプライベート)  int[] tLeafIndex
           
 
コンストラクタの概要
(パッケージプライベート) CodeGenerator.Match(LirNode orig, CodeGenerator.Match[] kid, Rule rule, int cost1, int cost2)
          Create match object.
 
メソッドの概要
(パッケージプライベート)  void allocTemp(LirNode required, java.lang.String regset)
          Assign destination register variable.
(パッケージプライベート)  void decompLir(BiList list)
          Generate decomposed LIR from match tree.
(パッケージプライベート)  void generateDecomposed(BiList list)
          Decompose original LIR tree.
(パッケージプライベート)  boolean hasCode()
          Return true if this node has assembler code to be generated.
(パッケージプライベート)  boolean isCheaperThan(CodeGenerator.Match x)
          Return true if this match is cheaper than x
(パッケージプライベート)  boolean isCore()
          Return true if this node is the root of a instruction tree.
(パッケージプライベート)  boolean isDerived()
          Return true if this node is derived rule.
(パッケージプライベート)  void printIt(java.io.PrintWriter out)
          Print contents of Match instance on Stream out for debugging.
(パッケージプライベート)  ImList quiltCode()
          Generate assembler in ImList form.
(パッケージプライベート)  CodeGenerator.Match removeSet(boolean pass1)
          Remove SET operation if possible.
(パッケージプライベート)  void scheduleBySuNumber()
          Compute Sethi-Ullman number and reorder instructions.
(パッケージプライベート)  CodeGenerator.Match skipNonOpRules()
          Skip non-operational rules at root.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

orig

LirNode orig
Original LIR operator being matched.


rule

Rule rule
The rule best-matched.


cost1

int cost1
cost


cost2

int cost2
cost


dest

LirNode dest
Destination register variable node.


src

LirNode[] src
Source register variable nodes.


kid

CodeGenerator.Match[] kid
Direct children of this operator. e.g. (SUB I32 kid[0] kid[1])


rLeaf

CodeGenerator.Match[] rLeaf
Place of leaf nodes in the rule. e.g. at rule (SUB I32 _ (MEM I32 _)), rLeaf[0]=this, rLeafIndex[0]=0, rLeaf[1]=kid[1], rLeafIndex[1]=0


rLeafIndex

int[] rLeafIndex

tLeaf

CodeGenerator.Match[] tLeaf
Place of leaf node in the output instruction tree. e.g. at tree (SUB I32 _ (MEM I32 (ADD I32 _ _))), tLeaf[0]=this, tLeafIndex[0]=0, tLeaf[1]=kid[1].kid[0], tLeafIndex[1]=0 tLeaf[2]=kid[1].kid[0], tLeafIndex[2]=1


tLeafIndex

int[] tLeafIndex

subtrees

CodeGenerator.Match[] subtrees
Root of subinstruction tree.


suNumber

int suNumber
Sethi-Ullman number.


order

int[] order
Code generation order.


genLabelTbl

java.util.Map genLabelTbl
Label table.

コンストラクタの詳細

CodeGenerator.Match

CodeGenerator.Match(LirNode orig,
                    CodeGenerator.Match[] kid,
                    Rule rule,
                    int cost1,
                    int cost2)
Create match object.

メソッドの詳細

printIt

void printIt(java.io.PrintWriter out)
Print contents of Match instance on Stream out for debugging.


hasCode

boolean hasCode()
Return true if this node has assembler code to be generated.


isCore

boolean isCore()
Return true if this node is the root of a instruction tree.


isDerived

boolean isDerived()
Return true if this node is derived rule.


isCheaperThan

boolean isCheaperThan(CodeGenerator.Match x)
Return true if this match is cheaper than x


removeSet

CodeGenerator.Match removeSet(boolean pass1)
Remove SET operation if possible.


allocTemp

void allocTemp(LirNode required,
               java.lang.String regset)
Assign destination register variable.


scheduleBySuNumber

void scheduleBySuNumber()
Compute Sethi-Ullman number and reorder instructions.


generateDecomposed

void generateDecomposed(BiList list)
Decompose original LIR tree.


decompLir

void decompLir(BiList list)
Generate decomposed LIR from match tree.


skipNonOpRules

CodeGenerator.Match skipNonOpRules()
Skip non-operational rules at root.


quiltCode

ImList quiltCode()
Generate assembler in ImList form.