C# 클래스 Reko.Analysis.ValueNumbering

This class is used to compute value numbers of all the SSA variables of a procedure. As a useful side effect, it also detects induction variables, determines their stride &c. This will be useful later when we need to classify arrays.
파일 보기 프로젝트 열기: uxmal/reko 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddNodeInOrder void
AssignValueNumber bool
ClassifyInductionVariable void
DFS Node
ProcessScc void

공개 메소드들

메소드 설명
AssignInitialValueNumbers ( ) : void
Dump ( ) : void
GetDefiningExpression ( Identifier id ) : Expression
GetValueNumber ( Identifier id ) : Expression
Lookup ( Expression expr, Expression>.Dictionary table, Expression lvalue ) : Expression

Looks up the value number of an expression. If it can't be found in the table, the SSA name lvalue is used as a value number. in the table.

ValueNumbering ( SsaIdentifierCollection ssaIds ) : Reko.Core
Write ( System.IO.TextWriter writer ) : void

비공개 메소드들

메소드 설명
AddNodeInOrder ( List al, Node n ) : void
AssignValueNumber ( Node n, Expression>.Dictionary table ) : bool

Assigns a value number to the variable identified by the node 'n'. If the node changes value, we return true.

ClassifyInductionVariable ( List scc ) : void
DFS ( Identifier id ) : Node
ProcessScc ( List scc ) : void

Process a strongly connected component of identifiers and phi- functions. A singleton is easy, we just give it a value number. Loops have to be iterated until they stabilize.

메소드 상세

AssignInitialValueNumbers() 공개 메소드

public AssignInitialValueNumbers ( ) : void
리턴 void

Dump() 공개 메소드

public Dump ( ) : void
리턴 void

GetDefiningExpression() 공개 메소드

public GetDefiningExpression ( Identifier id ) : Expression
id Identifier
리턴 Expression

GetValueNumber() 공개 메소드

public GetValueNumber ( Identifier id ) : Expression
id Identifier
리턴 Expression

Lookup() 공개 메소드

Looks up the value number of an expression. If it can't be found in the table, the SSA name lvalue is used as a value number. in the table.
public Lookup ( Expression expr, Expression>.Dictionary table, Expression lvalue ) : Expression
expr Expression Expression to look for
table Expression>.Dictionary
lvalue Expression
리턴 Expression

ValueNumbering() 공개 메소드

public ValueNumbering ( SsaIdentifierCollection ssaIds ) : Reko.Core
ssaIds SsaIdentifierCollection
리턴 Reko.Core

Write() 공개 메소드

public Write ( System.IO.TextWriter writer ) : void
writer System.IO.TextWriter
리턴 void