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 | f81af21caf9c0f62c60b72762d9a927e8c24f679 (patch) | |
tree | 6b7865d9540825fa4d391794ff356793a5dfc235 /lib/Target/X86/FloatingPoint.cpp | |
parent | bc79471be19e412eed4d270908db7ac945be10ca (diff) |
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
Diffstat (limited to 'lib/Target/X86/FloatingPoint.cpp')
-rw-r--r-- | lib/Target/X86/FloatingPoint.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Target/X86/FloatingPoint.cpp b/lib/Target/X86/FloatingPoint.cpp index 53f6ec0feb..28517c339c 100644 --- a/lib/Target/X86/FloatingPoint.cpp +++ b/lib/Target/X86/FloatingPoint.cpp @@ -42,6 +42,7 @@ #include "Support/Debug.h" #include "Support/DepthFirstIterator.h" #include "Support/Statistic.h" +#include "Support/STLExtras.h" #include <algorithm> #include <set> using namespace llvm; @@ -199,11 +200,8 @@ bool FPS::processBasicBlock(MachineFunction &MF, MachineBasicBlock &BB) { continue; // Efficiently ignore non-fp insts! MachineInstr *PrevMI = 0; - if (I != BB.begin()) { - MachineBasicBlock::iterator tmp = I; - --tmp; - PrevMI = tmp; - } + if (I != BB.begin()) + PrevMI = prior(I); ++NumFP; // Keep track of # of pseudo instrs DEBUG(std::cerr << "\nFPInst:\t"; |