Mosa.Compiler.Framework.RegisterAllocator.GreedyRegisterAllocator.CalculateSpillCost C# (CSharp) Method

CalculateSpillCost() protected method

protected CalculateSpillCost ( LiveInterval liveInterval ) : void
liveInterval LiveInterval
return void
        protected override void CalculateSpillCost(LiveInterval liveInterval)
        {
            int spillvalue = 0;

            foreach (var use in liveInterval.UsePositions)
            {
                spillvalue += GetSpillCost(use, 100);
            }

            foreach (var use in liveInterval.DefPositions)
            {
                spillvalue += GetSpillCost(use, 115);
            }

            liveInterval.SpillValue = spillvalue;
        }