The insertion method returns void now

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-08-15 22:14:31 +00:00
parent da34645b2b
commit 078fee3f2e

View File

@ -45,8 +45,6 @@ using namespace llvm;
namespace {
Statistic<> numTwoAddressInstrs("twoaddressinstruction",
"Number of two-address instructions");
Statistic<> numInstrsAdded("twoaddressinstruction",
"Number of instructions added");
struct TwoAddressInstructionPass : public MachineFunctionPass {
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
@ -124,15 +122,13 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
#endif
const TargetRegisterClass* rc = MF.getSSARegMap()->getRegClass(regA);
unsigned Added = MRI.copyRegToReg(*mbbi, mi, regA, regB, rc);
numInstrsAdded += Added;
MRI.copyRegToReg(*mbbi, mi, regA, regB, rc);
MachineBasicBlock::iterator prevMi = prior(mi);
DEBUG(std::cerr << "\t\tprepend:\t"; prevMi->print(std::cerr, &TM));
if (LV) {
// update live variables for regA
assert(Added == 1 && "Cannot handle multi-instruction copies yet!");
LiveVariables::VarInfo& varInfo = LV->getVarInfo(regA);
varInfo.DefInst = prevMi;