From f60033e0aaf546d7f56a4925b5aeec76709fb851 Mon Sep 17 00:00:00 2001 From: FICTURE7 Date: Sun, 20 Sep 2020 03:00:24 +0400 Subject: Implement block placement (#1549) * Implement block placement Implement a simple pass which re-orders cold blocks at the end of the list of blocks in the CFG. * Set PPTC version * Use Array.Resize Address gdkchan's feedback --- ARMeilleure/IntermediateRepresentation/BasicBlock.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ARMeilleure/IntermediateRepresentation/BasicBlock.cs') diff --git a/ARMeilleure/IntermediateRepresentation/BasicBlock.cs b/ARMeilleure/IntermediateRepresentation/BasicBlock.cs index 640978fe..056a9d46 100644 --- a/ARMeilleure/IntermediateRepresentation/BasicBlock.cs +++ b/ARMeilleure/IntermediateRepresentation/BasicBlock.cs @@ -5,10 +5,12 @@ namespace ARMeilleure.IntermediateRepresentation { class BasicBlock : IIntrusiveListNode { - private readonly List _successors = new List(); + private readonly List _successors; public int Index { get; set; } + public BasicBlockFrequency Frequency { get; set; } + public BasicBlock ListPrevious { get; set; } public BasicBlock ListNext { get; set; } @@ -25,6 +27,8 @@ namespace ARMeilleure.IntermediateRepresentation public BasicBlock(int index) { + _successors = new List(); + Operations = new IntrusiveList(); Predecessors = new List(); DominanceFrontiers = new HashSet(); -- cgit v1.2.3