当前位置: 首页>>代码示例>>C#>>正文


C# SsaIdentifierCollection类代码示例

本文整理汇总了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();
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:7,代码来源:LiveCopyInserter.cs

示例2: Setup

		public void Setup()
		{
			ssaIds = new SsaIdentifierCollection();
            mr = new MockRepository();
            arch = mr.Stub<IProcessorArchitecture>();
            importResolver = mr.Stub<IImportResolver>();
		}
开发者ID:uxmal,项目名称:reko,代码行数:7,代码来源:ValuePropagationTests.cs

示例3: SegmentedAccessClassifier

 public SegmentedAccessClassifier(Procedure proc, SsaIdentifierCollection ssaIds)
 {
     this.proc = proc;
     this.ssaIds = ssaIds;
     assocs = new Dictionary<Identifier,Identifier>();
     consts = new Dictionary<Identifier, Constant>();
 }
开发者ID:nemerle,项目名称:reko,代码行数:7,代码来源:SegmentedAccessClassifier.cs

示例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>();
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:9,代码来源:WebBuilder.cs

示例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);
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:9,代码来源:SsaLiveness.cs

示例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;
        }
开发者ID:relaxar,项目名称:reko,代码行数:11,代码来源:ExpressionSimplifierTests.cs

示例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);
			}
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:11,代码来源:Shl_mul_e_RuleTest.cs

示例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();
 }
开发者ID:killbug2004,项目名称:reko,代码行数:14,代码来源:TrashedRegisterFinder2.cs

示例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());
		}
开发者ID:relaxar,项目名称:reko,代码行数:16,代码来源:OutParameterTransformerTests.cs

示例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);
				}
			}
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:17,代码来源:SsaLiveness.cs

示例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);
            }
        }
开发者ID:nemerle,项目名称:reko,代码行数:21,代码来源:ValueNumbering.cs

示例12: Setup

		public void Setup()
		{
			ssaIds = new SsaIdentifierCollection();
            freg = new FlagRegister("flags", PrimitiveType.Word32);
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:5,代码来源:ConditionCodeEliminatorTests.cs

示例13: Setup

 public void Setup()
 {
     sids = new SsaIdentifierCollection();
 }
开发者ID:gitter-badger,项目名称:reko,代码行数:4,代码来源:StrengthReductionTests.cs

示例14: ConditionCodeEliminator

		public ConditionCodeEliminator(SsaIdentifierCollection ssaIds, IPlatform arch)
		{
			this.ssaIds = ssaIds;
            this.platform = arch;
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:5,代码来源:ConditionCodeEliminator.cs

示例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);
					}
				}
			}
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:23,代码来源:SsaLiveness.cs


注:本文中的SsaIdentifierCollection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。