mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
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:
parent
da34645b2b
commit
078fee3f2e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user