Esempio n. 1
0
        public static bool hasPerformanceData(this PerfData pd, Intrinsic i)
        {
            if (Debugger.IsAttached && i.name == "_mm256_extractf128_si256")
            {
                Debugger.Break();
            }

            if (null == i.instruction)
            {
                return(false);
            }
            var data = pd.lookup(i.instruction.name);

            if (null == data)
            {
                return(false);
            }
            eRegSize regSize = i.regSize();

            if (regSize == eRegSize.None)
            {
                return(false);
            }
            return(true);
            // return data.Any( ii => ii.match( regSize ) );
        }
Esempio n. 2
0
        public static IEnumerable <PerfData.Instruction> table(this PerfData pd, Intrinsic intr)
        {
            // if( intr.name == "_mm256_sad_epu8" && Debugger.IsAttached ) Debugger.Break();	// Break on building the perf.table for "_mm256_sad_epu8" intrinsic

            if (null == intr.instruction)
            {
                return(null);
            }
            IEnumerable <PerfData.Instruction> data = pd.lookup(intr.instruction.name);

            if (null == data)
            {
                return(null);
            }
            eRegSize regSize = intr.regSize();

            return(pickBestPerArch(data, regSize));
        }