• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SsaIdentifierCollection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SsaIdentifierCollection的典型用法代码示例。如果您正苦于以下问题:C# SsaIdentifierCollection类的具体用法?C# SsaIdentifierCollection怎么用?C# SsaIdentifierCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SsaIdentifierCollection类属于命名空间,在下文中一共展示了SsaIdentifierCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: SsaLivenessAnalysis2

		public SsaLivenessAnalysis2(Procedure proc, SsaIdentifierCollection ssa)
		{
			this.ssa = ssa;
            visitedBlocks = new Dictionary<Block, Block>();
			interference = new InterferenceGraph();
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:6,代码来源:SsaLiveness.cs


示例17: OutpReplacePhi

        public void OutpReplacePhi()
        {
            var m = new ProcedureBuilder();
            var foo = new Identifier("foo", PrimitiveType.Word32, null);
            var foo1 = new Identifier("foo1", PrimitiveType.Word32, null);
            var foo2 = new Identifier("foo2", PrimitiveType.Word32, null);
            var foo3 = new Identifier("foo3", PrimitiveType.Word32, null);
            var pfoo = new Identifier("pfoo", PrimitiveType.Pointer32, null);

            Block block1 = m.Label("block1");
             m.Assign(foo1, Constant.Word32(1));
             Statement stmFoo1 = m.Block.Statements.Last;
            Block block2 = m.Label("block2");
            m.Assign(foo2, Constant.Word32(2));
            Statement stmFoo2 = m.Block.Statements.Last;
            Block block3 = m.Label("block3");
            Statement stmFoo3 = m.Phi(foo3, foo1, foo2);

            SsaIdentifierCollection ssaIds = new SsaIdentifierCollection();
            ssaIds.Add(foo1, new SsaIdentifier(foo1, foo, stmFoo1, null, false));
            ssaIds.Add(foo2, new SsaIdentifier(foo2, foo, stmFoo2, null, false));
            ssaIds.Add(foo3, new SsaIdentifier(foo3, foo, stmFoo3, null, false));

            OutParameterTransformer opt = new OutParameterTransformer(null, ssaIds);
            opt.ReplaceDefinitionsWithOutParameter(foo3, pfoo);

            Assert.AreEqual("*pfoo = 0x00000001", stmFoo1.Instruction.ToString());
            Assert.AreEqual("*pfoo = 0x00000002", stmFoo2.Instruction.ToString());
            Assert.AreEqual("foo3 = PHI(foo1, foo2)", stmFoo3.Instruction.ToString());
        }
开发者ID:nemerle,项目名称:reko,代码行数:30,代码来源:OutParameterTransformerTests.cs


示例18: SsaState

		public SsaState(Procedure proc, DominatorGraph<Block> domGraph)
		{
			this.Procedure = proc;
            this.DomGraph = domGraph;
			this.ids = new SsaIdentifierCollection();
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:6,代码来源:SsaState.cs


示例19: OutParameterTransformer

		public OutParameterTransformer(Procedure proc, SsaIdentifierCollection ssaIds)
		{
			this.proc = proc;
			this.ssaIds = ssaIds;
		}
开发者ID:killbug2004,项目名称:reko,代码行数:5,代码来源:OutParameterTransformer.cs


示例20: OutpReplaceManyUses

        public void OutpReplaceManyUses()
        {
            ProcedureBuilder m = new ProcedureBuilder();
            Identifier foo = new Identifier("foo", PrimitiveType.Word32, null);
            Identifier bar = new Identifier("bar", PrimitiveType.Word32, null);
            Identifier pfoo = new Identifier("pfoo", PrimitiveType.Pointer32, null);

            Block block = m.Label("block");
            m.Assign(foo, 1);
            Statement stmFoo = m.Block.Statements.Last;
            m.Assign(bar, foo);
            Statement stmBar = m.Block.Statements.Last;

            SsaIdentifier ssaFoo = new SsaIdentifier(foo, foo, stmFoo, ((Assignment) stmFoo.Instruction).Src, false);
            ssaFoo.Uses.Add(stmBar);
            SsaIdentifier ssaBar = new SsaIdentifier(bar, bar, stmBar, ((Assignment) stmBar.Instruction).Src, false);

            SsaIdentifierCollection ssaIds = new SsaIdentifierCollection();
            ssaIds.Add(foo, ssaFoo);
            ssaIds.Add(bar, ssaBar);

            OutParameterTransformer opt = new OutParameterTransformer(m.Procedure, ssaIds);
            opt.ReplaceDefinitionsWithOutParameter(foo, pfoo);
            Assert.AreEqual(3, block.Statements.Count);
            Assert.AreEqual("foo = 0x00000001", block.Statements[0].Instruction.ToString());
            Assert.AreEqual("*pfoo = foo", block.Statements[1].Instruction.ToString());
            Assert.AreEqual("bar = foo", block.Statements[2].Instruction.ToString());
        }
开发者ID:nemerle,项目名称:reko,代码行数:28,代码来源:OutParameterTransformerTests.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SshClient类代码示例发布时间:2022-05-24
下一篇:
C# SrmDocument类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap