C# Класс Reko.Analysis.ConditionCodeEliminator

Removes any uses and definitions of condition codes.
Removal of condition codes becomes exciting in situations like the following (x86 code): add ax,bx mov [si],ax jnz foo or cmp ax,0 jl less jg greater

For best performance, preprocess the intermediate code with the ValuePropagator transformer.

Наследование: InstructionTransformer
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ClosureOfUsingStatements ( Reko.Analysis.SsaIdentifier sid, Expression expr, HashSet uses, HashSet aliases ) : HashSet

Computes the close of a web of using statements. The uses hash set will contain all non-trivial uses of the expression.

ComparisonFromConditionCode ( ConditionCode cc, BinaryExpression bin, bool isNegated ) : Expression
ComparisonFromOverflow ( BinaryExpression bin, bool isNegated ) : Expression
ConditionCodeEliminator ( Reko.Analysis.SsaState ssa, IPlatform arch ) : Reko.Core
Negate ( ConditionCode cc ) : ConditionCode
Transform ( ) : void
TransformAssignment ( Assignment a ) : Instruction
UseGrfConditionally ( Reko.Analysis.SsaIdentifier sid, ConditionCode cc ) : Expression
VisitTestCondition ( TestCondition tc ) : Expression

Приватные методы

Метод Описание
CmpExpressionToZero ( Expression e ) : BinaryExpression
IsAddOrSub ( Reko.Core.Operators.Operator op ) : bool
IsCopyWithOptionalCast ( Identifier grf, Reko.Core.Statement stm ) : bool

Returns true if the instruction in the statement is an assignment of the form grf = src or grf = (foo) src

IsLocallyDefinedFlagGroup ( Reko.Analysis.SsaIdentifier sid ) : bool
TransformAddOrSub ( Assignment a, BinaryExpression binUse ) : Instruction
TransformRolC ( Application rolc, Assignment a ) : Instruction
TransformRorC ( Application rorc, Assignment a ) : Instruction
Use ( Expression expr, Reko.Core.Statement stm ) : void

Описание методов

ClosureOfUsingStatements() публичный Метод

Computes the close of a web of using statements. The uses hash set will contain all non-trivial uses of the expression.
public ClosureOfUsingStatements ( Reko.Analysis.SsaIdentifier sid, Expression expr, HashSet uses, HashSet aliases ) : HashSet
sid Reko.Analysis.SsaIdentifier
expr Expression
uses HashSet
aliases HashSet
Результат HashSet

ComparisonFromConditionCode() публичный Метод

public ComparisonFromConditionCode ( ConditionCode cc, BinaryExpression bin, bool isNegated ) : Expression
cc ConditionCode
bin BinaryExpression
isNegated bool
Результат Expression

ComparisonFromOverflow() публичный Метод

public ComparisonFromOverflow ( BinaryExpression bin, bool isNegated ) : Expression
bin BinaryExpression
isNegated bool
Результат Expression

ConditionCodeEliminator() публичный Метод

public ConditionCodeEliminator ( Reko.Analysis.SsaState ssa, IPlatform arch ) : Reko.Core
ssa Reko.Analysis.SsaState
arch IPlatform
Результат Reko.Core

Negate() публичный статический Метод

public static Negate ( ConditionCode cc ) : ConditionCode
cc ConditionCode
Результат ConditionCode

Transform() публичный Метод

public Transform ( ) : void
Результат void

TransformAssignment() публичный Метод

public TransformAssignment ( Assignment a ) : Instruction
a Assignment
Результат Instruction

UseGrfConditionally() публичный Метод

public UseGrfConditionally ( Reko.Analysis.SsaIdentifier sid, ConditionCode cc ) : Expression
sid Reko.Analysis.SsaIdentifier
cc ConditionCode
Результат Expression

VisitTestCondition() публичный Метод

public VisitTestCondition ( TestCondition tc ) : Expression
tc TestCondition
Результат Expression