diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-05-13 21:33:08 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-05-13 21:33:08 +0000 |
commit | 2b739762c5444433753e4d3a141ff20f40636611 (patch) | |
tree | f01732c9f02fd1154ac34176b7a5bbf1f5f0fc44 /lib/Target/XCore | |
parent | 77d32df6e003b474ab5a97095e58a81389b10271 (diff) | |
download | external_llvm-2b739762c5444433753e4d3a141ff20f40636611.zip external_llvm-2b739762c5444433753e4d3a141ff20f40636611.tar.gz external_llvm-2b739762c5444433753e4d3a141ff20f40636611.tar.bz2 |
Change MachineInstrBuilder::addReg() to take a flag instead of a list of
booleans. This gives a better indication of what the "addReg()" is
doing. Remembering what all of those booleans mean isn't easy, especially if you
aren't spending all of your time in that code.
I took Jakob's suggestion and made it illegal to pass in "true" for the
flag. This should hopefully prevent any unintended misuse of this (by reverting
to the old way of using addReg()).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r-- | lib/Target/XCore/XCoreInstrInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreRegisterInfo.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/Target/XCore/XCoreInstrInfo.cpp b/lib/Target/XCore/XCoreInstrInfo.cpp index e328b46..0402f59 100644 --- a/lib/Target/XCore/XCoreInstrInfo.cpp +++ b/lib/Target/XCore/XCoreInstrInfo.cpp @@ -397,7 +397,7 @@ void XCoreInstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, DebugLoc DL = DebugLoc::getUnknownLoc(); if (I != MBB.end()) DL = I->getDebugLoc(); BuildMI(MBB, I, DL, get(XCore::STWFI)) - .addReg(SrcReg, false, false, isKill) + .addReg(SrcReg, getKillRegState(isKill)) .addFrameIndex(FrameIndex) .addImm(0); } diff --git a/lib/Target/XCore/XCoreRegisterInfo.cpp b/lib/Target/XCore/XCoreRegisterInfo.cpp index ef5f9f9..82cd92d 100644 --- a/lib/Target/XCore/XCoreRegisterInfo.cpp +++ b/lib/Target/XCore/XCoreRegisterInfo.cpp @@ -237,18 +237,18 @@ void XCoreRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, case XCore::LDWFI: New = BuildMI(MBB, II, dl, TII.get(XCore::LDW_3r), Reg) .addReg(FramePtr) - .addReg(ScratchReg, false, false, true); + .addReg(ScratchReg, RegState::Kill); break; case XCore::STWFI: New = BuildMI(MBB, II, dl, TII.get(XCore::STW_3r)) - .addReg(Reg, false, false, isKill) + .addReg(Reg, getKillRegState(isKill)) .addReg(FramePtr) - .addReg(ScratchReg, false, false, true); + .addReg(ScratchReg, RegState::Kill); break; case XCore::LDAWFI: New = BuildMI(MBB, II, dl, TII.get(XCore::LDAWF_l3r), Reg) .addReg(FramePtr) - .addReg(ScratchReg, false, false, true); + .addReg(ScratchReg, RegState::Kill); break; default: assert(0 && "Unexpected Opcode\n"); @@ -262,7 +262,7 @@ void XCoreRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, break; case XCore::STWFI: New = BuildMI(MBB, II, dl, TII.get(XCore::STW_2rus)) - .addReg(Reg, false, false, isKill) + .addReg(Reg, getKillRegState(isKill)) .addReg(FramePtr) .addImm(Offset); break; @@ -293,7 +293,7 @@ void XCoreRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, case XCore::STWFI: NewOpcode = (isU6) ? XCore::STWSP_ru6 : XCore::STWSP_lru6; BuildMI(MBB, II, dl, TII.get(NewOpcode)) - .addReg(Reg, false, false, isKill) + .addReg(Reg, getKillRegState(isKill)) .addImm(Offset); break; case XCore::LDAWFI: |