Skip to content

Commit

Permalink
[Mem2Reg] Use llvm::count instead of std::count (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Nov 8, 2020
1 parent c95fff5 commit 75e46c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Expand Up @@ -907,7 +907,7 @@ void PromoteMem2Reg::RenamePass(BasicBlock *BB, BasicBlock *Pred,
// operands so far. Remember this count.
unsigned NewPHINumOperands = APN->getNumOperands();

unsigned NumEdges = std::count(succ_begin(Pred), succ_end(Pred), BB);
unsigned NumEdges = llvm::count(successors(Pred), BB);
assert(NumEdges && "Must be at least one edge from Pred to BB!");

// Add entries for all the phis.
Expand Down

0 comments on commit 75e46c6

Please sign in to comment.