本文整理汇总了C#中SsaIdentifierCollection类的典型用法代码示例。如果您正苦于以下问题:C# SsaIdentifierCollection类的具体用法?C# SsaIdentifierCollection怎么用?C# SsaIdentifierCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SsaIdentifierCollection类属于命名空间,在下文中一共展示了SsaIdentifierCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LiveCopyInserter
public LiveCopyInserter(Procedure proc, SsaIdentifierCollection ssaIds)
{
this.proc = proc;
this.ssaIds = ssaIds;
this.sla = new SsaLivenessAnalysis(proc, ssaIds);
this.doms = proc.CreateBlockDominatorGraph();
}
示例2: Setup
public void Setup()
{
ssaIds = new SsaIdentifierCollection();
mr = new MockRepository();
arch = mr.Stub<IProcessorArchitecture>();
importResolver = mr.Stub<IImportResolver>();
}
示例3: SegmentedAccessClassifier
public SegmentedAccessClassifier(Procedure proc, SsaIdentifierCollection ssaIds)
{
this.proc = proc;
this.ssaIds = ssaIds;
assocs = new Dictionary<Identifier,Identifier>();
consts = new Dictionary<Identifier, Constant>();
}
示例4: WebBuilder
public WebBuilder(Procedure proc, SsaIdentifierCollection ssaIds, Dictionary<Identifier,LinearInductionVariable> ivs)
{
this.proc = proc;
this.ssaIds = ssaIds;
this.ivs = ivs;
this.sla = new SsaLivenessAnalysis(proc, ssaIds);
this.doms = proc.CreateBlockDominatorGraph();
this.webs = new List<Web>();
}
示例5: SsaLivenessAnalysis
public SsaLivenessAnalysis(Procedure proc, SsaIdentifierCollection ssaIds)
{
this.proc = proc;
this.ssaIds = ssaIds;
this.visited = new HashSet<Block>();
BuildRecords(proc.ControlGraph.Blocks);
BuildDefinedMap(ssaIds);
BuildInterferenceGraph(ssaIds);
}
示例6: BuildSsaIdentifiers
private SsaIdentifierCollection BuildSsaIdentifiers()
{
var mrFoo = new RegisterStorage("foo", 1, 0, PrimitiveType.Word32);
var mrBar = new RegisterStorage("bar", 2, 1, PrimitiveType.Word32);
foo = new Identifier(mrFoo.Name, mrFoo.DataType, mrFoo);
var coll = new SsaIdentifierCollection();
var src = Constant.Word32(1);
foo = coll.Add(foo, new Statement(0, new Assignment(foo, src), null), src, false).Identifier;
return coll;
}
示例7: SetUp
public void SetUp()
{
m = new ProcedureBuilder();
id = m.Local32("id");
x = m.Local32("x");
ssaIds = new SsaIdentifierCollection();
foreach (Identifier i in m.Procedure.Frame.Identifiers)
{
ssaIds.Add(i, null, null, false);
}
}
示例8: TrashedRegisterFinder2
public TrashedRegisterFinder2(
IProcessorArchitecture arch,
ProgramDataFlow flow,
Procedure proc,
SsaIdentifierCollection ssa,
DecompilerEventListener listener)
{
this.arch = arch;
this.progFlow = flow;
this.proc = proc;
this.ssa = ssa;
this.decompilerEventListener = listener;
this.flow = new ProcedureFlow2();
}
示例9: OutpReplaceSimple
public void OutpReplaceSimple()
{
var m = new ProcedureBuilder();
m.Label("block");
var foo = new Identifier("foo", PrimitiveType.Word32, null);
var pfoo = new Identifier("pfoo", PrimitiveType.Pointer32, null);
m.Assign(foo, 3);
var sid = new SsaIdentifier(foo, foo, m.Block.Statements.Last, null, false);
var ssaIds = new SsaIdentifierCollection { { foo, sid } };
var opt = new OutParameterTransformer(null, ssaIds);
opt.ReplaceDefinitionsWithOutParameter(foo, pfoo);
Assert.AreEqual("*pfoo = 0x00000003", m.Block.Statements[0].ToString());
}
示例10: BuildDefinedMap
public void BuildDefinedMap(SsaIdentifierCollection ssaIds)
{
defined = new Dictionary<Statement,List<Identifier>>();
foreach (SsaIdentifier ssa in ssaIds)
{
if (ssa.Uses.Count > 0 && ssa.DefStatement != null)
{
List<Identifier> al;
if (!defined.TryGetValue(ssa.DefStatement, out al))
{
al = new List<Identifier>();
defined.Add(ssa.DefStatement, al);
}
al.Add(ssa.Identifier);
}
}
}
示例11: ValueNumbering
public ValueNumbering(SsaIdentifierCollection ssaIds)
{
this.ssaIds = ssaIds;
optimistic = new Dictionary<Expression, Expression>();
valid = new Dictionary<Expression,Expression>();
stack = new Stack<Node>();
// Set initial value numbers for all nodes (SSA identifiers).
// Value numbers for the original values at procedure entry are just the
// SSA identifiers, while any other values are undefined.
AssignInitialValueNumbers();
// Walk the SCC's of the node graph using Tarjan's algorithm.
iDFS = 0;
foreach (var id in nodes.Keys)
{
DFS(id);
}
}
示例12: Setup
public void Setup()
{
ssaIds = new SsaIdentifierCollection();
freg = new FlagRegister("flags", PrimitiveType.Word32);
}
示例13: Setup
public void Setup()
{
sids = new SsaIdentifierCollection();
}
示例14: ConditionCodeEliminator
public ConditionCodeEliminator(SsaIdentifierCollection ssaIds, IPlatform arch)
{
this.ssaIds = ssaIds;
this.platform = arch;
}
示例15: BuildInterferenceGraph
public void BuildInterferenceGraph(SsaIdentifierCollection ssaIds)
{
interference = new InterferenceGraph();
foreach (SsaIdentifier v in ssaIds)
{
visited = new HashSet<Block>();
foreach (Statement s in v.Uses)
{
PhiFunction phi = GetPhiFunction(s);
if (phi != null)
{
int i = Array.IndexOf(phi.Arguments, v.Identifier);
Block p = s.Block.Pred[i];
LiveOutAtBlock(p, v);
}
else
{
int i = s.Block.Statements.IndexOf(s);
LiveInAtStatement(s.Block, i, v);
}
}
}
}