This is a variant of scavengeRegister() that works for
enterBasicBlockEnd()/backward(). The benefit of the backward mode is
that it is not affected by incomplete kill flags.
This patch also changes
PrologEpilogInserter::doScavengeFrameVirtualRegs() to use the register
scavenger in backwards mode.
This patch is a big step towards being independent of kill flags.
Could you be explicit about what the range is here?
I'm guessing To is before this->MBBI and that "inclusive" only applies to both, so the range would be [To, this->MBBI] (i.e. neither To nor this->MBBI may clobber the register).