forked from OSchip/llvm-project
[SCEV] Minor cleanup: rename method, C++11'ify; NFC
llvm-svn: 262374
This commit is contained in:
parent
b5ca00a58d
commit
f1e9cae00e
llvm
|
@ -657,8 +657,7 @@ namespace llvm {
|
||||||
DenseMap<const SCEV *, ConstantRange> &Cache =
|
DenseMap<const SCEV *, ConstantRange> &Cache =
|
||||||
Hint == HINT_RANGE_UNSIGNED ? UnsignedRanges : SignedRanges;
|
Hint == HINT_RANGE_UNSIGNED ? UnsignedRanges : SignedRanges;
|
||||||
|
|
||||||
std::pair<DenseMap<const SCEV *, ConstantRange>::iterator, bool> Pair =
|
auto Pair = Cache.insert({S, CR});
|
||||||
Cache.insert(std::make_pair(S, CR));
|
|
||||||
if (!Pair.second)
|
if (!Pair.second)
|
||||||
Pair.first->second = CR;
|
Pair.first->second = CR;
|
||||||
return Pair.first->second;
|
return Pair.first->second;
|
||||||
|
@ -698,7 +697,7 @@ namespace llvm {
|
||||||
/// This looks up computed SCEV values for all instructions that depend on
|
/// This looks up computed SCEV values for all instructions that depend on
|
||||||
/// the given instruction and removes them from the ValueExprMap map if they
|
/// the given instruction and removes them from the ValueExprMap map if they
|
||||||
/// reference SymName. This is used during PHI resolution.
|
/// 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
|
/// Return the BackedgeTakenInfo for the given loop, lazily computing new
|
||||||
/// values if the loop hasn't been analyzed yet.
|
/// values if the loop hasn't been analyzed yet.
|
||||||
|
|
|
@ -3650,8 +3650,7 @@ PushDefUseChildren(Instruction *I,
|
||||||
/// instructions that depend on the given instruction and removes them from
|
/// instructions that depend on the given instruction and removes them from
|
||||||
/// the ValueExprMapType map if they reference SymName. This is used during PHI
|
/// the ValueExprMapType map if they reference SymName. This is used during PHI
|
||||||
/// resolution.
|
/// resolution.
|
||||||
void
|
void ScalarEvolution::forgetSymbolicName(Instruction *PN, const SCEV *SymName) {
|
||||||
ScalarEvolution::ForgetSymbolicName(Instruction *PN, const SCEV *SymName) {
|
|
||||||
SmallVector<Instruction *, 16> Worklist;
|
SmallVector<Instruction *, 16> Worklist;
|
||||||
PushDefUseChildren(PN, 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
|
// 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
|
// to be symbolic. We now need to go back and purge all of the
|
||||||
// entries for the scalars that use the symbolic expression.
|
// entries for the scalars that use the symbolic expression.
|
||||||
ForgetSymbolicName(PN, SymbolicName);
|
forgetSymbolicName(PN, SymbolicName);
|
||||||
ValueExprMap[SCEVCallbackVH(PN, this)] = PHISCEV;
|
ValueExprMap[SCEVCallbackVH(PN, this)] = PHISCEV;
|
||||||
return 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
|
// 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
|
// to be symbolic. We now need to go back and purge all of the
|
||||||
// entries for the scalars that use the symbolic expression.
|
// entries for the scalars that use the symbolic expression.
|
||||||
ForgetSymbolicName(PN, SymbolicName);
|
forgetSymbolicName(PN, SymbolicName);
|
||||||
ValueExprMap[SCEVCallbackVH(PN, this)] = Shifted;
|
ValueExprMap[SCEVCallbackVH(PN, this)] = Shifted;
|
||||||
return Shifted;
|
return Shifted;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue