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