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 | 587daedce2d6c2b2d380b6a5843a6f8b6cfc79e4 (patch) | |
tree | f01732c9f02fd1154ac34176b7a5bbf1f5f0fc44 /lib/Target/IA64 | |
parent | 556d0a0d15689531f2b203575a3fe55e00713777 (diff) |
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/IA64')
-rw-r--r-- | lib/Target/IA64/IA64InstrInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/IA64/IA64InstrInfo.cpp b/lib/Target/IA64/IA64InstrInfo.cpp index 65eff25261..5f89d4f139 100644 --- a/lib/Target/IA64/IA64InstrInfo.cpp +++ b/lib/Target/IA64/IA64InstrInfo.cpp @@ -96,17 +96,17 @@ void IA64InstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, if (RC == IA64::FPRegisterClass) { BuildMI(MBB, MI, DL, get(IA64::STF_SPILL)).addFrameIndex(FrameIdx) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); } else if (RC == IA64::GRRegisterClass) { BuildMI(MBB, MI, DL, get(IA64::ST8)).addFrameIndex(FrameIdx) - .addReg(SrcReg, false, false, isKill); + .addReg(SrcReg, getKillRegState(isKill)); } else if (RC == IA64::PRRegisterClass) { /* we use IA64::r2 as a temporary register for doing this hackery. */ // first we load 0: BuildMI(MBB, MI, DL, get(IA64::MOV), IA64::r2).addReg(IA64::r0); // then conditionally add 1: BuildMI(MBB, MI, DL, get(IA64::CADDIMM22), IA64::r2).addReg(IA64::r2) - .addImm(1).addReg(SrcReg, false, false, isKill); + .addImm(1).addReg(SrcReg, getKillRegState(isKill)); // and then store it to the stack BuildMI(MBB, MI, DL, get(IA64::ST8)) .addFrameIndex(FrameIdx) @@ -136,7 +136,7 @@ void IA64InstrInfo::storeRegToAddr(MachineFunction &MF, unsigned SrcReg, MachineInstrBuilder MIB = BuildMI(MF, DL, get(Opc)); for (unsigned i = 0, e = Addr.size(); i != e; ++i) MIB.addOperand(Addr[i]); - MIB.addReg(SrcReg, false, false, isKill); + MIB.addReg(SrcReg, getKillRegState(isKill)); NewMIs.push_back(MIB); return; |