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.
Показать файл Открыть проект Примеры использования класса

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