public LivenessAnalysis(BaseLivenessAnalysisEnvironment environment, CreateTraceHandler createTrace, bool numberInstructions) { Environment = environment; CreateTrace = createTrace; LiveRanges = new LiveRanges[IndexCount]; for (int i = 0; i < IndexCount; i++) { LiveRanges[i] = new LiveRanges(); } if (numberInstructions) { NumberInstructions(); } TraceNumberInstructions(); CreateExtendedBlocks(); ComputeLocalLiveSets(); ComputeLocalLiveSets(); BuildLiveIntervals(); }
public SparseConditionalConstantPropagation(BasicBlocks basicBlocks, CreateTraceHandler createTrace) { // Method is empty - must be a plugged method if (basicBlocks.HeadBlocks.Count == 0) { return; } CreateTrace = createTrace; BasicBlocks = basicBlocks; variableStates = new Dictionary <Operand, VariableState>(); instructionWorkList = new Stack <InstructionNode>(); blockWorklist = new Stack <BasicBlock>(); phiStatements = new KeyedList <BasicBlock, InstructionNode>(); executedStatements = new HashSet <InstructionNode>(); MainTrace = CreateTrace("SparseConditionalConstantPropagation", 5); blockStates = new bool[BasicBlocks.Count]; for (int i = 0; i < BasicBlocks.Count; i++) { blockStates[i] = false; } // Initialize foreach (var block in BasicBlocks.HeadBlocks) { AddExecutionBlock(block); } foreach (var block in BasicBlocks.HandlerHeadBlocks) { AddExecutionBlock(block); } while (blockWorklist.Count > 0 || instructionWorkList.Count > 0) { ProcessBlocks(); ProcessInstructions(); } DumpTrace(); // Release phiStatements = null; }
public GreedyRegisterAllocator(BasicBlocks basicBlocks, VirtualRegisters virtualRegisters, BaseArchitecture architecture, AddStackLocalDelegate addStackLocal, Operand stackFrame, CreateTraceHandler createTrace) : base(basicBlocks, virtualRegisters, architecture, addStackLocal, stackFrame, createTrace) { }