From f1e9cae00e2322756324b5489dc48d533e5dd41d Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Tue, 1 Mar 2016 19:28:01 +0000 Subject: [PATCH] [SCEV] Minor cleanup: rename method, C++11'ify; NFC llvm-svn: 262374 --- llvm/include/llvm/Analysis/ScalarEvolution.h | 5 ++--- llvm/lib/Analysis/ScalarEvolution.cpp | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index 0224591..5975d3b 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -657,8 +657,7 @@ namespace llvm { DenseMap &Cache = Hint == HINT_RANGE_UNSIGNED ? UnsignedRanges : SignedRanges; - std::pair::iterator, bool> Pair = - Cache.insert(std::make_pair(S, CR)); + auto Pair = Cache.insert({S, CR}); if (!Pair.second) Pair.first->second = CR; return Pair.first->second; @@ -698,7 +697,7 @@ namespace llvm { /// This looks up computed SCEV values for all instructions that depend on /// the given instruction and removes them from the ValueExprMap map if they /// reference SymName. This is used during PHI resolution. - void ForgetSymbolicName(Instruction *I, const SCEV *SymName); + void forgetSymbolicName(Instruction *I, const SCEV *SymName); /// Return the BackedgeTakenInfo for the given loop, lazily computing new /// values if the loop hasn't been analyzed yet. diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index e493a28..f61fa09 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -3650,8 +3650,7 @@ PushDefUseChildren(Instruction *I, /// instructions that depend on the given instruction and removes them from /// the ValueExprMapType map if they reference SymName. This is used during PHI /// resolution. -void -ScalarEvolution::ForgetSymbolicName(Instruction *PN, const SCEV *SymName) { +void ScalarEvolution::forgetSymbolicName(Instruction *PN, const SCEV *SymName) { SmallVector Worklist; PushDefUseChildren(PN, Worklist); @@ -3864,7 +3863,7 @@ const SCEV *ScalarEvolution::createAddRecFromPHI(PHINode *PN) { // Okay, for the entire analysis of this edge we assumed the PHI // to be symbolic. We now need to go back and purge all of the // entries for the scalars that use the symbolic expression. - ForgetSymbolicName(PN, SymbolicName); + forgetSymbolicName(PN, SymbolicName); ValueExprMap[SCEVCallbackVH(PN, this)] = PHISCEV; return PHISCEV; } @@ -3888,7 +3887,7 @@ const SCEV *ScalarEvolution::createAddRecFromPHI(PHINode *PN) { // Okay, for the entire analysis of this edge we assumed the PHI // to be symbolic. We now need to go back and purge all of the // entries for the scalars that use the symbolic expression. - ForgetSymbolicName(PN, SymbolicName); + forgetSymbolicName(PN, SymbolicName); ValueExprMap[SCEVCallbackVH(PN, this)] = Shifted; return Shifted; } -- 2.7.4