1   // Copyright 2013 Bill Campbell, Swami Iyer and Bahar Akbal-Delibas
2   
3   package jminusminus;
4   
5   import java.util.ArrayList;
6   
7   /**
8    * Implements register allocation using graph coloring algorithm.
9    */
10  
11  public class NGraphRegisterAllocator extends NRegisterAllocator {
12  
13      /**
14       * Construct a NGraphRegisterAllocator.
15       * 
16       * @param cfg
17       *            an instance of a control flow graph.
18       */
19  
20      public NGraphRegisterAllocator(NControlFlowGraph cfg) {
21          super(cfg);
22      }
23  
24      /**
25       * Build intervals with register allocation information in them.
26       */
27  
28      public void allocation() {
29          buildIntervals();
30      }
31  
32  }
33