本文整理汇总了C#中System.Collections.BitArray.IntArraySize方法的典型用法代码示例。如果您正苦于以下问题:C# BitArray.IntArraySize方法的具体用法?C# BitArray.IntArraySize怎么用?C# BitArray.IntArraySize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Collections.BitArray
的用法示例。
在下文中一共展示了BitArray.IntArraySize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: doLiveoutSets
private void doLiveoutSets(ProgramBlock<SparcInstruction> start)
{
bool changed = false;
do
{
changed = false;
foreach (var f in start.Functions)
{
if (coloringDone.Contains(f.Name))
continue;
f.VisitBlocks(b =>
{
var gset = genSets[b];
var kset = killSets[b];
var lset = liveoutSets[b];
var newLset = new BitArray(numRegs);
if (!b.IsReturn)
{
foreach (var suc in b.Nexts)
{
var sucKset = killSets[suc as BasicBlock<SparcInstruction>];
var sucGset = genSets[suc as BasicBlock<SparcInstruction>];
var sucLset = liveoutSets[suc as BasicBlock<SparcInstruction>];
var sucSet = new BitArray(numRegs);
//do lset - kset
sucSet.Or(sucLset).Xor(sucKset).And(sucLset);
//do gen union with the above
sucSet.Or(sucGset);
//union with new lset
newLset.Or(sucSet);
}
}
var countingSet = new BitArray(lset);
countingSet.Xor(newLset);
var countArr = new int[countingSet.IntArraySize()];
countingSet.CopyTo(countArr, 0);
for (int i = 0; i < countArr.Length; i++)
{
changed |= countArr[i] != 0;
}
if (changed)
{
liveoutSets[b] = newLset;
}
}, false);
}
}
while (changed);
}