コード例 #1
0
        public virtual void Schedule <T>(ControlFlowGraph <T> cfg, SchedulingConstraints constraints, ISchedulingAdapter <T> scha) where T : Analysis.IInstruction
        {
            var  endTimes = new Queue <long>();
            long cur      = long.MaxValue - 1;

            foreach (var bb in cfg.BasicBlocks)
            {
                if (bb.IsExitBlock)
                {
                    break;
                }

                constraints.EndTime = cur;
                Schedule(bb.Range, scha, constraints);
                endTimes.Enqueue(constraints.EndTime - constraints.StartTime);
            }
            scha.ClearSchedule();
            constraints.EndTime = 0;
            foreach (var bb in cfg.BasicBlocks)
            {
                if (bb.IsExitBlock)
                {
                    break;
                }

                constraints.EndTime += endTimes.Dequeue();
                Schedule(bb.Range, scha, constraints);
            }
        }
コード例 #2
0
 public void ClearSchedule()
 {
     _scha.ClearSchedule();
 }