mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Use newly added next() and prior() utility functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -38,6 +38,7 @@
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "Support/Debug.h"
|
||||
#include "Support/Statistic.h"
|
||||
#include "Support/STLExtras.h"
|
||||
#include <iostream>
|
||||
using namespace llvm;
|
||||
|
||||
@ -134,8 +135,7 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
|
||||
unsigned Added = MRI.copyRegToReg(*mbbi, mi, regA, regB, rc);
|
||||
numInstrsAdded += Added;
|
||||
|
||||
MachineBasicBlock::iterator prevMi = mi;
|
||||
--prevMi;
|
||||
MachineBasicBlock::iterator prevMi = prior(mi);
|
||||
DEBUG(std::cerr << "\t\tadded instruction: ";
|
||||
prevMi->print(std::cerr, TM));
|
||||
|
||||
|
Reference in New Issue
Block a user