title: Graph coloring register allocator
body: <p>For my compiler course I'm building a register allocator based on graph coloring for MIPS architecture. I'm following Muchnick's treatment on the same for my implementation.</p>
  
  <p>Muchnick has been a little fuzzy about how to treat arguments of function in these allocators.</p>
  
  <p>I've made a few assumptions and thought I'd clarify the same. </p>
  
  <ol>
  <li>There is this step to convert to lower level IR from middle level IR. Nested function calls have not been handled. My idea is to scan the function call from right to left and lay down IRs for the innermost calls outward. This way I can use the MIPS calling convention of assigning the first few arguments to argument registers and the remaining to stack with minimum amount of spills (just 1).</li>
  <li>Register coalescing treatment in the book is not intuitive to me since it does not address how the LIR code of moving function arguments to fixed argument registers are handled. After much deliberation I've come to the conclusion that I should not do register coalescing for argument passing moves. </li>
  </ol>
  
  <p>Feedback/thoughts on these assumptions immensely appreciated.</p>