aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/IntermediateRepresentation/PhiNode.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ARMeilleure/IntermediateRepresentation/PhiNode.cs')
-rw-r--r--ARMeilleure/IntermediateRepresentation/PhiNode.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/ARMeilleure/IntermediateRepresentation/PhiNode.cs b/ARMeilleure/IntermediateRepresentation/PhiNode.cs
new file mode 100644
index 00000000..30fc4d38
--- /dev/null
+++ b/ARMeilleure/IntermediateRepresentation/PhiNode.cs
@@ -0,0 +1,22 @@
+namespace ARMeilleure.IntermediateRepresentation
+{
+ class PhiNode : Node
+ {
+ private BasicBlock[] _blocks;
+
+ public PhiNode(Operand destination, int predecessorsCount) : base(destination, predecessorsCount)
+ {
+ _blocks = new BasicBlock[predecessorsCount];
+ }
+
+ public BasicBlock GetBlock(int index)
+ {
+ return _blocks[index];
+ }
+
+ public void SetBlock(int index, BasicBlock block)
+ {
+ _blocks[index] = block;
+ }
+ }
+} \ No newline at end of file