[LLVMdev] [LLVMDev] [Question] The TargetRegisterClass has a confusing method.

Jeff Kunkel jdkunk3 at gmail.com
Tue Aug 31 12:26:15 PDT 2010


The method below takes in a register and returns a register. To me this
makes no sense because
when I already have a register, why would I need to get it? Could someone
please explain the
transformation that is happening here?

  /// getRegister - Return the specified register in the class.
  ///
  unsigned getRegister(unsigned i) const {
    assert(i < getNumRegs() && "Register number out of range!");
    return RegsBegin[i];
  }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100831/facf3c3c/attachment.html>


More information about the llvm-dev mailing list