Esempio n. 1
0
 public RloInitExceptionsPass(Compiler compiler, RloMethodBody methodBody)
 {
     m_compiler = compiler;
     m_methodBody = methodBody;
     m_routeCompactionDict = new Dictionary<uint, int>();
     m_terminators = new Dictionary<uint, HighCfgNode>();
 }
Esempio n. 2
0
 public RloFindUseDefsPass(Compiler compiler, RloMethodBody methodBody)
     : base(compiler, methodBody)
 {
     m_uses = new Dictionary<HighSsaRegister, HashSet<ISsaUser>>();
     m_defs = new Dictionary<HighSsaRegister, HashSet<ISsaEmitter>>();
     m_useVisitorDelegate = this.VisitForUses;
     m_defVisitorDelegate = this.VisitForDefs;
 }
Esempio n. 3
0
        public RloInitPass(Compiler compiler, RloMethodBody methodBody, RloFindPredecessorsAndSuccessorsPass psPass)
            : base(compiler, methodBody)
        {
            m_psPass = psPass;
            m_addTypeVisitor = AddSsaTypes;

            TagRepository repo = compiler.TagRepository;

            m_boolType = GetBuiltinType(repo, "System", "Boolean");
            m_charType = GetBuiltinType(repo, "System", "Char");
            m_int8Type = GetBuiltinType(repo, "System", "SByte");
            m_int16Type = GetBuiltinType(repo, "System", "Int16");
            m_int32Type = GetBuiltinType(repo, "System", "Int32");
            m_int64Type = GetBuiltinType(repo, "System", "Int64");
            m_uint8Type = GetBuiltinType(repo, "System", "Byte");
            m_uint16Type = GetBuiltinType(repo, "System", "UInt16");
            m_uint32Type = GetBuiltinType(repo, "System", "UInt32");
            m_uint64Type = GetBuiltinType(repo, "System", "UInt64");
            m_float32Type = GetBuiltinType(repo, "System", "Single");
            m_float64Type = GetBuiltinType(repo, "System", "Double");
            m_nativeIntType = GetBuiltinType(repo, "System", "IntPtr");
            m_nativeUIntType = GetBuiltinType(repo, "System", "UIntPtr");
            m_objectType = GetBuiltinType(repo, "System", "Object");
            m_runtimeTypeHandleType = GetBuiltinType(repo, "System", "RuntimeTypeHandle");
            m_runtimeFieldHandleType = GetBuiltinType(repo, "System", "RuntimeFieldHandle");

            m_simplifiedNumberType = new Dictionary<TypeSpecTag, TypeSpecClassTag>();
            m_simplifiedNumberType.Add(m_boolType, m_int32Type);
            m_simplifiedNumberType.Add(m_charType, m_int32Type);
            m_simplifiedNumberType.Add(m_int8Type, m_int32Type);
            m_simplifiedNumberType.Add(m_int16Type, m_int32Type);
            m_simplifiedNumberType.Add(m_int32Type, m_int32Type);
            m_simplifiedNumberType.Add(m_int64Type, m_int64Type);
            m_simplifiedNumberType.Add(m_uint8Type, m_int32Type);
            m_simplifiedNumberType.Add(m_uint16Type, m_int32Type);
            m_simplifiedNumberType.Add(m_uint32Type, m_int32Type);
            m_simplifiedNumberType.Add(m_uint64Type, m_int64Type);
            m_simplifiedNumberType.Add(m_nativeIntType, m_nativeIntType);
            m_simplifiedNumberType.Add(m_nativeUIntType, m_nativeIntType);
            m_simplifiedNumberType.Add(m_float32Type, m_float64Type);
            m_simplifiedNumberType.Add(m_float64Type, m_float64Type);
        }
Esempio n. 4
0
 public RloReplaceSsaPass(Compiler compiler, RloMethodBody methodBody, IDictionary<HighSsaRegister, HighSsaRegister> replacements)
     : base(compiler, methodBody)
 {
     m_dict = replacements;
     m_visitor = VisitSsa;
 }
 public RloCanonicalizeSsaTypesPass(Compiler compiler, RloMethodBody methodBody)
     : base(compiler, methodBody)
 {
     m_ssaVisitor = VisitSsa;
     m_ssaReplacements = new Dictionary<HighSsaRegister, HighSsaRegister>();
 }
Esempio n. 6
0
 public RloPerNodePass(Compiler compiler, RloMethodBody methodBody)
 {
     m_methodBody = methodBody;
     m_compiler = compiler;
 }