diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-14 01:18:34 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-14 01:18:34 +0000 |
commit | 5a92240270c18e8fb701f49bc304b74142fd5691 (patch) | |
tree | 6ee26ac917c1c7015bca8f4cbae2dcfc146f0458 /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | 7c6e4d5ae695a9a9463553077da0cd16b59f535a (diff) | |
download | bcm5719-llvm-5a92240270c18e8fb701f49bc304b74142fd5691.tar.gz bcm5719-llvm-5a92240270c18e8fb701f49bc304b74142fd5691.zip |
Use newly added next() and prior() utility functions.
llvm-svn: 11430
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index 8dc2ffe365d..6f1e9901406 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -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)); |