diff options
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineInstrBundle.h | 6 | ||||
-rw-r--r-- | llvm/include/llvm/Support/BranchProbability.h | 15 | ||||
-rw-r--r-- | llvm/lib/Support/Path.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86MCInstLower.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/Instrumentation.cpp | 10 |
5 files changed, 24 insertions, 13 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstrBundle.h b/llvm/include/llvm/CodeGen/MachineInstrBundle.h index 9bb5b633566..1810d23072d 100644 --- a/llvm/include/llvm/CodeGen/MachineInstrBundle.h +++ b/llvm/include/llvm/CodeGen/MachineInstrBundle.h @@ -61,7 +61,8 @@ inline MachineBasicBlock::instr_iterator getBundleEnd( MachineBasicBlock::instr_iterator I) { while (I->isBundledWithSucc()) ++I; - return ++I; + ++I; + return I; } /// Returns an iterator pointing beyond the bundle containing \p I. @@ -69,7 +70,8 @@ inline MachineBasicBlock::const_instr_iterator getBundleEnd( MachineBasicBlock::const_instr_iterator I) { while (I->isBundledWithSucc()) ++I; - return ++I; + ++I; + return I; } //===----------------------------------------------------------------------===// diff --git a/llvm/include/llvm/Support/BranchProbability.h b/llvm/include/llvm/Support/BranchProbability.h index dd0aba025ab..b7dddd56af7 100644 --- a/llvm/include/llvm/Support/BranchProbability.h +++ b/llvm/include/llvm/Support/BranchProbability.h @@ -128,27 +128,32 @@ public: BranchProbability operator+(BranchProbability RHS) const { BranchProbability Prob(*this); - return Prob += RHS; + Prob += RHS; + return Prob; } BranchProbability operator-(BranchProbability RHS) const { BranchProbability Prob(*this); - return Prob -= RHS; + Prob -= RHS; + return Prob; } BranchProbability operator*(BranchProbability RHS) const { BranchProbability Prob(*this); - return Prob *= RHS; + Prob *= RHS; + return Prob; } BranchProbability operator*(uint32_t RHS) const { BranchProbability Prob(*this); - return Prob *= RHS; + Prob *= RHS; + return Prob; } BranchProbability operator/(uint32_t RHS) const { BranchProbability Prob(*this); - return Prob /= RHS; + Prob /= RHS; + return Prob; } bool operator==(BranchProbability RHS) const { return N == RHS.N; } diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp index d60c1359b18..5312e1df3b6 100644 --- a/llvm/lib/Support/Path.cpp +++ b/llvm/lib/Support/Path.cpp @@ -297,7 +297,8 @@ reverse_iterator rbegin(StringRef Path, Style style) { I.Path = Path; I.Position = Path.size(); I.S = style; - return ++I; + ++I; + return I; } reverse_iterator rend(StringRef Path) { diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp index b147cbff002..11492f70968 100644 --- a/llvm/lib/Target/X86/X86MCInstLower.cpp +++ b/llvm/lib/Target/X86/X86MCInstLower.cpp @@ -1364,7 +1364,8 @@ PrevCrossBBInst(MachineBasicBlock::const_iterator MBBI) { MBB = MBB->getPrevNode(); MBBI = MBB->end(); } - return --MBBI; + --MBBI; + return MBBI; } static const Constant *getConstantFromPool(const MachineInstr &MI, diff --git a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp index 1ed0927cd73..22fa76a6c1f 100644 --- a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp +++ b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp @@ -24,10 +24,12 @@ using namespace llvm; /// Moves I before IP. Returns new insert point. static BasicBlock::iterator moveBeforeInsertPoint(BasicBlock::iterator I, BasicBlock::iterator IP) { // If I is IP, move the insert point down. - if (I == IP) - return ++IP; - // Otherwise, move I before IP and return IP. - I->moveBefore(&*IP); + if (I == IP) { + ++IP; + } else { + // Otherwise, move I before IP and return IP. + I->moveBefore(&*IP); + } return IP; } |