aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/IntermediateRepresentation/BasicBlock.cs
diff options
context:
space:
mode:
authorFICTURE7 <FICTURE7@gmail.com>2020-09-20 03:00:24 +0400
committerGitHub <noreply@github.com>2020-09-19 20:00:24 -0300
commitf60033e0aaf546d7f56a4925b5aeec76709fb851 (patch)
treeaf6585403754a771dbab824b1739322ef04b3cd8 /ARMeilleure/IntermediateRepresentation/BasicBlock.cs
parent1eea35554c7505dbf521cf9f3cfeeaa0fc7e916f (diff)
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
Diffstat (limited to 'ARMeilleure/IntermediateRepresentation/BasicBlock.cs')
-rw-r--r--ARMeilleure/IntermediateRepresentation/BasicBlock.cs6
1 files changed, 5 insertions, 1 deletions
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<BasicBlock>
{
- private readonly List<BasicBlock> _successors = new List<BasicBlock>();
+ private readonly List<BasicBlock> _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<BasicBlock>();
+
Operations = new IntrusiveList<Node>();
Predecessors = new List<BasicBlock>();
DominanceFrontiers = new HashSet<BasicBlock>();