1   // Copyright 2012- Bill Campbell, Swami Iyer and Bahar Akbal-Delibas
2   
3   package jminusminus;
4   
5   /**
6    * Implements register allocation using graph coloring algorithm.
7    */
8   public class NGraphRegisterAllocator extends NRegisterAllocator {
9       /**
10       * Constructs an NGraphRegisterAllocator object.
11       *
12       * @param cfg an instance of a control flow graph.
13       */
14      public NGraphRegisterAllocator(NControlFlowGraph cfg) {
15          super(cfg);
16      }
17  
18      /**
19       * {@inheritDoc}
20       */
21      public void allocation() {
22          buildIntervals();
23      }
24  }
25