public virtual bool Optimize( out InstructionGraph instructionGraph, out RegisterAssignment registerAssignment, out InstructionSchedule instructionSchedule) { return selector.Optimize(out instructionGraph, out registerAssignment, out instructionSchedule); }
public virtual object Clone() { RegisterAssignment clone = new RegisterAssignment(); foreach (ValueNode val in registers.Keys) clone.registers[val] = registers[val]; return clone; }
public virtual RegisterAssignment Clone(IDictionary valueMap) { RegisterAssignment clone = new RegisterAssignment(); foreach (ValueNode val in registers.Keys) { ValueNode cloneVal = (ValueNode) valueMap[val]; clone.registers[cloneVal] = registers[val]; } return clone; }
public virtual bool Optimize( out InstructionGraph instructionGraph, out RegisterAssignment registerAssignment, out InstructionSchedule instructionSchedule) { Run(); if (Done != null) Done(this); if (BestGenome.IsValid) { instructionGraph = BestGenome.InstructionGraph; registerAssignment = BestGenome.RegisterAssignment; instructionSchedule = BestGenome.InstructionSchedule; return true; } else { instructionGraph = null; instructionSchedule = null; registerAssignment = null; return false; } }
public AssemblyGenerator(RegisterAssignment registerAssignment) { this.registerAssignment = registerAssignment; }
public virtual bool Optimize( out RegisterAssignment registerAssignment, out InstructionSchedule instructionSchedule) { Run(); if (Done != null) Done(this); registerAssignment = BestGenome.GetRegisterAssignment(); instructionSchedule = BestGenome.GetInstructionSchedule(); return BestGenome.IsValid; }
public virtual void Initialize() { IDictionary valueInitialized = new Hashtable(); foreach (ValueNode val in ValueNodes) valueInitialized[val] = false; foreach (ValueNode val in ProgramGraph.OutputValues) InitializeValue(val, valueInitialized); instructionSchedule = null; registerAssignment = null; instructionGraph = null; /* bestSchedulingGenome = null; */ }
public virtual void Copy(IGenome otherGenome) { SelectionGenome other = (SelectionGenome) otherGenome; population = other.population; isValid = other.isValid; modified = other.modified; objective = other.objective; if (other.instructionGraph != null) { IDictionary instructionMap; IDictionary valueMap; instructionGraph = other.instructionGraph.Clone( out instructionMap, out valueMap); if (other.registerAssignment != null && other.instructionSchedule != null) { registerAssignment = other.registerAssignment.Clone(valueMap); instructionSchedule = other.instructionSchedule.Clone(instructionMap); /* bestSchedulingGenome = other.bestSchedulingGenome.Clone( instructionMap, valueMap); */ } else { registerAssignment = null; instructionSchedule = null; /* bestSchedulingGenome = null; */ } } else { instructionGraph = null; } foreach (OperationNode op in OperationNodes) selection[op] = other.selection[op]; }
public virtual RegisterAssignment GetRegisterAssignment() { RegisterAssignment registerAssignment = new RegisterAssignment(); foreach (ValueNode rValue in RegisterValues) registerAssignment[rValue] = GetValueInfo(rValue).Register; return registerAssignment; }