aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/IntermediateRepresentation/PhiNode.cs
blob: 30fc4d384c34bf5b9bcad464314915b10184614e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
        }
    }
}