diff options
Diffstat (limited to 'contrib/llvm/lib/Analysis/PHITransAddr.cpp')
-rw-r--r-- | contrib/llvm/lib/Analysis/PHITransAddr.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/contrib/llvm/lib/Analysis/PHITransAddr.cpp b/contrib/llvm/lib/Analysis/PHITransAddr.cpp index b4aad74..84ecd4a 100644 --- a/contrib/llvm/lib/Analysis/PHITransAddr.cpp +++ b/contrib/llvm/lib/Analysis/PHITransAddr.cpp @@ -62,8 +62,7 @@ static bool VerifySubExpr(Value *Expr, // If it's an instruction, it is either in Tmp or its operands recursively // are. - SmallVectorImpl<Instruction*>::iterator Entry = - std::find(InstInputs.begin(), InstInputs.end(), I); + SmallVectorImpl<Instruction *>::iterator Entry = find(InstInputs, I); if (Entry != InstInputs.end()) { InstInputs.erase(Entry); return true; @@ -126,8 +125,7 @@ static void RemoveInstInputs(Value *V, if (!I) return; // If the instruction is in the InstInputs list, remove it. - SmallVectorImpl<Instruction*>::iterator Entry = - std::find(InstInputs.begin(), InstInputs.end(), I); + SmallVectorImpl<Instruction *>::iterator Entry = find(InstInputs, I); if (Entry != InstInputs.end()) { InstInputs.erase(Entry); return; @@ -150,8 +148,7 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB, if (!Inst) return V; // Determine whether 'Inst' is an input to our PHI translatable expression. - bool isInput = - std::find(InstInputs.begin(), InstInputs.end(), Inst) != InstInputs.end(); + bool isInput = is_contained(InstInputs, Inst); // Handle inputs instructions if needed. if (isInput) { @@ -165,7 +162,7 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB, // translated, we need to incorporate the value into the expression or fail. // In either case, the instruction itself isn't an input any longer. - InstInputs.erase(std::find(InstInputs.begin(), InstInputs.end(), Inst)); + InstInputs.erase(find(InstInputs, Inst)); // If this is a PHI, go ahead and translate it. if (PHINode *PN = dyn_cast<PHINode>(Inst)) @@ -272,8 +269,7 @@ Value *PHITransAddr::PHITranslateSubExpr(Value *V, BasicBlock *CurBB, isNSW = isNUW = false; // If the old 'LHS' was an input, add the new 'LHS' as an input. - if (std::find(InstInputs.begin(), InstInputs.end(), BOp) != - InstInputs.end()) { + if (is_contained(InstInputs, BOp)) { RemoveInstInputs(BOp, InstInputs); AddAsInput(LHS); } |