Aye, I understand it's an index into an array, but what is the difference between the index i and the return value.<div><br></div><div>Do I have to worry that register values from a TargetRegisterClass could be either zero based or some other base? Are there other methods that rely on zero based in the TargetRegisterClass? </div>
<div><br></div><div>I thought register values were "global," but this transformation makes a register value dependent on it's TargetRegisterClass.</div><div><br></div><div>Basically, I find it confusing to have two integer indexes for the same value. </div>
<div><br><br><div class="gmail_quote">On Tue, Aug 31, 2010 at 3:26 PM, Jeff Kunkel <span dir="ltr"><<a href="mailto:jdkunk3@gmail.com">jdkunk3@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The method below takes in a register and returns a register. To me this makes no sense because<div>when I already have a register, why would I need to get it? Could someone please explain the</div><div>transformation that is happening here?<br>

<div><div><div><br></div><div>  /// getRegister - Return the specified register in the class.</div><div>  ///</div><div>  unsigned getRegister(unsigned i) const {</div><div>    assert(i < getNumRegs() && "Register number out of range!");</div>

<div>    return RegsBegin[i];</div><div>  }</div></div><div><br></div><div><br></div></div></div>
</blockquote></div><br></div>