[llvm] r314744 - SparseSolver: Rename getOrInitValueState to getValueState, matching what SCCP calls it
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 17:26:21 PDT 2017
Author: dannyb
Date: Mon Oct 2 17:26:21 2017
New Revision: 314744
URL: http://llvm.org/viewvc/llvm-project?rev=314744&view=rev
Log:
SparseSolver: Rename getOrInitValueState to getValueState, matching what SCCP calls it
Modified:
llvm/trunk/include/llvm/Analysis/SparsePropagation.h
llvm/trunk/lib/Analysis/SparsePropagation.cpp
Modified: llvm/trunk/include/llvm/Analysis/SparsePropagation.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/SparsePropagation.h?rev=314744&r1=314743&r2=314744&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/SparsePropagation.h (original)
+++ llvm/trunk/include/llvm/Analysis/SparsePropagation.h Mon Oct 2 17:26:21 2017
@@ -141,18 +141,18 @@ public:
/// getLatticeState - Return the LatticeVal object that corresponds to the
/// value. If an value is not in the map, it is returned as untracked,
- /// unlike the getOrInitValueState method.
+ /// unlike the getValueState method.
LatticeVal getLatticeState(Value *V) const {
auto I = ValueState.find(V);
return I != ValueState.end() ? I->second : LatticeFunc->getUntrackedVal();
}
- /// getOrInitValueState - Return the LatticeVal object that corresponds to the
+ /// getValueState - Return the LatticeVal object that corresponds to the
/// value, initializing the value's state if it hasn't been entered into the
/// map yet. This function is necessary because not all values should start
/// out in the underdefined state... Arguments should be overdefined, and
/// constants should be marked as constants.
- LatticeVal getOrInitValueState(Value *V);
+ LatticeVal getValueState(Value *V);
/// isEdgeFeasible - Return true if the control flow edge from the 'From'
/// basic block to the 'To' basic block is currently feasible. If
Modified: llvm/trunk/lib/Analysis/SparsePropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/SparsePropagation.cpp?rev=314744&r1=314743&r2=314744&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/SparsePropagation.cpp (original)
+++ llvm/trunk/lib/Analysis/SparsePropagation.cpp Mon Oct 2 17:26:21 2017
@@ -57,13 +57,13 @@ void AbstractLatticeFunction<LatticeVal>
// SparseSolver Implementation
//===----------------------------------------------------------------------===//
-/// getOrInitValueState - Return the LatticeVal object that corresponds to the
+/// getValueState - Return the LatticeVal object that corresponds to the
/// value, initializing the value's state if it hasn't been entered into the
/// map yet. This function is necessary because not all values should start
/// out in the underdefined state... Arguments should be overdefined, and
/// constants should be marked as constants.
template <class LatticeVal>
-LatticeVal SparseSolver<LatticeVal>::getOrInitValueState(Value *V) {
+LatticeVal SparseSolver<LatticeVal>::getValueState(Value *V) {
auto I = ValueState.find(V);
if (I != ValueState.end()) return I->second; // Common case, in the map
@@ -147,7 +147,7 @@ void SparseSolver<LatticeVal>::getFeasib
LatticeVal BCValue;
if (AggressiveUndef)
- BCValue = getOrInitValueState(BI->getCondition());
+ BCValue = getValueState(BI->getCondition());
else
BCValue = getLatticeState(BI->getCondition());
@@ -189,7 +189,7 @@ void SparseSolver<LatticeVal>::getFeasib
SwitchInst &SI = cast<SwitchInst>(TI);
LatticeVal SCValue;
if (AggressiveUndef)
- SCValue = getOrInitValueState(SI.getCondition());
+ SCValue = getValueState(SI.getCondition());
else
SCValue = getLatticeState(SI.getCondition());
@@ -255,7 +255,7 @@ void SparseSolver<LatticeVal>::visitPHIN
return;
}
- LatticeVal PNIV = getOrInitValueState(&PN);
+ LatticeVal PNIV = getValueState(&PN);
LatticeVal Overdefined = LatticeFunc->getOverdefinedVal();
// If this value is already overdefined (common) just return.
@@ -278,7 +278,7 @@ void SparseSolver<LatticeVal>::visitPHIN
continue;
// Merge in this value.
- LatticeVal OpVal = getOrInitValueState(PN.getIncomingValue(i));
+ LatticeVal OpVal = getValueState(PN.getIncomingValue(i));
if (OpVal != PNIV)
PNIV = LatticeFunc->MergeValues(PNIV, OpVal);
More information about the llvm-commits
mailing list