[llvm-commits] [llvm] r43249 - in /llvm/trunk: include/llvm/Target/MRegisterInfo.h lib/CodeGen/LowerSubregs.cpp
Evan Cheng
evan.cheng at apple.com
Mon Oct 22 23:51:51 PDT 2007
Author: evancheng
Date: Tue Oct 23 01:51:50 2007
New Revision: 43249
URL: http://llvm.org/viewvc/llvm-project?rev=43249&view=rev
Log:
isSubRegOf() is a dup of isSubRegister.
Modified:
llvm/trunk/include/llvm/Target/MRegisterInfo.h
llvm/trunk/lib/CodeGen/LowerSubregs.cpp
Modified: llvm/trunk/include/llvm/Target/MRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/MRegisterInfo.h?rev=43249&r1=43248&r2=43249&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/MRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/Target/MRegisterInfo.h Tue Oct 23 01:51:50 2007
@@ -375,17 +375,6 @@
return get(RegNo).SuperRegs;
}
- /// isSubRegOf - Predicate which returns true if RegA is a sub-register of
- /// RegB. Returns false otherwise.
- ///
- bool isSubRegOf(unsigned RegA, unsigned RegB) const {
- const TargetRegisterDesc &RD = (*this)[RegA];
- for (const unsigned *reg = RD.SuperRegs; *reg != 0; ++reg)
- if (*reg == RegB)
- return true;
- return false;
- }
-
/// getName - Return the symbolic target specific name for the specified
/// physical register.
const char *getName(unsigned RegNo) const {
Modified: llvm/trunk/lib/CodeGen/LowerSubregs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LowerSubregs.cpp?rev=43249&r1=43248&r2=43249&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LowerSubregs.cpp (original)
+++ llvm/trunk/lib/CodeGen/LowerSubregs.cpp Tue Oct 23 01:51:50 2007
@@ -146,7 +146,7 @@
// of the destination, we copy the subreg into the source
// However, this is only safe if the insert instruction is the kill
// of the source register
- bool revCopyOrder = MRI.isSubRegOf(InsReg, DstReg);
+ bool revCopyOrder = MRI.isSubRegister(DstReg, InsReg);
if (revCopyOrder && InsReg != DstSubReg) {
if (MI->getOperand(1).isKill()) {
DstSubReg = MRI.getSubReg(SrcReg, SubIdx);
More information about the llvm-commits
mailing list