本文整理汇总了C#中Mosa.Compiler.Framework.RegisterAllocator.SlotIndex.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# SlotIndex.ToString方法的具体用法?C# SlotIndex.ToString怎么用?C# SlotIndex.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mosa.Compiler.Framework.RegisterAllocator.SlotIndex
的用法示例。
在下文中一共展示了SlotIndex.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetLowOptimalSplitLocation
private SlotIndex GetLowOptimalSplitLocation(LiveInterval liveInterval, SlotIndex from, bool check)
{
Debug.Assert(liveInterval.Start != from);
if (trace.Active) trace.Log("--Low Splitting: " + liveInterval.ToString() + " move: " + from.ToString());
if (check)
{
if (liveInterval.UsePositions.Contains(from) || liveInterval.DefPositions.Contains(from))
{
if (trace.Active) trace.Log(" No optimal. Split move: " + from.ToString());
return from;
}
}
SlotIndex blockStart = GetBlockStart(from);
if (trace.Active) trace.Log(" Block Start : " + blockStart.ToString());
SlotIndex lowerBound = blockStart > liveInterval.Start ? blockStart : liveInterval.Start.Next;
if (trace.Active) trace.Log(" Lower Bound : " + lowerBound.ToString());
SlotIndex previousUse = liveInterval.GetPreviousDefOrUsePosition(from);
if (trace.Active) trace.Log(" Previous Use: " + (previousUse != null ? previousUse.ToString() : "null"));
if (previousUse != null && previousUse >= lowerBound)
{
if (trace.Active) trace.Log(" Low Optimal : " + previousUse.Next.ToString());
return previousUse.Next;
}
if (trace.Active) trace.Log(" Low Optimal : " + lowerBound.ToString());
return lowerBound;
}
示例2: GetUpperOptimalSplitLocation
private SlotIndex GetUpperOptimalSplitLocation(LiveInterval liveInterval, SlotIndex at)
{
if (Trace.Active) Trace.Log("--High Splitting: " + liveInterval.ToString() + " move: " + at.ToString());
var a = liveInterval.End;
var blockEnd = GetBlockEnd(at);
var b = blockEnd > liveInterval.End ? blockEnd : null;
if (Trace.Active) Trace.Log(" Block End : " + (b != null ? b.ToString() : "null"));
var c = liveInterval.LiveRange.GetNextUsePosition(at);
if (c != null && c.HalfStepBack > at)
c = c.HalfStepBack;
if (Trace.Active) Trace.Log(" Next Use : " + (c != null ? c.ToString() : "null"));
var d = liveInterval.LiveRange.GetNextDefPosition(at);
if (Trace.Active) Trace.Log(" Next Def : " + (d != null ? d.ToString() : "null"));
var min = GetMinimum(a, b, c, d);
if (Trace.Active) Trace.Log(" High Optimal : " + min.ToString());
return min;
}
示例3: GetHighOptimalSplitLocation
private SlotIndex GetHighOptimalSplitLocation(LiveInterval liveInterval, SlotIndex after, bool check)
{
Debug.Assert(liveInterval.End != after);
if (trace.Active) trace.Log("--High Splitting: " + liveInterval.ToString() + " move: " + after.ToString());
SlotIndex blockEnd = GetBlockEnd(after);
if (trace.Active) trace.Log(" Block End : " + blockEnd.ToString());
SlotIndex higherBound = blockEnd < liveInterval.End ? blockEnd : liveInterval.End.Previous;
if (trace.Active) trace.Log(" Higher Bound: " + higherBound.ToString());
SlotIndex nextUse = liveInterval.GetNextDefOrUsePosition(after);
if (trace.Active) trace.Log(" Next Use : " + (nextUse != null ? nextUse.ToString() : "null"));
if (nextUse != null && nextUse <= higherBound)
{
if (trace.Active) trace.Log(" High Optimal: " + nextUse.Previous.ToString());
return nextUse;
}
if (trace.Active) trace.Log(" High Optimal: " + higherBound.ToString());
return higherBound;
}
示例4: GetLowerOptimalSplitLocation
private SlotIndex GetLowerOptimalSplitLocation(LiveInterval liveInterval, SlotIndex at)
{
if (Trace.Active) Trace.Log("--Low Splitting: " + liveInterval.ToString() + " move: " + at.ToString());
//a = liveInterval.Start.IsOnHalfStep ? liveInterval.Start : liveInterval.Start.HalfStepForward;
var a = liveInterval.Start;
var blockStart = GetBlockStart(at);
var b = blockStart > liveInterval.Start ? blockStart : null;
if (Trace.Active) Trace.Log(" Block Start : " + (b != null ? b.ToString() : "null"));
var c = liveInterval.LiveRange.GetPreviousUsePosition(at);
if (c != null && c.HalfStepForward <= at)
c = c.HalfStepForward;
if (Trace.Active) Trace.Log(" Previous Use : " + (c != null ? c.ToString() : "null"));
var d = liveInterval.LiveRange.GetPreviousDefPosition(at);
if (d != null && d.HalfStepForward <= at)
d = d.HalfStepForward;
if (Trace.Active) Trace.Log(" Previous Def : " + (d != null ? d.ToString() : "null"));
var max = GetMaximum(a, b, c, d);
if (Trace.Active) Trace.Log(" Low Optimal : " + max.ToString());
return max;
}